Skip to content

Configuration Reference

This page documents the top-level structure of a Bizon pipeline file. Source and destination keys are covered on their own pages.

A complete pipeline configuration file:

name: hubspot-contacts
id: hubspot-contacts
source:
name: hubspot
stream: contacts
sync_mode: incremental
authentication:
type: api_key
params:
token: gsm://hubspot-api-token
transforms:
- label: tag-source
python: |
data['source_system'] = 'hubspot'
destination:
name: bigquery
config:
project_id: my-project
dataset_id: raw_hubspot
gcs_buffer_bucket: my-bizon-buffer
engine:
backend:
type: postgres
config:
host: db.internal
port: 5432
database: bizon
schema: public
username: bizon
password: env://PG_PASSWORD
queue:
type: python_queue
config:
max_nb_messages: 1000000
runner:
type: thread
log_level: INFO
monitoring:
type: datadog
config:
datadog_agent_host: localhost
alerting:
type: slack
config:
webhook_url: gsm://slack-alerts-webhook
secrets:
gsm:
project_id: my-project
KeyRequiredDescription
nameYesName of the pipeline
idNoStable identity for the pipeline’s backend state. Defaults to name
sourceYesSource to read from
destinationYesDestination to write to
transformsNoList of transforms applied to each record
engineNoBackend, queue and runner. Defaults to SQLite, python_queue and the thread runner
monitoringNoMonitoring (Datadog)
alertingNoAlerting (Slack)
secretsNoProvider defaults for secret references
streamsNoMulti-table stream routing, for sync_mode: stream

The backend stores jobs, cursors and stream resets under id, or under name when id is not set. Changing that value starts the pipeline from scratch: incremental streams lose their watermark and in-flight jobs are not resumed.

Set id to keep that state independent of the display name. With id set, name can be renamed freely. To rename an existing pipeline without losing its state, first set id to its current name.

name: HubSpot contacts (marketing)
id: hubspot-contacts

id is limited to 100 characters.

Source keys sit directly under source:. Connector-specific keys go at the same level as the common ones below.

source:
name: notion
stream: pages
sync_mode: incremental
database_ids:
- 1a2b3c4d5e6f
authentication:
type: api_key
params:
token: gsm://notion-api-token
KeyTypeDefaultDescription
namestringRequiredSource connector name (see bizon source list)
streamstringRequiredStream to sync (see bizon stream list <source>)
sync_modeenumfull_refreshfull_refresh, incremental or stream. See Sync Modes
cursor_fieldstringNoneField used for incremental filtering, passed to the source as source_state.cursor_field
force_ignore_checkpointboolfalseCancel the in-flight job and start a new one from iteration 0
max_iterationsintNoneStop after this many iterations. None runs until the source is exhausted
authenticationobjectNoneSee Authentication
httpobjectSource defaultTimeout and retry policy for the source’s HTTP session. See Custom Sources
source_file_pathstringNonePath to a custom source file. Set by --custom-source
resetboolfalseDeprecated. Use bizon run --reset or bizon stream reset

Keys that the source’s config class does not declare are ignored with a warning. Check each connector’s page in the sources catalog for its own keys.

destination:
name: bigquery
config:
project_id: my-project
dataset_id: analytics
dataset_location: EU
gcs_buffer_bucket: my-bizon-buffer
buffer_size: 50
buffer_flush_timeout: 600

name is one of bigquery, bigquery_streaming, bigquery_streaming_v2, logger or file. Every destination accepts these keys under config:

KeyTypeDefaultDescription
buffer_sizeint50Buffer size in MB before a flush. 0 writes every iteration directly
buffer_flush_timeoutint600Seconds after which the buffer is flushed regardless of size. 0 disables the timeout
max_concurrent_threadsint10Threads used to write to the destination
unnestboolfalseWrite records as typed columns instead of a JSON payload. Requires record_schemas
record_schemaslistNonePer-destination-table schemas, used with unnest
destination_idstringNoneExplicit destination identifier (for BigQuery, the table)

See the BigQuery destination for its keys, and the destinations overview for the others. For local runs:

destination:
name: logger
config: {}
transforms:
- label: rename-id
python: |
data['contact_id'] = data.pop('id')

Each entry has a label and a python snippet. See Transforms.

engine:
backend:
type: sqlite
config:
database: bizon
schema: public
queue:
type: python_queue
config:
max_nb_messages: 1000000
runner:
type: thread
config:
max_workers: 2
log_level: INFO
KeyDefaultDescription
engine.backendsqlite, database bizonWhere job state and cursors are stored: postgres, bigquery, sqlite or sqlite_in_memory
engine.queuepython_queue, unboundedIn-memory queue between producer and consumer
engine.runnerthread, 2 workers, INFOHow producer and consumer run

The queue, backend and runner live only under engine:. See Engine Configuration for every key.

Datadog is the only monitoring provider. It sends pipeline metrics through a DogStatsD agent.

monitoring:
type: datadog
config:
datadog_agent_host: localhost
datadog_agent_port: 8125
tags:
team: data
KeyDefaultDescription
typeRequireddatadog
config.datadog_agent_hostNoneAgent hostname
config.datadog_host_env_varNoneName of an environment variable holding the agent hostname, e.g. DD_AGENT_HOST
config.datadog_agent_port8125DogStatsD port
config.tags{}Tags added to every metric
enable_tracingfalseEnable tracing

One of datadog_agent_host or datadog_host_env_var is required. Install the datadog extra: pip install 'bizon[datadog]'.

Slack is the only alerting provider. Log lines at the listed levels are posted to the webhook.

alerting:
type: slack
log_levels:
- ERROR
- CRITICAL
config:
webhook_url: gsm://slack-alerts-webhook
KeyDefaultDescription
typeRequiredslack
log_levels[ERROR]Levels that trigger an alert: DEBUG, INFO, WARNING, ERROR, CRITICAL
config.webhook_urlRequiredSlack incoming webhook URL

The streams: block routes several source streams to their own destination tables in one pipeline. It requires source.sync_mode: stream, and each table_id must be project.dataset.table.

streams:
- name: orders
source:
topic: cdc.public.orders
destination:
table_id: my-project.raw.orders
- name: customers
source:
topic: cdc.public.customers
destination:
table_id: my-project.raw.customers

For the Kafka source, topics are filled from streams when source.topics is empty. A stream’s destination.record_schema and clustering_keys feed the destination’s record_schemas. See the Kafka source.

Any string value can be a reference resolved before the config is validated:

source:
name: hubspot
stream: contacts
authentication:
type: api_key
params:
token: gsm://hubspot-api-token
destination:
name: bigquery
config:
project_id: ${env://GCP_PROJECT_ID}
dataset_id: analytics
gcs_buffer_bucket: ${env://GCP_PROJECT_ID}-bizon-buffer
  • gsm://<secret> reads Google Secret Manager.
  • env://VAR reads an environment variable.
  • ${gsm://...} and ${env://...} work inline, several per value.
  • A whole value starting with BIZON_ENV_ is replaced by the environment variable of that name.

See Secrets for the full syntax, the secrets: block and bizon secrets check.