Search code examples
dockerelasticsearchdatagrip

How can I connect Jet Brains DataGrip to an Elasticsearch instance?


I have Jet Brains DataGrip, I also have an elasticsearch instance running locally in docker exposed on a known port via the tcp protocol.

How can I connect DataGrip to my elasticsearch instance?

DataGrip doesn't list it as a type of database to be connected to, nor does googling seem to reveal anything useful to me.


Solution

  • It's possible since Elasticsearch has JDBC-driver: https://www.elastic.co/downloads/jdbc-client

    You should create a custom-driver based connection in DataGrip.

    Then you create a new Driver on the 'Data Sources and Drivers' dialog. Click on the '+' button on the upper left corner. Choose Driver.

    enter image description here

    Complete the new driver's options. Use downloaded JDBC drivers there.

    Now you can create a new Data Source based on this new driver. Click on '+' button on the upper left corner of the 'Data Sources and Driver' and choose your new driver.

    Complete the Data Source options. And finally choose which schemas you want to access on the 'Schemas' tab.