Splunk Search

corrupted CSV results / Python API

tomasv
Explorer

Hi,

I'm using the Python SDK to export some search results to a CSV file, but the results seem to be somehow corrupted unless I specify an exact list of fields. So for example this:

index=myindex field=pattern

produces corrupted results but this

index=myindex field=pattern | table field_a, field_b

works just fine. The corruption looks a bit like a randomly scattered newline characters - the line suddenly ends (in the middle of a field), then there's a part of the original line missing and the remainder is on the next line. (or something like that, I'm not sure what is the exact corruption).

The data do not contain newline characters - when exporting to JSON everything is peachy. Also there are no mixed Windows/Unix line ends (I'm on Linux).

wcolgate_splunk
Splunk Employee
Splunk Employee

Question: I've seen JSON output and it appears to have "nice-afied" the "\n" new lines. Could you capture a CSV and XML portion and send to devinfo@splunk.com?

Thanks,

Wim

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...