Last active
October 3, 2016 12:11
-
-
Save kerbelp/7efc0dfbadbfc12366cf6ee10b297ca9 to your computer and use it in GitHub Desktop.
This file contains 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 "ts", "column_a", "column_b" | |
FROM schema.table | |
WHERE ts >= (SELECT DATE_TRUNC(\'day\', (SELECT sysdate - 1))) | |
AND ts < (SELECT DATE_TRUNC(\'day\', (SELECT sysdate)))' | |
) | |
TO 's3://bucket/prefix' | |
GZIP | |
ESCAPE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment