EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB46462: How to configure Hortonworks Hive ODBC connector on Linux for connectivity to a Hortonworks Hadoop system from MicroStrategy Intelligence Server 9.x


Community Admin

• Strategy


The steps below to configure the Hortonworks ODBC driver on Linux

Follow the steps below to configure the Hortonworks ODBC driver on Linux:
 
1. Install the Hortonworks ODBC files on the Linux system that will host the Strategy Intelligence Server.
 
2. Create a DSN to the Hortonworks Hive system by manually adding the following entry to the odbc.ini file (this file is located in the Home Directory of the Strategy installation on Linux):


[ODBC Data Sources]
SampleHortonDriverHDP=Hortonworks Hive ODBC Driver 32-bit

[SampleHortonDriverHDP]
Description=Hortonworks Hive ODBC Driver (32-bit) DSN
Driver=/usr/lib/hive/lib/native/Linux-i386-32/libhortonworkshiveodbc32.so
DriverUnicodeEncoding=2
HOST=<HIVE_HOST_NAME>
PORT=10000
Schema=<schema_name>
FastSQLPrepare=0
UseNativeQuery=0
HiveServerType=2
HS2AuthMech=2
HS2HostFQDN=<fully_qualified_domain_name>
#HS2KrbServiceName=[Hive Server 2 SASL service name]
UserName=root

Notes:
HiveServerType: Set it to 1 for Hive Server and 2 for Hive Server 2.
HS2AuthMech: This is the authentication mechanism to use. Set it to 0 for no authentication, 1 for Kerberos or 2 for User Name.
HS2HostFQDN: The fully qualified domain name of the Hive Server 2 host used.
If Kerberos security is not put in place for the Hadoop cluster, the HS2KrbServiceName parameter can be commented out. For more details on the above parameters, refer to Hortonworks ODBC guide.
 
3. Save and close the odbc.ini file.
 
4. Make a copy of the “.hortonworkshiveodbc.ini” file located under: [ODBC_INSTALLDIR]/Setup and place it in the Strategy home folder. Modify the file as given below (the paths should reflect the installation path of the library and not the actual path referenced below): 

[Driver]
DSILogging=0
ErrorMessagesPath=/usr/lib/hive/lib/native/hiveodbc/ErrorMessages/
ODBCInstLib=libodbcinst.so
DriverManagerEncoding=UTF-8

5. Add the settings for environment variables by adding/editing the <MSTR_HOME_PATH>/env/ODBC.sh file:

# set up the environment for ODBC
#
ODBC_LIBRARY_PATH=/opt/MicroStrategy/install/lib32
mstr_append_path LD_LIBRARY_PATH "${ODBC_LIBRARY_PATH:?}"
export LD_LIBRARY_PATH
SIMBAINI= <MSTR_HOME_FOLDER>/.hortonworks.hiveodbc.ini
export SIMBAINI
#   
# ODBC Driver for Hive   
#   
HIVE_CONFIG='<FULL_PATH_TO_LIB>lib/native/Linux-i386-32'  
    
if [ "${HIVE_CONFIG}" != '<HIVE_CONFIG>' ]; then  
       export HIVE_CONFIG   
    
       mstr_append_path LD_LIBRARY_PATH "${HIVE_CONFIG:?}"/   
       export LD_LIBRARY_PATH   
fi  

6. Save and close the ODBC.sh file.
 
7. Open the odbcinst.ini file and add the following (this file is located in the Home Directory of the Strategy installation on Linux) :
 

[ODBC Drivers]
Hortonworks ODBC driver 32-bit=Installed

[Hortonworks ODBC driver 32-bit]
Description=Hortonworks Hive ODBC driver (32-bit)
Driver=/usr/lib/hive/lib/native/Linux-i386-32/libhortonworkshiveodbc32.so

7. Save and close the odbcinst.ini file.
 
 
Third Party Software Installation WARNING
The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty.
KB46462


Comment

0 comments

Details

Knowledge Article

Published:

May 4, 2017

Last Updated:

February 15, 2019