Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morrislaptop/tap-gocardless
Singer.io tap for extracting data from GoCardless.
https://github.com/morrislaptop/tap-gocardless
gocardless singer-tap
Last synced: 6 days ago
JSON representation
Singer.io tap for extracting data from GoCardless.
- Host: GitHub
- URL: https://github.com/morrislaptop/tap-gocardless
- Owner: morrislaptop
- License: agpl-3.0
- Created: 2021-10-09T07:38:35.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-14T09:32:13.000Z (about 3 years ago)
- Last Synced: 2024-11-07T11:53:14.135Z (about 2 months ago)
- Topics: gocardless, singer-tap
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tap-gocardless
This is a [Singer](https://singer.io) tap that produces JSON-formatted data
following the [Singer spec](https://github.com/singer-io/getting-started/blob/master/SPEC.md).This tap:
- Pulls raw data from [GoCardless](https://gocardless.com/)
- Extracts the following resources:
- [Events](https://developer.gocardless.com/api-reference/#events-list-events)
- [Payments](https://developer.gocardless.com/api-reference/#payments-list-payments)
- [Payouts](https://developer.gocardless.com/api-reference/#payouts-list-payouts)
- [Payout Items](https://developer.gocardless.com/api-reference/#payout-items-get-all-payout-items-in-a-single-payout)
- Outputs the schema for each resource
- Incrementally pulls data based on the input state## Quick Start
Install the tap and helpers
python3 -m venv ~/.virtualenvs/tap-gocardless
source ~/.virtualenvs/tap-gocardless/bin/activate
pip3 install tap-gocardless https://github.com/chrisgoddard/singer-discover/archive/master.zipObtain an access token via https://developer.gocardless.com/getting-started/api/making-your-first-request/#creating-an-access-token
Create a `config.gocardless.json` file with the following
```
{
"access_token": "sandbox_xxxxxx",
"start_date": "2017-01-01T00:00:00.000Z",
"user_agent": ""
}
```Run the tap in Discover mode and select which data you would like to extract:
tap-gocardless --config config.gocardless.json --discover | singer-discover -o catalog.json
Run the tap in sync mode
tap-gocardless --config config.gocardless.json --catalog catalog.json
Run the tap with a target, e.g. postgres
tap-gocardless --config config.gocardless.json --catalog catalog.json | target-postgres --config config.postgres.json >> state.json
tail -1 state.json > state.json.tmp && mv state.json.tmp state.json---
Copyright © 2021 @morrislaptop