Simba Athena ODBC: unable to use SQLGetPrivateProfileString functions

1.6k views Asked by At

This is very strange, I want to setup a connection from RStudio to my instance in AWS Athena.

I am using unixodbc as the driver manager, and succeded by testing the connection using isql -v 'Simba Athena'. However, when I test the connection in RStudio with...

con <- DBI::dbConnect(
  odbc::odbc(),
  "Simba Athena"
)

... it gives me the error Error: nanodbc/nanodbc.cpp:1021: 00000: [Simba][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.. Any clue about it, I am a bit stuck.

2

There are 2 answers

1
Carlos G. Cardenas V. On BEST ANSWER

It is basically not finding the correct ODBC driver. Simba by default references the driver in its /Library/simba/athenaodbc/lib/simba.athenaodbc.ini setup file to libodbc.dylib but it should be libodbcinst.dylib. At least in MacOS.

This solved my problem.

1
yutellite On

I got the same error when I link with static library of "libodbc.a", however I can succeed to connect when I change to link with dynamic library of "libodbc.so"