# Elasticsearch query output in table format

**URL:** <https://discuss.elastic.co/t/elasticsearch-query-output-in-table-format/125882>\
**Category:** Elasticsearch\
**Created:** [March 28, 2018, 7:53am UTC](https://discuss.elastic.co/t/elasticsearch-query-output-in-table-format/125882 "2018-03-28T07:53:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [March 28, 2018, 7:53am UTC](https://discuss.elastic.co/t/elasticsearch-query-output-in-table-format/125882/1 "2018-03-28T07:53:27Z")

</div>

Hi ,  
Is theare any way to get elasticsearch curl query output in table format or I need to write a wrapper script to process this output to archived the data in tabular format.  
I have the following query:

curl -XGET "[http://localhost:9200/event\*/\_search?pretty&filter\_path=hits.hits.\_source&\_source=jobid,event\_time,status,message](http://localhost:9200/event*/_search?pretty&filter_path=hits.hits._source&_source=jobid,event_time,status,message)" -H 'Content-Type: application/json' -d' {"query": { "bool": { "must": [{ "match\_all": {} }, { "match\_phrase": { "jobid": { "query": "3404884" } } }], "filter": [], "should": [], "must\_not": [] } } }'

Now I want the output in table format like:

Jobid Status Event\_Time Meaasage

xyz abc 2018-03-28 12:34:21 abc  
asd ada

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2018, 9:23am UTC](https://discuss.elastic.co/t/elasticsearch-query-output-in-table-format/125882/2 "2018-03-28T09:23:34Z")

</div>

> Is theare any way to get elasticsearch curl query output in table format

No. Not in elasticsearch.

But you can use Logstash if you want to extract data from elasticsearch and generate a TSV/CSV file for example.

Note that x-pack (commercial) also allows CSV exports from Kibana.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 25, 2018, 9:24am UTC](https://discuss.elastic.co/t/elasticsearch-query-output-in-table-format/125882/3 "2018-04-25T09:24:00Z")

</div>

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