Configuring the Hortonworks Hive ODBC driver

If you are using the Hortonworks Hive ODBC driver to integrate Unica Campaign with a big data source, you must configure the driver after installing it.

Before you begin

Complete the Hortonworks driver installation that is described in Installing the Hortonworks Hive ODBC driver.

Procedure

  1. Modify the ODBC.ini file to specify the Hive server information, using the values shown in the following example. Be sure to customize the items in bold to match your own configuration.

    The default location of odbc.ini file is: /usr/lib/hive/lib/native/hiveodbc/Setup/odbc.ini

    [ODBC] [ODBC Data Sources] HWDS [HWDS] Description=Hortonworks Hive ODBC Driver (64-bit)
    DSN Driver=/usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so
    HOST=<hostname or ip of Hive server on Hadoop Distribution machine>
    PORT=<port number of Hive server on Hadoop Distribution machine>
    Schema=<schema-name>
    ServiceDiscoveryMode=0
    ZKNamespace=
    HiveServerType=2
    AuthMech=2
    ThriftTransport=1
    UseNativeQuery=0
    UID=hue
    KrbServiceName=<Hive Server 2 Kerberos service name>
    KrbRealm=<Hive Server 2 Kerberos realm>
    SSL=0
    TwoWaySSL=0
    ClientCert=
    ClientPrivateKey=
    ClientPrivateKeyPassword=

  2. Enable the unixODBC manager and disable Generic ODBCInstLib in the hortonworks.hiveodbc.ini as follows.

    The default location of hortonworks.hiveodbc.ini is /usr/lib/hive/lib/native/Linux-amd64-64/hortonworks.hiveodbc.ini.

    Comment out the following line by adding a hash character (#) at the beginning: # ODBCInstLib=libiodbcinst.so

    Un-comment the following line by removing the hash character (#) at the beginning: ODBCInstLib=/usr/local/unixODBC/lib/libodbcinst.so

  3. Edit the Campaign/bin/setenv.sh as follows.
    1. Ensure that your LD_LIBRARY_PATH includes the following path: /usr/local/unixODBC/lib
    2. Set your ODBCINI variable to point to the correct INI file.
      For example:

      ODBCINI=/usr/lib/hive/lib/native/hiveodbc/Setup/odbc.ini

      export ODBCINII

      HORTONWORKSHIVEINI=/usr/lib/hive/lib/native/Linux-amd64-64/hortonworks.hiveodbc.ini

      export HORTONWORKSHIVEINI

What to do next

C. Map existing HBase tables to Hive