# Python + SQL

**URL:** <https://discuss.elastic.co/t/python-sql/144170>\
**Category:** Elasticsearch\
**Created:** [August 13, 2018, 12:35pm UTC](https://discuss.elastic.co/t/python-sql/144170 "2018-08-13T12:35:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ll\_elastic](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@ll\_elastic](https://discuss.elastic.co/u/ll_elastic)\
**Post date:** [August 13, 2018, 12:35pm UTC](https://discuss.elastic.co/t/python-sql/144170/1 "2018-08-13T12:35:40Z")

</div>

Hi there!

I was about to rewrite all the functions that I have in DSL to the new SQL functionality for testing and learning purposes. Once I got into it, I wasn't able to find any functionality to query using SQL and Python in the Python API documentation. Anyone has any information about it?

Thanks in advance 😃

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [August 20, 2018, 11:59am UTC](https://discuss.elastic.co/t/python-sql/144170/2 "2018-08-20T11:59:41Z")

</div>

Hi,

as SQL is an X-Pack feature this would need to be part of the [X-Pack APIs](https://elasticsearch-py.readthedocs.io/en/master/xpack.html) but at the moment this is not supported. This is probably because [SQL is currently experimental](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html). However, to experiment with the API you could use the [raw transport API](https://elasticsearch-py.readthedocs.io/en/master/connection.html#elasticsearch.Transport.perform_request) and issue the [SQL API calls](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html) yourself.

Daniel

---

<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:** [September 17, 2018, 11:59am UTC](https://discuss.elastic.co/t/python-sql/144170/3 "2018-09-17T11:59:52Z")

</div>

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