Sometimes you want to connect your favorite database query or visualization tool to Hive. I've found that this can be quite cumbersome, typically requiring you to copy jars from the Hadoop cluster to some place locally that can be read by your tool. The goal of this simple maven project is to easily pull the required jars into a single place locally and create an "uber" or "standalone" jar that can be referenced by any JDBC compliant tool.
Please note this project only supports connecting to a remote hiveserver in "non-kerberos" mode. Additional pom changes would be required to support "kerberos secure" mode and "embedded" mode. See Hiveserver2 Client Documentation for recommended jar additions.
You can download the latest binaries from the releases page: https://github.com/timveil/hive-jdbc-uber-jar/releases
๐ Updated for HDP 2.5.0.0 - 9/12/16 ๐
Below is an example configuration using DbVisualizer:
-
Under "Tools" > "Driver Manager..." hit the "Create a new driver" button.
-
Fill in the information as seen below. For the "Driver File Paths" you are pointing to the
hive-jdbc-uber-x.jar
created above.
- Next create a new connection. In this case I'm pointing to Hive on my Hortonworks Sandbox.
Below is an example configuration using IntelliJ Data Grip:
- Under "File" > "Data Sources...", first create a new Driver.
- Then create a new Project Data Source using the new Driver.
- After creating the Project Data Source, test the connection. You should see the following:
To build locally, you must have Maven installed and properly configured. After that it's as simple as running mvn:package
. A file called hive-jdbc-uber-x.jar
will be created in your target
directory. The newly created jar will have the Hive JDBC driver as well as all required dependencies.