Skip to content

samuelreh/postgres-to-redshift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Copy data from a postgres db into redshift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 66.9%
  • Shell 22.8%
  • Makefile 10.3%