Last active
October 8, 2018 21:13
-
-
Save adam704a/f0f224826e4063cd49cef5b4830c85ae to your computer and use it in GitHub Desktop.
export postgres query to s3 as CSV
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
#!/bin/sh | |
psql -h localhost hhis -U hhis -c "\copy (SELECT * FROM _view_events) to './dhis2-export.tsv' WITH NULL AS ''" | |
aws s3 cp dhis2-export.tsv s3://spla-dhis2/dhis2-export.tsv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.