Skip to content

Instantly share code, notes, and snippets.

@agalea91
Last active October 24, 2020 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agalea91/4bc35afa7cc5818f0b194f5e8a55ba4e to your computer and use it in GitHub Desktop.
Save agalea91/4bc35afa7cc5818f0b194f5e8a55ba4e to your computer and use it in GitHub Desktop.
Redshift unload to s3
unload ('
select * from my_table_name
where <date_range_where_clause>
')
to 's3://my-bucket/my_table_name/'
credentials 'aws_access_key_id=<key_id>;aws_secret_access_key=<secret_key>'
delimiter '\t'
allowoverwrite
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment