This is a Singer tap that produces JSON-formatted data from the Forecast API following the Singer spec.
This tap:
- Pulls raw data from the Forecast REST API
- Extracts the following resources from Forecast:
- Outputs the schema for each resource
-
Install
We recommend using a virtualenv:
> virtualenv -p python3 venv > source venv/bin/activate > pip install .
-
Get your Forecast api key and create the config file
Create a JSON file containing the api key (required), a start date (required), if you want to change the replication method default: 'INCREMENTAL' (optional)
{ "API_KEY": "your-api-key", "start_date": "2020-01-01T00:00:00Z", "rewrite_replication_method": "INCREMENTAL" }
-
Run the tap in discovery mode to get properties.json file
tap-forecast --config config.json --discover > catalog.json
-
In the properties.json file, select the streams to sync
Each stream in the properties.json file has a "schema" entry. To select a stream to sync, add
"selected": true
to that stream's "schema" entry. For example, to sync the projects stream:... "tap_stream_id": "projects", "schema": { "selected": true, "properties": { "updated_at": { "format": "date-time", "type": [ "null", "string" ] } ...
-
Run the application
tap-forecast
can be run with:tap-forecast --config config.json --catalog catalog.json