Skip to content

Instantly share code, notes, and snippets.

@levi-turner
Created November 11, 2017 00:08
Show Gist options
  • Save levi-turner/95c9d4ff7c76e6bef0513ce6e1c5d92e to your computer and use it in GitHub Desktop.
Save levi-turner/95c9d4ff7c76e6bef0513ce6e1c5d92e to your computer and use it in GitHub Desktop.
To pull in Data to Redshift from S3
COPY Categories FROM 's3://{s3bucket}/sourcedata/Categories.csv' CREDENTIALS 'aws_access_key_id={accesskey};aws_secret_access_key={secretkey}' DELIMITER ',' IGNOREHEADER 1;
COPY Invoices FROM 's3://{s3bucket}/sourcedata/Invoices.csv' CREDENTIALS 'aws_access_key_id={accesskey};aws_secret_access_key={secretkey}' DELIMITER ',' IGNOREHEADER 1;
COPY SKU FROM 's3://{s3bucket}/sourcedata/SKU.csv' CREDENTIALS 'aws_access_key_id={accesskey};aws_secret_access_key={secretkey} ',' IGNOREHEADER 1 CSV QUOTE '"';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment