elasticsearch-py icon indicating copy to clipboard operation
elasticsearch-py copied to clipboard

SQL scan helper

Open jamesharr opened this issue 5 years ago • 2 comments

Describe the feature: SQL support in elasticsearch.helpers.scan or a separate helper for scanning SQL queries.

I couldn't find a way to submit SQL through the standard search API, so I don't think it's possible to use the existing scan helper with SQL. That said, if it is possible it could be as simple as an example in documentation.

Certain queries are easier to express in SQL than native ElasticSearch DSL. I think SQL results are easier to iterate over in Python scripts in many cases as well. Specifically queries with more than a couple buckets / GROUP BY columns.

jamesharr avatar Jul 28 '20 15:07 jamesharr

You may find this project useful: https://pypi.org/project/elasticsearch-dbapi

sethmlarson avatar Aug 04 '20 14:08 sethmlarson

I will definitely be checking this out, thank you. I think this covers my use case.

I'll leave this ticket open and let the elastic team decide if they want to implement this or not. I think there's potentially value to not requiring another dependency in client code.

jamesharr avatar Aug 25 '20 02:08 jamesharr

Closing this issue, as there are no plans to add this feature.

technige avatar Dec 06 '22 09:12 technige