Skip to content

Instantly share code, notes, and snippets.

@ufuk
Created January 31, 2019 14:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ufuk/de35377909c5c0190a22ca1c94e7d0cc to your computer and use it in GitHub Desktop.
Save ufuk/de35377909c5c0190a22ca1c94e7d0cc to your computer and use it in GitHub Desktop.
Import CSV file from S3 into AWS Redshift
-- Before importing, you need to create table
CREATE TABLE example_table
(
...
);
-- Importing...
COPY example_table
FROM 's3://<BUCKET_NAME>/.../example_table.csv'
CREDENTIALS 'aws_access_key_id=...;aws_secret_access_key=...'
CSV;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment