SQL "join" in Elasticsearch? Yes you can

(Michael Hart) #1

My colleagues put this tool together as part of a hackathon, and after cleaning it up our company has graciously allowed us to make it open source. Announcing "PostgreSQL foreign data wrapper for Elasticsearch" available at https://github.com/rtkwlf/esfdw. It's still in an early stage but it does work. Contributions are more than welcome.

What does it do? You can write SQL queries against PostgreSQL which will use Elasticsearch as the backend.

I won't copy the whole README here, but a few use cases:

  • Writing SQL JOIN queries against Elasticsearch documents and letting the PostgreSQL engine do the heavy lifting
  • Running window functions on data stored in Elasticsearch
  • Applying PostgreSQL aggregations that do not currently have a native Elasticsearch equivalent

Github: https://github.com/rtkwlf/esfdw
Pypi: https://pypi.python.org/pypi/esfdw


(Ivan Brusic) #2


Never seen such a cryptic username/reponame combo! :slight_smile:

(Mark Walkom) #3

Thanks for sharing this!

Feel free to also post future releases in https://discuss.elastic.co/c/annoucements/community-plugins

(system) #4