3

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.

Phil
  • 7,287
  • 3
  • 36
  • 66

2 Answers2

1

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.

  • In my case, there wasn't a default value even set, so I had to add the following line. Also worth noting that I had to specify the full path; the combination of the `DYLD_LIBRARY_PATH` environment variable with the filename alone did **not** work - `ODBCInstLib=/usr/local/iODBC/lib/libiodbcinst.dylib` – mkirzon May 21 '21 at 20:23
0

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"

yutellite
  • 21
  • 4