Getting Data In

How to output a file in CSV format with maxresultrows in it, using curl?

breakinho
New Member

I'm trying to output a file in CSV format with maxresultrows in it, using curl.

It works the way I want:

$(curl -s -u user:pass -k https://localhost:8089/services/search/jobs/$id/results/?count=0 --get -d output_mode=csv > ${file})

However, now I want a larger number of rows, so I add: maxresultrows=500000
But it outputs in xml instead of csv, event with output_mode=csv:

$(curl -s -u user:pass -k https://localhost:8089/services/search/jobs/$id/results/?count=0 --get -d maxresultrows=500000 
 output_mode=csv > ${file})

What am I missing here?

EDIT: One thing that I found was that without "maxresultrows" and "output_mode=csv", it outputs all result rows but in XML, it seems that the bottleneck is the output_mode, can't find why it just doesn't outputs all the result rows in CSV file.

Please help!

0 Karma
Get Updates on the Splunk Community!

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...