Getting Data In

Splunk rest api change column order.

voffko
Engager

Hello,
I am using splunk 4.2.5
When I export data to csv file from splunk via rest api I encountered a problem. Splunk change column order in csv file. How can I export data to csv with a certain column order?

Best regards, Vladimir.

Tags (1)

sowings
Splunk Employee
Splunk Employee

You can use the "table" command to set the desired order, even of an existing CSV file.


|inputlookup file.csv | table field1, field2, foo, bar | outputlookup file.csv

It should now have the order you specified in the table command.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...