Skip to content

Instantly share code, notes, and snippets.

@yujihamaguchi
Last active August 29, 2015 14:04
Show Gist options
  • Save yujihamaguchi/52c92592c071b6ce3d76 to your computer and use it in GitHub Desktop.
Save yujihamaguchi/52c92592c071b6ce3d76 to your computer and use it in GitHub Desktop.
[Redshift] UNLOADコマンド
UNLOAD ('SELECT * FROM <table name>')
TO 's3://<bucket name>/<dir name>/'
CREDENTIALS 'aws_access_key_id=<access key>;aws_secret_access_key=<secret key>'
NULL AS 'This is null value'
GZIP;
-- One File
UNLOAD ('SELECT * FROM <table name>')
TO 's3://<bucket name>/<dir name>/'
CREDENTIALS 'aws_access_key_id=<access key>;aws_secret_access_key=<secret key>'
NULL AS 'This is null value'
PARALLEL OFF GZIP;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment