Get the JDBC or ODBC driver

You download the Apache Hive JDBC driver, navigate to the installed JDBC driver, or you download the Simba ODBC driver.

Cloudera provides the Apache Hive JDBC and Simba ODBC drivers as an add-on. When you start the Hive shell, the JDBC JAR version, which you use in the following procedure, appears in the output:
. . .
Connected to: Apache Hive (version 3.1.0.7.0.0.0-361)
Driver: Hive JDBC (version 3.1.0.7.0.0.0-361)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 3.1.0.7.0.0.0-361 by Apache Hive
0: jdbc:hive2://10.10.10.200:10000>
  1. Get the driver.
    • Using the version number of Apache Hive in your cluster, search for and download the standalone Apache Hive JDBC driver from the Hortonworks Repository.
    • Download the standalone Apache Hive JDBC driver from your Cloudera cluster in /opt/cloudera/parcels/<version>hive-jdbc-<version>-standalone.jar.

      For example, /opt/cloudera/parcels/CDH-7.0.0-1.cdh7.0.0.p0.1316065/jars/hive-jdbc-3.1.0.7.0.0.0-361-standalone.jar

    • Download the Simba ODBC driver for Hive in CDP from the Cloudera Downloads page. Skip the rest of the steps in this procedure and follow ODBC driver installation instructions on the same downloads page.
  2. Optionally, if you run a host outside of the Hadoop cluster, to use the JDBC driver in HTTP and HTTPS modes, give clients access to required JARS:
    • /opt/cloudera/parcels/<version>hive-jdbc-<version>-standalone.jar

      For example, /opt/cloudera/parcels/CDH-7.0.0-1.cdh7.0.0.p0.1316065/jars/hive-jdbc-3.1.0.7.0.0.0-361-standalone.jar

    • hadoop-common.jar

      For example, /opt/cloudera/parcels/CDH-7.0.0-1.cdh7.0.0.p0.1316065/lib/hadoop/hadoop-common.jar

    • hadoop-auth.jar

      Same location as hadoop-common.jar