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!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

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

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...