This tutorial covers the following scenarios for connecting to Hive:
The following demonstrates DSN-less connectivity in Strategy Desktop 10.9 for Windows:
We also demonstrate DSN-less connectivity in Strategy Desktop 10.9 for Mac:
Connectivity was also demonstrated for Strategy Web 10.9:
Connectivity information
MapR Hive:

Cloudera Hive:

Amazon EMR Hive:

Apache Hive:

Hortonworks Hive:

Amazon EMR Hive with Kerberos support:

Hive DSN:

For more information on how to enable SSL on HiveServer2 and connect to Strategy 10.8 and above, click here.
The following demonstrates an ODBC Connection to HiveServer2 with the Strategy DB Query Tool:
We also demonstrate a connection to HiveServer2 with SSL Enable via 2-way SSL options in Strategy Web:
Connectivity is also demonstrated for HiveServer2 via SSL through a self signed certificate in Strategy Web:


The JDBC driver is supported only on Mac. The configuration for the Hive driver is the same as shown above for the DSN-less ODBC driver. From an end-user perspective, there is no difference between an ODBC and JDBC driver.
Configuration consists of three steps: create database instance, create a database connection, and configure and store credentials.

2. Create a database connection that points to the DSN:


In this example, we are connecting to the “Interactive Hive” interface (LLAP).
Step 1: Once a HDP 2.5 or HDP 2.6 Hadoop cluster is setup, enable Interactive Query mode (LLAP).
Step 2: Set up a DSN via ODBC Administrator (64 bit). You can do this using the Strategy Hive ODBC Driver or Hortonworks ODBC Driver for Hive.
Fill in the required parameters. The Service Discovery mode can be either “No Service Discovery” or Zookeeper. If you have additional zookeeper parameters, then enable Zookeeper as the discovery mode. If not, then the default of “No service Discovery” should work.
When HDP is setup using Hortonworks Data Cloud, then the default mode of connection is HTTP and the value for hive.server2.thrift.http.port is 10501. This is the port number we will use to connect via ODBC.
Also by default, Mechanism should be selected as “Username and Password”. You can use username: hive and password: hive to connect.
Step 3: Under Thrift Transport option, select HTTP as the mode of transport.
Step 4: Click on HTTP Options, and add: cliservice to the HTTPPath.
Example Screenshots are below. Test connect should work successfully.

HTTP Options:

Step 5: Once ODBC DSN is created, you can make a connection through Strategy’s DBQuery tool to connect and run queries.
Step 6: Following a successful connection, you can setup Strategy’s DB Instance to point to the above DSN just created and further run queries to analyze and build cubes/reports.
As with the previous tutorial, we are connecting to the “Interactive Hive” interface(LLAP).
Step 1: Once a HDP 2.5 or HDP 2.6 Hadoop cluster is setup, enable Interactive Query mode(LLAP).
Step 2: Set up a DSN by editing the odbc.ini under Strategy installation folder. Use the Strategy Hive ODBC Driver that is shipped with the product to create this DSN.
Fill in the required parameters. The Service Discovery mode can be either “No Service Discovery” or Zookeeper. If you have additional zookeeper parameters, then enable Zookeeper as the discovery mode. If not, then the default of “No service Discovery” should work.
When HDP is setup using Hortonworks Data Cloud, then the default mode of connection is HTTP and the value for hive.server2.thrift.http.port is 10501. This is the port number we will use to connect via ODBC.
Step 3: Under ThriftTransport option, select HTTP as the mode of transport.
Step 4: Also add the parameter value “cliservice” to the HTTPPath.
Example ODBC.ini entry is below.
[ODBC Data Sources]
Hive Driver=Strategy Hive ODBC Driver
[Hive Driver]
Driver= /opt/MicroStrategy/Strategy-Linux/install/lib/libhiveodbc_sb64.so
Description=Strategy Hive ODBC Driver
AuthMech=3
DefaultStringColumnLength=2147483647
FastSQLPrepare=0
GetTablesWithQuery=1
HiveServerType=2
HTTPPath=cliservice
Host=<hostname>
Port=10501
Schema=default
ServiceDiscoveryMode=0
ZKNamespace=
ThriftTransport=2
UseNativeQuery=1
KrbHostFQDN=[Hive Server 2 Host FQDN]
KrbServiceName=[Hive Server 2 Kerberos service name]
KrbRealm=[Hive Server 2 Kerberos realm]
SSL=0
TwoWaySSL=0
ClientCert=
ClientPrivateKey=
ClientPrivateKeyPassword=
Testing connectivity should work successfully following this ODBC creation.
When connecting to data sources using DSNs, the Strategy Hive ODBC driver provides several advanced options, including the following:
From a Strategy perspective, Hive Server Type relates to whether or not native catalog functions are used to retrieve catalog information (for Hive Server 2), or if ODBC catalog functions are used (Hive Server 1).
This option can be utilized when creating a DSN connection to Hive, or additionally when creating a DSN-less connection to Hive. Users can update the value for this setting in the DSN-less connection by updating the connection string used.







DRIVER={Strategy Hive ODBC Driver};HOST=hivetest;PORT=10000;SCHEMA=ubd;HiveServerType=2;GetTablesWithQuery=1;UseNativeQuery=1;DefaultStringColumnLength=4000;
When connecting to data sources using DSNs, the Strategy Hive ODBC driver provides several advanced options including the following:
Get Tables with Query* is used to determine whether:
*This is only applicable for configurations using Hive Server 2. (Source)
This options can be utilized when creating a DSN connection to Hive, or additionally when creating a DSN-less connection to Hive. Users can update the value for this setting in a DSN-less connection by updating the connection string used.







DRIVER={Strategy Hive ODBC Driver};HOST=hivetest;PORT=10000;SCHEMA=ubd;HiveServerType=2;GetTablesWithQuery=1;UseNativeQuery=1;DefaultStringColumnLength=4000;