Data Format in csv reports generated in Kibana

Hi, I would like to export data as csv for further analysis outside the elastic stack. When doing this from the Discover page in Kibana, I noticed that all values in the generated csv are formatted as strings, i.e. number-type fields are represented like this:

Is there an option to avoid quotation marks for number-type fields (integer, long, float, etc.)?
It's fine for me to use the corresponding Elasticsearch API directly ("<elasticsearch_url>/api/reporting/generate/csv?jobParams=(...)", if needed.

Best Regards,

P.S.: I'm using version 7.3.1 of the elastic stack under the basic license.

Hi @BastianC,

The CSV export function will format the data according to what is configured with the Index Pattern. By default, it uses the numeral.js format of 0,0.[000] which causes the export number fields to be wrapped in quotes.

If you edit the number fields under Index Pattern Management and change their numeral.js format to 0, the exported CSV should return numbers without quotes.

Screenshot of what I did locally to change the format:

Let me know if that does the trick,

1 Like

Works like a charm, thanks a lot! Do you also know of a possibility to automate this, in order to reduce the extra effort when creating fields, or even new index patterns?

Hi @BastianC,

For global changes, you should be able to set those under "Advanced Settings". I have attached a screenshot below of the menu option next to "Index Patterns". I believe changing the "Number format" will change the format globally or at least to newly created index patterns.


Hope this helps,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.