Configuring the Cloudera ODBC driver

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

Before you begin

Complete the Cloudera driver installation that is described in Installing the Cloudera 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.
    Note: Do not enable Native Query mode in the configuration.

    [Cloudera_HIVE]
    Driver=/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so
    Description=Hive Cloudera ODBC Driver
    Host=<hostname or ip of Hive server on Hadoop Distribution machine>
    Port=<port number of Hive server on Hadoop Distribution machine>
    Schema=<database-name>
    ServiceDiscoveryMode=0
    ZKNamespace=
    HiveServerType=2
    AuthMech=3
    ThriftTransport=1
    UseNativeQuery=0
    UID=cloudera
    GetTablesWithQuery=1

    Note: The UID is the user ID of the Cloudera cluster database.
  2. Assuming that your ODBC driver is installed in the following location:

    /opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so

    Make the following change in Campaign/bin setenv.sh: Set LD_LIBRARY_PATH (LIBPATH for AIX®) to include Cloudera LIB and UnixODBC LIB as follows.

    • LD_LIBRARY_PATH=/opt/HCL/UCD912_Install/Campaign/bin:/opt/ibm/db2/V10.1/lib64/:/usr/lib:/lib:/opt/cloudera/hiveodbc/lib/64/:/usr/local/lib/

      export LD_LIBRARY_PATH

    • ODBCINI=/usr/local/etc/odbc.ini export ODBCINI

  3. Open /opt/cloudera/hiveodbc/lib/64/cloudera.hiveodbc.ini

    During Cloudera installation, a connectivity option is set by default. To connect Cloudera with ODBC, you must disable the connectivity option.

    Change the following lines in cloudera.hiveodbc.ini:
    # Generic ODBCInstLib
    # iODBC
    ODBCInstLib=libiodbcinst.so

    The updated lines appear as:

    # Generic ODBCInstLib
    # iODBC
    ODBCInstLib=libodbcinst.so

What to do next

C. Map existing HBase tables to Hive