graveyard / postgres-to-redshift

Copy data from a postgres db into redshift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postgres-to-redshift

postgres-to-redshift copies postgres data to redshift via S3. This repository is golang adaptation of the original script by Donors Choose at https://github.com/DonorsChoose/open-data-science/tree/master/postgres2redshift.

Running

AWS_REGION='us-east-1' \
godep go run main.go \
-redshifthost=<host> \
-redshiftport=<port> \
-redshiftuser=<user> \
-redshiftpassword=<password> \
-redshiftdatabase=<database> \
-redshiftschema=<schema> \
-postgreshost=<host> \
-postgresdatabase=<database> \
-postgresuser=<user> \
-postgresport=<port> \
-postgrespassword=<password> \
-s3prefix=<prefix> \
-tables=<tables_csv>

In production, the binary is run on gearman using a standalone worker run as a cron job.

Vendoring

Please view the dev-handbook for instructions.

About

Copy data from a postgres db into redshift

License:Apache License 2.0


Languages

Language:Go 75.9%Language:Makefile 22.5%Language:Dockerfile 1.6%