Last active
August 29, 2015 14:04
-
-
Save yujihamaguchi/52c92592c071b6ce3d76 to your computer and use it in GitHub Desktop.
[Redshift] UNLOADコマンド
This file contains hidden or 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
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