In this tutorial, we will walk through how to connect to Amazon RedShift from Python on a Windows machine.
1. Download the Progress DataDirect ODBC Driver for Amazon RedShift.
2. Run the executable to install the RedShift ODBC driver.
1. Open ODBC Administrator and click on Add to create the connection. Choose DataDirect 8.0 Amazon Redshift Wire Protocol as the driver.
2. On the configuration window, fill in the Hostname, Port, Database as shown below.
3. Click on Test Connect, fill in your Username and Password to verify if you can connect successfully.
1. To access your Redshift from Python, you must install pyodbc package. Install it by running the below command
2. Now use a sample Python program like below to access your data from Redshift
3. You can either use the connection string with DSN as shown above or you can use the connection string like below and skip configuring your connection in ODBC Administrator.
Feel free to download the Progress DataDirect ODBC Driver for Amazon RedShift and try it out. If you have any questions contact us and we will be happy to help you.