Fivetran Activations Provider for Apache Airflow
This package lets you trigger and monitor Fivetran Activations (formerly Census) syncs from Apache Airflow.
Support Matrix
- Python:
>=3.10 - Apache Airflow:
>=2.10,<4 - Airflow authoring compatibility: Airflow
2.10+and3.x
Airflow 3 Highlights
This provider supports Apache Airflow 2.10+ and 3.x from one package.
Airflow 3-friendly capabilities include:
- deferrable
CensusSensorsupport so long-running sync polling does not hold a worker slot - Airflow connection testing support in the UI and CLI via
test_connection()
For backward compatibility, the provider still uses the existing CensusHook, CensusOperator, CensusSensor, and census connection type names even though the product is now Fivetran Activations.
Installation
Install the package from PyPI with your preferred Python package manager.
pip install airflow-provider-census
Connection Setup
The provider uses the census_default connection ID by default.
Create a connection in the Airflow UI with:
- Conn Id:
census_default - Conn Type:
Census(kept for backward compatibility) - Host:
app.getcensus.comfor US workspaces orapp-eu.getcensus.comfor EU workspaces - Activations API Token: your Fivetran Activations API token
The hook implements test_connection(), so Airflow's Test Connection button and airflow connections test CLI command can validate the setup.
Hooks
from airflow_provider_census.hooks.census import CensusHook
CensusHook extends HttpHook and provides helpers to:
- trigger a sync run
- fetch sync run status
- test the Airflow connection configuration
Operator
from airflow_provider_census.operators.census import CensusOperator
CensusOperator triggers a Fivetran Activations sync run and returns the resulting sync_run_id via XCom.
Parameters:
sync_id: the Fivetran Activations sync ID, for example fromhttps://app.getcensus.com/syncs/<SYNC_ID>/overviewcensus_conn_id: optional connection ID, defaults tocensus_default
The operator also exposes a Fivetran Activations Sync Run task link in the Airflow UI.
Sensor
from airflow_provider_census.sensors.census import CensusSensor
CensusSensor waits for a Fivetran Activations sync run to complete.
Parameters:
sync_run_id: the sync run ID returned byCensusOperatorcensus_conn_id: optional connection ID, defaults tocensus_defaultdeferrable: whenTrue, defers polling to the triggerer instead of holding a worker slot
When deferrable=True, your Airflow deployment must be running a triggerer.
Example DAG
from datetime import datetime
from datetime import timedelta
from airflow.providers.common.compat.sdk import DAG
from airflow_provider_census.operators.census import CensusOperator
from airflow_provider_census.sensors.census import CensusSensor
with DAG(
dag_id="example_census",
start_date=datetime(2024, 1, 1),
schedule="@daily",
catchup=False,
max_active_runs=1,
default_args={
"owner": "airflow",
"retries": 1,
"retry_delay": timedelta(minutes=5),
},
) as dag:
trigger_sync = CensusOperator(
task_id="trigger_sync",
census_conn_id="census_default",
sync_id=27,
)
wait_for_sync = CensusSensor(
task_id="wait_for_sync",
sync_run_id="{{ ti.xcom_pull(task_ids='trigger_sync') }}",
census_conn_id="census_default",
deferrable=True,
)
trigger_sync >> wait_for_sync
API Documentation
The Activations Management API reference now lives in Fivetran documentation:
Feedback
Source code: https://github.com/sutrolabs/airflow-provider-census
Metadata
Release files for airflow-provider-census 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| airflow_provider_census-2.1.0.tar.gz | 9.1 kB | Without provenance | Details for airflow_provider_census-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airflow_provider_census-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for airflow_provider_census-2.1.0-py3-none-any.whl |
Total release size: 20.6 kB
Release files / airflow_provider_census-2.1.0.tar.gz
| Download URL | airflow_provider_census-2.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f6adfac03cb469558d4d3fb763cbe61922bf8fd14161b42ae4c99ee91c244d2
|
|
BLAKE2b-256 checksum How to use checksums |
b2c3e60ebd68d9a081cef9950f3cba1bfff23f1ee1b241eaf50ed74bd43763ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.2
|
Release files / airflow_provider_census-2.1.0-py3-none-any.whl
| Download URL | airflow_provider_census-2.1.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0756c0b09a261d93438981886108d1c7b383bcc20c1b1333e47d6eda655ae8d6
|
|
BLAKE2b-256 checksum How to use checksums |
0553b095dce712bb92c04cf91f379252f7a2e02228380ab40a0a44f7dff1ad4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.2
|
Security for airflow-provider-census 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.