Created on 09-20-2023 04:55 AM - edited 09-20-2023 05:12 AM
I'm trying to connect to Impala on a new mac (M2 Chip). I followed all the steps here for unixODBC. I confirmed that my unixODBC install is working and that the Cloudera driver installed properly.
When I run `odbcinst -j` I get:
unixODBC 2.3.12
DRIVERS............: /opt/homebrew/etc/odbcinst.ini
SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.ini
FILE DATA SOURCES..: /opt/homebrew/etc/ODBCDataSources
USER DATA SOURCES..: /Users/willhipson/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Here's my odbcinst.ini
[ODBC Drivers]
Cloudera ODBC Driver for Impala=Installed
[Impala]
Description=Cloudera ODBC Driver for Impala
Driver=/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib
And here's the first few lines of my odbc.ini
[ODBC]
[ODBC Data Sources]
Impala=Cloudera ODBC Driver for Impala
[Impala]
Description=Cloudera Impala ODBC Driver DSN
Driver=Impala
I have confirmed that the driver exists in `/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib`
When I try to run `isql -v Impala` in the terminal I get the error:
[01000][unixODBC][Driver Manager]Can't open lib '/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib' : file not found
[ISQL]ERROR: Could not SQLConnect
I have been struggling to resolve this for several days and have scoured SO, blog posts, and this forum for help but nothing seems to work. Hoping to resolve soon.
Created 09-20-2023 11:50 AM
@ipson Welcome to the Cloudera Community!
To help you get the best possible solution, I have tagged our Impala expert @bbreak who may be able to assist you further.
Please keep us updated on your post, and we hope you find a satisfactory solution to your query.
Regards,
Diana Torres,Created 09-25-2023 02:54 PM
@mszurap Any insights here? Thanks!
Regards,
Diana Torres,Created 01-24-2024 06:23 AM
Did this ever get resolved? I am experiencing the same issue and cannot find any solution.
Created 02-13-2024 05:03 AM
No I'm still struggling with ODBC.
Created 02-15-2024 02:08 PM
Dang, that is really a shame. I submitted a ticket for this to support will share if they come up with any solution.
Created 02-28-2024 07:48 AM
@ipson I just figured this out with the help of one of my co-workers. The key for me was to edit the following to the file
/opt/cloudera/impalaodbc/lib/universal/cloudera.impalaodbc.ini
I had to add the location of the homebrew odbc lib file, for me, editing it to this worked:
[Driver]
ErrorMessagesPath=/opt/cloudera/impalaodbc/ErrorMessages/
LogLevel=0
LogPath=
ODBCInstLib=/opt/homebrew/lib/libodbcinst.dylib
Created 02-29-2024 06:01 AM
Thanks @nhassell , that's resolving the 'cannot locate driver' issue. Now I'm just hitting my head against pesky host/port configuration problems. For the life of me, I cannot get past:
```
[S1000][unixODBC][Cloudera][DriverSupport] (1170) Unexpected response received from server. Please ensure the server host and port specified for the connection are correct.
```
Obviously I'm doing something wrong. But your suggestion solved the issue around the driver library, so thanks.
Created 02-29-2024 07:21 AM
My odbc.ini looks like the following:
Created 09-26-2024 08:02 AM
I finally had success using HTTP transport. My .odbc.ini looks something like this:
```
[ODBC]
; Specify any global ODBC configuration here such as ODBC tracing.
[ODBC Data Sources]
Impala = Cloudera ODBC Driver for Impala
[Impala]
Driver=/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib
Description=Cloudera Impala ODBC Driver DSN
Host=[datahub-name]-master0.hiaa-cdp.uvmh-kdle.a4.cloudera.site
Port=443
Schema=default
AuthMech=3
UseSASL=1
SSL=1
TransportMode=http
httpPath=[datahub-name]/cdp-proxy-api/impala
```