Setting up the Hive driver type

The Hive connector uses the Hive driver type property to select the correct driver that is being used for connection with Hive.

About this task

When using Hive connector, you must set up the Hive driver type property. The Hive connector uses this property to select the correct driver that is being used for connection with Hive. There are couple of possible options for Hive driver type:
  • Default Hive driver - this option allows you to use the default Hive driver shipped with Information Server. The driver is located under IS_HOME/ASBNode/lib/java/IShive.jar
  • Default SparkSQL driver - this option allows you to use the default SparkSQL driver shipped with Information Server. The driver is located under IS_HOME/ASBNode/lib/java/ISsparksql.jar
  • JDBC configuration file - This option allows to use isjdbc.config file.
  • User defined - This option allows to define custom driver classpath and driver class names for hive driver. Two additional properties allows to define these values:
    1. The property Driver classpath is the cumulative Java class path for the Progress Datadirect JDBC Hive drivers that you need to use through the connector. The value is specified as a semicolon separated list of fully-qualified directory paths, .jar file paths and .zip file paths. For example, if the driver that you plan to use is implemented as a .jar file, include the full path to that .jar file in the driver classpath value. For more information about the class path requirements for your driver, see the driver documentation.
    2. The property Driver class names is a semicolon separated list of fully-qualified driver class names implemented by the JDBC drivers that you plan to utilize through the connector. The driver classes are the Java classes in the drivers that implement the java.sql.Driver JDBC API interface. For more information about the driver class implemented by the driver, see your JDBC driver documentation. Note that you do not need to provide this information for the drivers implemented as JAR files and based on JDBC 4.0 or later JDBC specification because in those cases the connector is able to automatically determine the driver class name from the driver JAR file.

Example

This example shows how you can set up the driver configuration properties. Assume the following scenarios:
    • You want to use the Hive connector with the following JDBC drivers: Driver A, Driver B.
    • Driver A is implemented as the /opt/Hive/IShive.jar file, and Driver B is implemented as the /opt/Progress/DataDirect/lib/hive.jar file.
    • For Driver A, you determine that the name of the driver Java class as com.ibm.isf.jdbc.hive.HiveDriver, and for Driver B, you determine that the driver Java class name is com.ddtek.jdbc.hive.HiveDriver.
To set up the driver configuration file, fill in the connector properties:
  • Driver classpath: /opt/Hive/IShive.jar;/opt/Progress/DataDirect/lib/hive.jar
  • Driver class names: com.ibm.isf.jdbc.hive.HiveDriver; com.ddtek.jdbc.hive.HiveDriver
Note: The class name always includes com.ibm.isf when the JDBC Driver is shipped along with Information Server.