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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...