Singer.io Tap Core features
Project description
Tap Core
Singer tap core provide safe tools to easily build new taps
following the Singer spec convention and protocol.
How to use it
tap-core
is a Singer Tap which intend to work with regular Singer Tap.
The Goal is to use this package as a foundation to build other taps focusing on the core tools, reducing the energy spent on maintaining the common parts.
Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? Use the template at the bottom!
Install
First, make sure Python 3 is installed on your system or follow these installation instructions for Mac or Ubuntu.
It's recommended to use a venv
:
Defaults
python -m venv .virtualenvs/tap-core
.virtualenvs/tap-core/bin/pip install tap-core
Alternative
python -m venv .virtualenvs/tap-core
source .virtualenvs/tap-core/bin/activate
pip install tap-core
deactivate
To run
Like any other tap that's following the singer specificiation:
tap-source | target-destination --config [config.json]
Setup the config.json file
{
"selected": ["x", "y", "z"],
"access_token": "TOKEN"
}
By providing a selected
list of models, they will be enabled for sync
by default.
Build the catalog
.virtualenvs/tap-core/bin/tap-core -c config_tap.json --discover > catalog.json
Select the streams to sync
Add or modify the "selected": true,
in the metadata
.
"stream": "teams",
"metadata": [
{
"breadcrumb": [],
"metadata": {
"selected": true,
"table-key-properties": [
"id"
],
"forced-replication-method": "INCREMENTAL",
"valid-replication-keys": [
"updated_at"
]
}
},
echo "{}" > state.json
.virtualenvs/tap-core/bin/tap-core -c config_tap.json --catalog catalog.json -s state.json \
| .virtualenvs/target-core/bin/target-core -c config_target.json
Example
python -m src.tap -c config_tap.json --discover > catalog.json
echo "{}" > state.json
python -m src.tap -c config_tap.json --catalog catalog.json -s state.json \
| .virtualenvs/target-core/bin/target-core -c config_target.json > state.json
tail -1 state.json > state.json.tmp && mv state.json.tmp state.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tap-core-0.0.3.tar.gz
.
File metadata
- Download URL: tap-core-0.0.3.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7370d68ac43e711c192a0d5c732d3b620cc5a1222aeec2be4b0ea2723559aac |
|
MD5 | 7564346ac10d8bb853e02e38c1090ca4 |
|
BLAKE2b-256 | 4b59d47d3fdf69fb8bb47b5be768aa8a4d97c35b7a26e90d1de18b8ca06ea2fa |
File details
Details for the file tap_core-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: tap_core-0.0.3-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1df34d7a62df1ad084063e040478b033b141e7d1f925a08ab5b1b2a045219899 |
|
MD5 | 3088681c1d36d4a5f7eb2db893e66f38 |
|
BLAKE2b-256 | 12427fefe9b13836745dd7a70cd17717157c40b5302c6cf0eb124317495ae6e4 |