Reputation: 10149
I configured unixodbc to use the hive connector from cloudera in my Linux Mint machine,
but I keep receiving the following error when trying to connect to hive (e.g. using isql -v hive
)
S1000][unixODBC][Cloudera][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.
[ISQL]ERROR: Could not SQLConnect
I think I set the /etc/odbcinst.ini and the ~/.odbc.ini in the correct way:
# content of /etc/odbcinst.ini
[hive]
Description = Cloudera ODBC Driver for Apache Hive (64-bit)
Driver=/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so
ODBCInstLib=libodbcinst.a(libodbcinst.so.1)
UsageCount = 1
DriverManagerEncoding=UTF-16
ErrorMessagesPath=/opt/cloudera/hiveodbc/ErrorMessages/
LogLevel=0
SwapFilePath=/tmp
and my ~/.odbc.ini file contains:
[hive]
Description=Cloudera ODBC Driver for Apache Hive (64-bit) DSN
Driver = hive
ErrorMessagesPath=/opt/cloudera/hiveodbc/ErrorMessages/
# Values for HOST, PORT, KrbHostFQDN, and KrbServiceName should be set here.
# They can also be specified on the connection string.
HOST= <the host>
PORT= <the port>
Schema=<the schema>
# .. etc
Can you help me find out what is causing the error?
Upvotes: 3
Views: 7331
Reputation: 1
Are you sure that you ODBCInstLib is set properly?
I was hitting the same issue with a Vertica driver and my libodbcinst.so.1 ended up needing an absolute path: /usr/lib/x86_64-linux-gnu/libodbcinst.so.1
I determined the path by running a Find for libodbcinst.so.
Upvotes: 0
Reputation: 1143
What does
ldd /opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so
Show you?
It may be that the driver is not linked to libodbcinst.so.
You could try a
LD_PRELOAD=/usr/local/libodbcinst.so
or wherever libodbcinst.so is on your machine.
Upvotes: 10