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:
"12.345","-736","13,123,948"

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,
Bastian

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,
Mike.

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.

18%20AM

Hope this helps,
Mike.

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