Giter Club home page Giter Club logo

tap-stripe's Introduction

tap-stripe

This is a Singer tap that produces JSON-formatted data following the Singer spec.

Installation

See the getting-started guide:

https://github.com/singer-io/getting-started

Usage

This section dives into basic usage of tap-stripe by walking through extracting data from the api.

Create the configuration file

Create a config file containing the stripe credentials, e.g.:

{
  "client_secret": "sk_live_xxxxxxxxxxxxxxxxxxxxxxxx",
  "account_id": "acct_xxxxxxxxxxxxxxxx",
  "start_date": "2017-01-01T00:00:00Z",
  "request_timeout": 300,
  "lookback_window": 600,
  "event_date_window_size": 7,
  "date_window_size": 30
}

Discovery mode

The tap can be invoked in discovery mode to find the available stripe entities.

$ tap-stripe --config config.json --discover

A discovered catalog is output, with a JSON-schema description of each table. A source table directly corresponds to a Singer stream.

Field selection

In sync mode, tap-stripe consumes the catalog and looks for streams that have been marked as selected in their associated metadata entries.

Redirect output from the tap's discovery mode to a file so that it can be modified:

$ tap-stripe --config config.json --discover > catalog.json

Then edit catalog.json to make selections. The stream's metadata entry (associated with "breadcrumb": []) gets a top-level selected flag, as does its columns' metadata entries.

[
  {
    "breadcrumb": [],
    "metadata": {
      "valid-replication-keys": [
        "created"
      ],
      "table-key-properties": [
        "id"
      ],
      "forced-replication-method": "INCREMENTAL",
+      "selected": "true"
    }
  },
]

Sync mode

With a catalog.json that describes field and table selections, the tap can be invoked in sync mode:

$ tap-stripe --config config.json --catalog catalog.json

Messages are written to standard output following the Singer specification. The resultant stream of JSON data can be consumed by a Singer target.


Copyright © 2018 Stitch

tap-stripe's People

Contributors

dmosorast avatar kspeer825 avatar luandy64 avatar bhtowles avatar justedro avatar zachharris1 avatar harrisonmarcrose avatar rdeshmukh15 avatar cosimon avatar aiguofer avatar rushit0122 avatar pquadri avatar noahfisher avatar kallan357 avatar dsprayberry avatar jacobrobertbaca avatar leslievandemark avatar nick-mccoy avatar prijendev avatar namrata270998 avatar jyothinarayansetty avatar sgandhi1311 avatar asaf-erlich avatar bryantgray 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.