Singer.io target for loading data
Project description
target-airtable
This is a Singer target that reads JSON-formatted data from stdin following the Singer spec and persists it to Airtable.
Install
Implemented and tested with Python 3.9.0. It is recommented to install this target into a separate virtual environment to avoid dependency conflicts. Clone the repository and install it from source:
› pip install target-airtable
Use
target-airtable takes two types of input:
- A config file containing
- api_token (from your Airtable account)
- base (the Airtable base id)
- max_batch_size (according to your Airtable API rate limits)
- endpoint (optional, default="https://api.airtable.com/v0", the Airtable API endpoint)
- typecast (optional, default=True, tries to cast types according to your Airtable table schema)
- output_schema (optional, default=False, collects and write the (flattened) stream schema to a file)
- output_schema_path (optional, default="", the output path to write the schema file)
- failed_insert_exception (optional, default=True, raises an exception for any failed insert instead of error only)
- A stream of Singer-formatted data on stdin
target-airtable replicates the incomming streams from a tap into Airtable tables with the same name as the stream. Make sure that these tables and the fields exist in your selected Airtable base.
If you want to make sure how the (flattened) schema has to look like in Airtable, set the option output_schema
to
True. A file with the required table fields will be written to output_schema_path/output_schema.txt
and no
records will be submitted to Airtable.
Create a config file with your configuration data:
{
"api_token": "my_token",
"base": "my_base",
"max_batch_size": 10,
"endpoint": "https://api.airtable.com/v0",
"typecast": true,
"output_schema": false,
"output_schema_path": "",
"failed_insert_exception": true
}
› tap-some-api | target-airtable --config config.json
where tap-some-api
is a Singer Tap.
Want to help?
Fork, improve and PR.
Project details
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
Hashes for target_airtable-1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91346ac5546e343c3a40e39698d81bb53790dfcd078b94752ad86a3717971bdf |
|
MD5 | 8a6e0c09633e6965c39494082bfe14a8 |
|
BLAKE2b-256 | e7858279e5dfde3653c9c3c4f469065b0ac678529b036068eb5c93afd9539c17 |