# Export the result of an SQL query

**URL:** <https://discuss.elastic.co/t/export-the-result-of-an-sql-query/163591>\
**Category:** Kibana\
**Created:** [January 9, 2019, 5:07pm UTC](https://discuss.elastic.co/t/export-the-result-of-an-sql-query/163591 "2019-01-09T17:07:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregoryB-T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregoryb-t/32/28564_2.png) [@GregoryB-T](https://discuss.elastic.co/u/GregoryB-T)\
**Post date:** [January 9, 2019, 5:07pm UTC](https://discuss.elastic.co/t/export-the-result-of-an-sql-query/163591/1 "2019-01-09T17:07:21Z")

</div>

Hi ,

It is possible to export the result of a SQL query made in the dev tool in a visualization or a file

Thanks and Regards

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [January 9, 2019, 6:15pm UTC](https://discuss.elastic.co/t/export-the-result-of-an-sql-query/163591/2 "2019-01-09T18:15:31Z")

</div>

Hello Gregory,

You could use the 'Copy as cUrl' under the wrench next to the query of interest. Paste the cUrl in bash and then output to any file, something like `<your query's cUrl> > queryOutputFile`

Thanks,  
Aaron

---

<div class="post-metadata">

**Author:** ![GregoryB-T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregoryb-t/32/28564_2.png) [@GregoryB-T](https://discuss.elastic.co/u/GregoryB-T)\
**Post date:** [January 10, 2019, 9:37am UTC](https://discuss.elastic.co/t/export-the-result-of-an-sql-query/163591/3 "2019-01-10T09:37:07Z")

</div>

Hello @Aaron_Caldwell

Thanks for your answer,  
Yes i knew this method but the goal is to expose the result to the user.

the ideal process is :  
I create the request and a kibana user can export the result of that request like the data of a data-table

is it possible with a SQL query ?

---

<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:** [February 7, 2019, 9:37am UTC](https://discuss.elastic.co/t/export-the-result-of-an-sql-query/163591/4 "2019-02-07T09:37:16Z")

</div>

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