2
votes

Has anybody connected to Amazon Redshift database via excel macros (VBA)? I want to connect to Amazon Redshift database using the same process as I do to connect to Teradata- via connection string from Macrco directly. Can anybody please help?

Teradata i follow this : Conn.ConnectionString = "DRIVER={Teradata};" & "UID=" & suid & ";" & "PWD=" & spwd & ";" & "DBCNAME=" & sdbcnm & ";" & "AUTHENTICATION=;"

1
Please don't use the [macros] tag for Excel/VBA questions. The tag info for it says, *Not for MS-OFFICE / VBA / macro languages. Use the respective tags instead.*Alex Knauth

1 Answers

2
votes

Assuming you have the ODBC driver installed already, you should be able to use an alteration of this string:

Driver={Amazon Redshift (x64)}; 
Server=examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com; 
Database=dev; UID=masteruser; PWD=your_password; Port=5439

Note: If you have the 32 bit version of Excel (most common), you'll need to make sure your connection string (and driver installation) reflect this.

Doc ref: http://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html#obtain-odbc-url