Code Monkey home page Code Monkey logo

postgres-to-redshift's Introduction

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.

postgres-to-redshift's People

Contributors

bgveenstra avatar bstein-clever avatar cozmo avatar johnhuangclever avatar mohit avatar natebrennand avatar nathanleiby avatar peggyl avatar prime-time avatar renatoprime avatar rgarcia avatar sayan- avatar xavi- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postgres-to-redshift's Issues

How to disable SSL

Hi - I need to set the SSL flag to be false. Super new to using go and unsure how to change the import statements in main.go after editing the postgres.go file to change SSL: false.

Thank you!

dump only few rows of the table based on attributes

hi ,

I want understand if there is anysupport to dump only few rows or columns of the table by running custom sql queries instead of just giving the table names.

I do not want to do whole table dumps every run .
please let me know if there is any way to do that using this service .

Best,
shashi

Leverage new s3-to-redshift library

Godeps isn't working for me locally. It's saying that redshifter isn't available. Looks like the repo changed to s3-to-redshift. Would be nice to get this library up to date w/ latest code

local error: no renegotiation

I get local error: no renegotiation when dumping my larger tables.

Might be related to golang/go#5742

Any ideas on what I could do? Maybe I should write something that splits it into smaller COPY commands.

not enough arguments in call to redshift.NewRedshift

When calling NewRedshift from main.go there are no args passed:

if *updateRS {
        r, err := redshift.NewRedshift()

https://github.com/Clever/postgres-to-redshift/blob/master/main.go#L45

However, from the redshifter library it looks like all the connection args are required:

func NewRedshift(host, port, db, user, password string, timeout int, s3Info S3Info) (*Redshift, error) {

https://github.com/Clever/postgres-to-redshift/blob/master/vendor/github.com/Clever/redshifter/redshift/redshift.go#L79

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.