-
Notifications
You must be signed in to change notification settings - Fork 1.5k
CSV result
Eliran Moyal edited this page Dec 30, 2015
·
2 revisions
Warning! this is an experimental feature.
That means that not all cases tested/we are not sure about this feature
but we sure want you to try it and tell us what you think about it
When using the REST api you use something like:
http://xxxx:9200/_sql?sql=select field from index
And than you get the result as elasticsearch return the result
Now you can get them as a csv for lighter parsing
Just add the parameter
http://xxxx:9200/_sql?format=csv&sql=select field from index
More parameters you can add:
- flat for nested objects. (just like on site)
http://xxxx:9200/_sql?flat=true&format=csv&sql=select field from index
- change separator (default is ",")
http://xxxx:9200/_sql?separator=;&format=csv&sql=select field from index
- change newLine (default is "\n")
http://xxxx:9200/_sql?newLine=b&format=csv&sql=select field from index