Code Monkey home page Code Monkey logo

target-s3's Introduction

target-s3

This is a Singer target that puts data in an S3 bucket. Data piped to the target must follow the Singer spec. Currently this target supports no state parameter, it simply copies all injected data to S3.

Based on the Python Singer.io target template

Example

Provided the following configuration is passed to the target

{
  "bucket_name": "do-da-airflow-files-stg",
  "buffer_size": 10
}

one can target-s3 singer records like

echo '{"type": "RECORD", "stream": "json-paths", "record": {"ke1": "val1", "key2": "val2"}}' |\
target-s3

and, provided bucket do-da-airflow-files-stg exists, a new S3 object will be created in the bucket

# on json-paths/2019-04-29T12:18:57.335226
{"ke1": "val1", "key2": "val2"}

Overriding configuration

The configurations in the file can be overriden with the command line parameter --overrides, which takes configuration overrides in a JSON string and applies them over the passed config file (if any). So

target-s3 -c config.conf --overrides '{"buffer_size": 1000}'

will override the buffer_size parameter for that particular execution.

Run

To install the target-s3 utility as a system command, create and activate a Python3 virtual environment

$ cd target-foobar
$ python3 -m venv ~/.virtualenvs/target-s3
$ source ~/.virtualenvs/target-s3/bin/activate

and install the package

$ pip install -e .

If you prefer not to install the package, you can still run the target with python3 target_s3/__init__.py

target-s3's People

Contributors

dcereijodo avatar

Watchers

 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.