Skip to content

Instantly share code, notes, and snippets.

@landon9720
Created February 2, 2016 19:39
Show Gist options
  • Save landon9720/095f9b9cda0cd009ba71 to your computer and use it in GitHub Desktop.
Save landon9720/095f9b9cda0cd009ba71 to your computer and use it in GitHub Desktop.
copy compressed csv file from s3 to psql
aws s3 cp s3://your_bucket/your_key - | gzcat | pv | psql your_db -c "copy your_table from stdin delimiter ',' csv;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment