Support Questions

Find answers, ask questions, and share your expertise

Impala ODBC: impala odbc reports: invalid connection string

avatar
New Contributor

Hi,

 

I am trying to connect to impala using ODBC from Ubuntu x64 14.04 machine using iodbc 3.52.7. I copied the /opt/cloudera/impalaodbc/Setup/odbc.ini to /var/tmp/odbc.ini & edited:

 

HOST=localhost

PORT=21050

 

to the [Sample Cloudera Impala DSN 64].

 

$ ODBCINI=/var/tmp/odbc.ini   ./iodbctest

Enter ODBC connect string (? shows list): Sample Cloudera Impala DSN 64
1: SQLDriverConnect = [Cloudera][ODBC] (10360) Invalid connection string. (10360) SQLSTATE=HY000
1: ODBC_Connect = [Cloudera][ODBC] (10360) Invalid connection string. (10360) SQLSTATE=HY000

 

=== log from SimbaImpalaODBC_driver.log ==

Dec 07 18:10:50 DEBUG 1149306688 DSProductHelper::LogProductInfo: Vendor name: Cloudera
Dec 07 18:10:50 DEBUG 1149306688 DSProductHelper::LogProductInfo: Driver name: Cloudera ODBC Driver for Impala
Dec 07 18:10:50 DEBUG 1149306688 DSProductHelper::LogProductInfo: Driver version: 2.5.30.1011
Dec 07 18:10:50 DEBUG 1149306688 DSProductHelper::LogProductInfo: Unknown loaded this 64-bit driver
Dec 07 18:10:50 INFO  1149306688 Driver::LogVersions: SDK Version: 09.03.10.1011
Dec 07 18:10:50 INFO  1149306688 Driver::LogVersions: DSII Version: 2.5.30.1011
Dec 07 18:10:50 INFO  1149306688 Driver::Initialize: Database CHAR Encoding: UTF-8
Dec 07 18:10:50 INFO  1149306688 Driver::Initialize: Database WCHAR Encoding: UTF-16LE
Dec 07 18:10:50 INFO  1149306688 Driver::Initialize: ANSI CHAR Encoding: UTF-8
Dec 07 18:10:50 INFO  1149306688 Driver::Initialize: Driver Manager WCHAR Encoding: UTF-32LE
Dec 07 18:10:50 INFO  1149306688 Driver::Initialize: Locale name: en_US
Dec 07 18:10:50 INFO  1149306688 Driver::Initialize: Bitness: 64-bit
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLAllocHandle: +++++ enter +++++
Dec 07 18:10:50 INFO  1149306688 CInterface::SQLAllocHandle: Allocating environment handle.
Dec 07 18:10:50 TRACE 1149306688 Driver::CreateEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 ImpalaEnvironment::ImpalaEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::RegisterEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLSetEnvAttr: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::GetEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Environment::SQLSetEnvAttr: +++++ enter +++++
Dec 07 18:10:50 INFO  1149306688 Environment::SQLSetEnvAttr: Attribute: SQL_ATTR_ODBC_VERSION (200)
Dec 07 18:10:50 TRACE 1149306688 EnvironmentState1Allocated::SQLSetEnvAttr: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 EnvironmentAttributes::SetAttribute: +++++ enter +++++
Dec 07 18:10:50 INFO  1149306688 EnvironmentAttributes::SetAttribute: Setting ODBC version to: 3
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLAllocHandle: +++++ enter +++++
Dec 07 18:10:50 INFO  1149306688 CInterface::SQLAllocHandle: Allocating connection handle.
Dec 07 18:10:50 TRACE 1149306688 Driver::GetEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Environment::SQLAllocHandle: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 EnvironmentState1Allocated::SQLAllocHandle: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 ImpalaEnvironment::CreateConnection: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 ImpalaConnection::ImpalaConnection: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::RegisterConnection: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLSetConnectAttr: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Connection::SQLSetConnectAttr: +++++ enter +++++
Dec 07 18:10:50 INFO  1149306688 Connection::SQLSetConnectAttr: Attribute: Unknown Attribute (1051)
Dec 07 18:10:50 TRACE 1149306688 ConnectionState::SQLSetConnectAttr: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 ConnectionAttributes::SetAttribute: +++++ enter +++++
Dec 07 18:10:50 INFO  1149306688 ConnectionAttributes::SetAttribute: Invalid attribute: 1051
Dec 07 18:10:50 ERROR 1149306688 Connection::SQLSetConnectAttr: [Cloudera][ODBC] (10210) Attribute identifier invalid or not supported: 1051
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLDriverConnectW: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Connection::SQLDriverConnectW: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 ConnectionState2::SQLDriverConnectW: +++++ enter +++++
Dec 07 18:10:50 ERROR 1149306688 Connection::SQLDriverConnectW: [Cloudera][ODBC] (10360) Invalid connection string.
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLGetDiagRecW: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLGetDiagRecW: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLGetDiagRecW: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLGetDiagRecW: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLFreeHandle: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Environment::SQLFreeHandle: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::UnregisterConnection: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 CInterface::SQLFreeHandle: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::FreeEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::GetEnvironment: +++++ enter +++++
Dec 07 18:10:50 TRACE 1149306688 Driver::UnregisterEnvironment: +++++ enter +++++

===============

1 ACCEPTED SOLUTION

avatar
New Contributor

I was able to fix this by adding the directory containing libiodbc.so to LD_LIBRARY_PATH

View solution in original post

1 REPLY 1

avatar
New Contributor

I was able to fix this by adding the directory containing libiodbc.so to LD_LIBRARY_PATH