Created
March 5, 2021 08:11
-
-
Save anbento0490/e6b885f6fd7202c40d0fdc765bacf9a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### INPUT YOUR CREDENTIALS ### | |
DATABASE = "database_name" | |
USER = "your_user_name" | |
PASSWORD = "your_pw" | |
HOST = "company_name.eu-west-1.redshift.amazonaws.com" | |
PORT = "5439" | |
### CREATE A CONNECTION TO REDSHIFT DB | |
connection_string = "postgresql+psycopg2://%s:%s@%s:%s/%s" % (USER,PASSWORD,HOST,str(PORT),DATABASE) | |
engine = sa.create_engine(connection_string) | |
connection = engine.connect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment