Created
December 6, 2018 17:42
-
-
Save diogo22santos/77195a810a3d7364f8879b8f11c56b4c to your computer and use it in GitHub Desktop.
redshift
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
import pandas_redshift as pr | |
pr.connect_to_redshift(dbname = 'YOU_DATABASE', host = 'YOUR_HOST', port = 'YOUR_PORT', | |
user = 'YOUR_USER', password = 'YOUR PASSWORD') | |
pr.connect_to_s3(aws_access_key_id = 'YOUR_ACCESS_KEY_ID', aws_secret_access_key = 'YOUR_aCCESS_KEY', | |
bucket = 'BUCKET_TO_LOAD') | |
pr.pandas_to_redshift(data_frame = 'DATA_FRAME_TO_LOAD', redshift_table_name = 'TABLE_IN_REDSHIFT_TO_LOAD') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment