Access Amazon Redshift data from Python

Amazon Redshift is a fully managed server-less service from the Amazon Web Services that belongs to the category of RDS (Relational Database Systems).

SQL can be used to query data from Redshift. Redshift is typically used for OLAP (Online Analytics and Processing) applications and serves as a powerful data warehouse.

Amazon Redshift

If you as a Developer or Data Scientist or Data Engineer you would like to query data from the Redshift database, you can use tools such as dbeaver.

The other way can be using python and this article will help you for that. Please follow the steps below.

Step 1: Import Dependencies (Install using pip)

Step 2: Set Up Configurations

You should provide the following information.

  • Host Name
  • Database Name
  • User Name
  • Password

Step 3: Query your Data

That was it and it should work. In case of error please try to check for the security groups and inbound rules for your IP.



Full-Stack Data Scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store