Author: Jacob Werderits ([email protected])
This is a Singer tap that produces JSON-formatted data following the Singer spec.
It:
- Generates a catalog of available data in Copper
- Extracts the following resources:
- Install
git clone [email protected]:fishtown-analytics/tap-copper.git
cd tap-copper
pip install -e .
- Get an API key
Create a Copper Authentication Token. Tokens are tied to a user's email (the user's permissions determine the data avaialable). After receiving an API token keep it somewhere safe, as you'll need it to authenticate requests. See "Create the config file" below for more information on using this API Token,
- Create the config file.
There is a template you can use at config.json.example
, just copy it to config.json
in the repo root and insert your token and email
- Run the application to generate a catalog.
tap-copper -c config.json --discover > catalog.json
- Select the tables you'd like to replicate
Step 4 generates a a file called catalog.json
that specifies all the available endpoints and fields. You'll need to open the file and select the ones you'd like to replicate. See the Singer guide on Catalog Format for more information on how tables are selected.
- Run it!
tap-copper -c config.json --catalog catalog.json
tap-copper -c config.json --catalog catalog.json --state state.json
Create a stitch.config.json file:
{
"client_id" : <your client_id int>,
"token" : "<your token>",
"small_batch_url": "https://<region>.stitchdata.com/v2/import/batch",
"big_batch_url": "https://<region>.stitchdata.com/v2/import/batch",
"batch_size_preferences": {}
}
Note that region is either api.eu-central-1
or us-east-1
.
Then run:
tap-copper -c config.json --catalog catalog.json | target-stitch --config stitch.config.json
Copyright © 2019 Stitch