You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eliran Moyal edited this page Dec 30, 2015
·
2 revisions
CSV result - Rest API
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
how to use?
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