Giter VIP home page Giter VIP logo

rsdl's Introduction

RSDL

Redshift DownLoader is a small tool that allows one to stream Redshift or PostgreSQL tables and views as TAB Separated data.

Docker

Use the included Dockerfile to build a docker image which can be deployed to CF directly.

$ git clone https://github.com/philips-labs/rsdl.git
$ cd rsdl
$ docker build -t rsdl .

Deployment

See the below manifest.yml file as an example.

---
applications:
- name: rsdl
  docker:
    image: loafoe/rsdl:latest
  instances: 1
  memory: 64M
  disk_quota: 128M
  routes:
  - route: my-rsdl.eu-west.philips-healthsuite.com
  env:
    RSDL_PASSWORD: RandomPassw0rdHer3
    RSDL_SCHEMA: default_schema
  services:
  - redshift

Endpoints

The following endpoints are available

Endpoint Description
/redshift/default_schema/:table/full.csv Dumps :table from default_schema
/redhsift/:schema/:table/full.csv Dumps :table from given :schema

Configuration

Environment variable Description Default value
RSDL_PASSWORD The password to use. Hardcoded username is redshift
RSDL_SCHEMA The default schema to use
RSDL_GZIP Enable or disable GZIP compression true

Usage

curl -uredshift:RandomPassw0rdHer3 https://my-rsdl.eu-west.philips-healthsuite.com:4443/redshift/myschema/mytable/full.csv > mytable_full.csv

Tips for Cloud foundry deployments

  • Use port 4443 in your URL e.g. https://my-rsdl.eu-west.philips-healthsuite.com:4443/redshift/mydb/mytable

Using port 4443 will allow the app to detect dropped connections. This ensures that streaming stops if the client connection is dropped. Otherwise the full request will continue to run potentially wasting resources and tying up a DB connection.

  • Try with and without GZIP compression enabled

If you have a very fast connection then compressing the data might actually make tranfers slower. When testing on a 500Mbit fiber connection we found streaming data rates were higher with compression disabled.

Maintainers

See MAINTAINERS.md

License

License is MIT

rsdl's People

Contributors

dependabot[bot] avatar loafoe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.