JetBrains DataGrip create Impala connection
This is an example of creating a JetBrains DataGrip connection to Impala authenticated by Kerberos on Ubuntu.
Kerberos
We will have to manualy generate a Kerberos ticket before connecting to Impala.
The first thing is to install Kerberos (example provided for Ubuntu). Then get the krb5.conf and the keytab files and then generate the ticket :
sudo apt install krb5-user kinit -V my.user /tmp/my.user.keytab klist
Add Impala JDBC Connector 2.6.15 for Cloudera Enterprise to IntelliJ DataGrip
Download and extract the jar from https://www.cloudera.com/downloads/connectors/impala/jdbc/2-6-15.html
In DataGrip:
- go to Datasource and Drivers (CTRL+ALT+SHIFT+S) → select Drivers tab → add new driver → select Driver Files
- select the Jar that you downloaded before
- select Driver Class : com.cloudera.impala.jdbc.driver
Add Impala data source in IntelliJ DataGrip
In DataGrip:
- go to Datasource and Drivers (CTRL+ALT+SHIFT+S) → select Data Sources tab
- on General tab put the connectin string: jdbc:impala://impala.example.com:21050;AuthMech=1;KrbHostFQDN=impala.example.com;KrbServiceName=impala;SocketTimeOut=600;SSL=1;LogLevel=6
- on Advanced tab add -Djava.security.krb5.conf=/etc/krb5.conf to VMoptions field
- test the connection
- the connection will work as long as the generated kerberos ticket is active