Skip to content
This repository was archived by the owner on Jul 13, 2022. It is now read-only.

KaiaHealth/postgres_to_redshift

Repository files navigation

PostgresToRedshift

This gem copies data from postgres to redshift. It's especially useful to copy data from postgres to redshift in heroku.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'postgres_to_redshift', git: 'git@github.com:KaiaHealth/postgres_to_redshift.git'

And then execute:

$ bundle

Or install it yourself as:

$ gem install postgres_to_redshift

Usage

Set your source and target databases, as well as your s3 intermediary.

export DROP_TABLE_BEFORE_CREATE='true'
export POSTGRES_TO_REDSHIFT_EXCLUDE_TABLES='table1,table2'
export POSTGRES_TO_REDSHIFT_INCLUDE_TABLES='table2,table3'
export POSTGRES_TO_REDSHIFT_SOURCE_PASSWORD='source_password'
export POSTGRES_TO_REDSHIFT_SOURCE_URI='postgres://username:password@host:port/database-name'
export POSTGRES_TO_REDSHIFT_TARGET_PASSWORD='target_password'
export POSTGRES_TO_REDSHIFT_TARGET_SCHEMA='production'
export POSTGRES_TO_REDSHIFT_TARGET_URI='postgres://username:password@host:port/database-name'
export S3_DATABASE_EXPORT_BUCKET='some-bucket-to-use'
export S3_DATABASE_EXPORT_ID='yourid'
export S3_DATABASE_EXPORT_KEY='yourkey'

postgres_to_redshift

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages