cannot connect to amazon redshift database using odbc driver on MacOS

I am needing to connect to an amazon redshift database in my Mac. Here's the code I've tried:

conn <-

dbConnect(

drv = odbc::odbc(),

driver="{Amazon Redshift (x64)}",

servername = "server url",

user = "username",

password = "password",

database = "database name",

port = "xxxx")

I get the following error:

Error: nanodbc/nanodbc.cpp:1118: 00000: [unixODBC][Driver Manager]Can't open lib 'Amazon Redshift (x64)' : file not found

if I use RStudio's default "new connection" line like below:

con <- dbConnect(odbc::odbc(), "/opt/amazon/redshift/lib/libamazonredshiftodbc.dylib", timeout = 10)

I get the following error:

Error: nanodbc/nanodbc.cpp:1118: 00000: [unixODBC][Driver Manager]DRIVER keyword syntax error

Does anyone know what I need to do here? I've been stuck at this for awhile and my IT department cannot help.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.