Create the DSN (Data Source Name) by running the ODBC DataSource Adminstrator tool. A System DSN sample for Hive is provided for you to modify.
Description: vorac (or any name you like) Host: vorac.azurehdinsight.net Port: 443 Database: sm_tst611 (or your database name) Mechanism: Azure HDInsight Service User/Password: admin/<your password here>
Download and install ODBC drivers for Apache Hive from HortonWorks: https://www.hortonworks.com/downloads/ .
dpkg -i hive-odbc-native_126.96.36.1994-2_amd64.deb
Create the DSN (Data Source Name) and edit the odbc.ini file. Then, create a DSN for your Hive connection.
Here is an example for HDInsight to setup a connection called "viral":
[ODBC Data Sources] vorac [vorac] Driver=/usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so HOST=vorac.azurehdinsight.net PORT=443 Schema=sm_tst611 HiveServerType=2 AuthMech=6 UID=admin PWD=<your password here> HTTPPath= UseNativeQuery=1
The UseNativeQuery parameter here is very important. Campaign is Hive-aware and will not work correctly unless UseNativeQuery is set. Typically, the driver or Hive SQL Connector will rewrite queries and tamper the column ordering.
The authentication setup depends on the Hive/Hadoop configuration. For instance, for HD Insight, use AuthMech=6 for user/password authentication, as described here.
Setup Hortonworks drivers via /usr/lib/hive/lib/native/Linux-amd64-64/hortonworks.hiveodbc.ini.
You have to use UTF-16 to be able to connect with Campaign and unix-odbc (libodbcinst).
[Driver] DriverManagerEncoding=UTF-16 ErrorMessagesPath=/usr/lib/hive/lib/native/hiveodbc/ErrorMessages/ LogLevel=0 LogPath=/tmp/hive SwapFilePath=/tmp ODBCInstLib=libodbcinst.so