Configuring the mapr.hiveodbc.ini
File
Describes how to configure the Data Fabric ODBC Driver with SQL Connector for Apache Hive to work with your ODBC driver manager.
About this task
To configure the Data Fabric ODBC Driver with SQL Connector for Apache Hive to work with your ODBC driver manager:
Procedure
-
Open the
.mapr.hiveodbc.ini
configuration file in a text editor.The following is an example of the.mapr.hiveodbc.ini
file template:[Driver] ErrorMessagesPath=/opt/mapr/hiveodbc/ErrorMessages/ LogLevel=0 LogPath= SwapFilePath=/tmp
-
Edit the
DriverManagerEncoding
setting. The value usually must beUTF-16
orUTF-32
, depending on the ODBC driver manager you use. iODBC uses UTF-32 and unixODBC uses UTF-16. Consult your ODBC Driver Manager documentation for the correct setting to use. -
Edit the
ODBCInstLib
setting. The value is the name of the ODBCInst shared library for the ODBC driver manager you use. The configuration file defaults to the shared library for iODBC. In Linux, the shared library name for iODBC islibiodbcinst.so
.The following is an example of theNOTEConsult your ODBC driver manager documentation for the correct library to specify. You can specify an absolute or relative filename for the library. If you intend to use the relative filename, then the path to the library must be included in the library path environment variable. In Linux, the library path environment variable is namedLD_LIBRARY_PATH
..mapr.hiveodbc.ini
file with filledDriverManagerEncoding
andODBCInstLib
settings:$ cat /etc/.mapr.hiveodbc.ini [Driver] ErrorMessagesPath=/opt/mapr/hiveodbc/ErrorMessages/ LogLevel=0 LogPath= SwapFilePath=/tmp #add for unixODBC DriverManagerEncoding=UTF-16 ODBCInstLib=libodbcinst.so
-
Save the
.mapr.hiveodbc.ini
configuration file.