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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...