unload ('SELECT * from schemaname.tablename')
TO 's3://bucketname/filename'
credentials 'aws_access_key_id=XXXXXX;aws_secret_access_key=XXXXX'
DELIMITER '|'
allowoverwrite
ESCAPE;
copy schemaname.tablename
from 's3://bucketname/filename'
credentials 'aws_access_key_id=XXXXXX;aws_secret_access_key=XXXXX'
DELIMITER '|'
ESCAPE;