Hello,
I am desperately needing help connecting to Amazon Redshift server using an odbc driver. I have followed the "Configuring an ODBC connection" seen here: https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html#obtain-odbc-url, but unable to figure out what's wrong with my setup.
I have tried the code suggested by R like this:
con <- DBI::dbConnect(odbc::odbc(),
Driver = "/opt/amazon/redshift/lib/amazonredshiftodbc.dylib",
Host = "rhealth-prod-4.cldcoxyrkflo.us-east-1.redshift.amazonaws.com",
Schema = "dev",
Port = 5439)
I get the following error:
Error: nanodbc/nanodbc.cpp:1118: 00000: [Amazon][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function: [Amazon][DSI] An error occurred while attempting to retrieve the error message for key 'LibsLoadErr' with message parameters ['""'] and component ID 3: Message not found in file "/opt/amazon/redshift/ErrorMessages/en-US/ODBCMessages.xml"
The odbc.ini and odbcinst.ini files are in my /User/ location so I shouldn't need to set environment variables, unless I am missing something, but here are my configuration files:
odbc.ini:
[ODBC Data Sources]
Amazon_Redshift_dylib=Amazon Redshift DSN for macOS X
[Amazon Redshift DSN for macOS X]
Driver=/opt/amazon/redshift/lib/amazonredshiftodbc.dylib
Host=rhealth-prod-4.cldcoxyrkflo.us-east-1.redshift.amazonaws.com
Port=5439
Database=saf
locale=en-US
odbcinst.ini:
[ODBC Drivers]
Amazon_Redshift_dylib=Installed
[Amazon_Redshift_dylib]
Description=Amazon Redshift DSN for macOS X
Driver=/opt/amazon/redshift/lib/amazonredshiftodbc.dylib
Any insight would be greatly appreciated.