Need help connecting to Amazon Redshift using odbc driver in RStudio (MacOS)



I am desperately needing help connecting to Amazon Redshift server using an odbc driver. I have followed the "Configuring an ODBC connection" seen here:, 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 = "", 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 Data Sources] Amazon_Redshift_dylib=Amazon Redshift DSN for macOS X

[Amazon Redshift DSN for macOS X] Driver=/opt/amazon/redshift/lib/amazonredshiftodbc.dylib Port=5439 Database=saf locale=en-US


[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.

asked 16 days ago22 views
1 Answer

After installation of Redshift ODBC drivers you also need to configure

Refer Use an ODBC driver manager to configure the driver on Linux and macOS X operating systems

profile picture
answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions