{"id":21050023,"url":"https://github.com/astronomer/airflow-provider-fivetran-async","last_synced_at":"2025-04-06T02:07:42.666Z","repository":{"id":63048055,"uuid":"543270736","full_name":"astronomer/airflow-provider-fivetran-async","owner":"astronomer","description":"A new Airflow Provider for Fivetran, maintained by Astronomer and Fivetran","archived":false,"fork":false,"pushed_at":"2025-03-28T06:50:43.000Z","size":199,"stargazers_count":22,"open_issues_count":5,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-30T01:13:16.980Z","etag":null,"topics":["airflow","airflow-operator","airflow-provider","apache-airflow","dag","data-orchestration","etl","python","workflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astronomer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-29T18:41:10.000Z","updated_at":"2025-03-28T06:50:45.000Z","dependencies_parsed_at":"2024-01-08T07:31:44.171Z","dependency_job_id":"1f38f36c-c597-4906-a8ac-5d44e4ee47f0","html_url":"https://github.com/astronomer/airflow-provider-fivetran-async","commit_stats":{"total_commits":23,"total_committers":8,"mean_commits":2.875,"dds":0.6956521739130435,"last_synced_commit":"b95681578fed62236b4d2adb9558ba9a13e2e77e"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astronomer%2Fairflow-provider-fivetran-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astronomer%2Fairflow-provider-fivetran-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astronomer%2Fairflow-provider-fivetran-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astronomer%2Fairflow-provider-fivetran-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astronomer","download_url":"https://codeload.github.com/astronomer/airflow-provider-fivetran-async/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423513,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airflow","airflow-operator","airflow-provider","apache-airflow","dag","data-orchestration","etl","python","workflow"],"created_at":"2024-11-19T15:18:49.736Z","updated_at":"2025-04-06T02:07:42.646Z","avatar_url":"https://github.com/astronomer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fivetran Async Provider for Apache Airflow\n\nThis package provides an async operator, sensor and hook that integrates [Fivetran](https://fivetran.com) into Apache Airflow.\n`FivetranSensor` allows you to monitor a Fivetran sync job for completion before running downstream processes.\n`FivetranOperator` submits a Fivetran sync job and polls for its status on the triggerer.\nSince an async sensor or operator frees up worker slot while polling is happening on the triggerer,\nthey consume less resources when compared to traditional \"sync\" sensors and operators.\n\n[Fivetran automates your data pipeline, and Airflow automates your data processing.](https://www.youtube.com/watch?v=siSx6L2ckSw\u0026ab_channel=Fivetran)\n\n## Installation\n\nPrerequisites: An environment running `apache-airflow`.\n\n```\npip install airflow-provider-fivetran-async\n```\n\n## Configuration\n\nIn the Airflow user interface, configure a Connection for Fivetran. Most of the Connection config fields will be left blank. Configure the following fields:\n\n* `Conn Id`: `fivetran`\n* `Conn Type`: `Fivetran`\n* `Login`: Fivetran API Key\n* `Password`: Fivetran API Secret\n\nFind the Fivetran API Key and Secret in the [Fivetran Account Settings](https://fivetran.com/account/settings), under the **API Config** section. See our documentation for more information on [Fivetran API Authentication](https://fivetran.com/docs/rest-api/getting-started#authentication).\n\nThe sensor assumes the `Conn Id` is set to `fivetran`, however if you are managing multiple Fivetran accounts, you can set this to anything you like. See the DAG in examples to see how to specify a custom `Conn Id`.\n\n## Modules\n\n### [Fivetran Operator Async](https://github.com/astronomer/airflow-provider-fivetran-async/tree/main/fivetran_provider_async/operators.py)\n\n```python\nfrom fivetran_provider_async.operators import FivetranOperator\n```\n\n`FivetranOperator` submits a Fivetran sync job and monitors it on trigger for completion.\n\n`FivetranOperator` requires that you specify the `connector_id` of the Fivetran connector you wish to trigger. You can find `connector_id` in the Settings page of the connector you configured in the [Fivetran dashboard](https://fivetran.com/dashboard/connectors).\n\nThe `FivetranOperator` will wait for the sync to complete so long as `wait_for_completion=True` (this is the default). It is recommended that\nyou run in deferrable mode (this is also the default). If `wait_for_completion=False`, the operator will return the timestamp for the last sync.\n\nImport into your DAG via:\n\n### [Fivetran Sensor Async](https://github.com/astronomer/airflow-provider-fivetran-async/tree/main/fivetran_provider_async/sensors.py)\n\n```python\nfrom fivetran_provider_async.sensors import FivetranSensor\n```\n\n`FivetranSensor` monitors a Fivetran sync job for completion.\nMonitoring with `FivetranSensor` allows you to trigger downstream processes only when the Fivetran sync jobs have completed, ensuring data consistency.\n\n`FivetranSensor` requires that you specify the `connector_id` of the Fivetran connector you want to wait for. You can find `connector_id` in the Settings page of the connector you configured in the [Fivetran dashboard](https://fivetran.com/dashboard/connectors).\n\nYou can use multiple instances of `FivetranSensor` to monitor multiple Fivetran connectors.\n\n`FivetranSensor` is most commonly useful in two scenarios:\n\n1. Fivetran is using a separate scheduler than the Airflow scheduler.\n2. You set `wait_for_completion=False` in the `FivetranOperator`, and you need to await the `FivetranOperator` task later. (You may want to do this if you want to arrange your DAG such that some tasks are dependent on _starting_ a sync and other tasks are dependent on _completing_ a sync).\n\nIf you are doing the 1st pattern, you may find it useful to set the `completed_after_time` to `data_interval_end`, or `data_interval_end` with some buffer:\n\n```python\nfivetran_sensor = FivetranSensor(\n    task_id=\"wait_for_fivetran_externally_scheduled_sync\",\n    connector_id=\"bronzing_largely\",\n    poke_interval=5,\n    completed_after_time=\"{{ data_interval_end + macros.timedelta(minutes=1) }}\",\n)\n```\n\nIf you are doing the 2nd pattern, you can use XComs to pass the target completed time to the sensor:\n\n```python\nfivetran_op = FivetranOperator(\n    task_id=\"fivetran_sync_my_db\",\n    connector_id=\"bronzing_largely\",\n    wait_for_completion=False,\n)\n\nfivetran_sensor = FivetranSensor(\n    task_id=\"wait_for_fivetran_db_sync\",\n    connector_id=\"bronzing_largely\",\n    poke_interval=5,\n    completed_after_time=\"{{ task_instance.xcom_pull('fivetran_sync_op', key='return_value') }}\",\n)\n\nfivetran_op \u003e\u003e fivetran_sensor\n```\n\nYou may also specify the `FivetranSensor` without a `completed_after_time`.\nIn this case, the sensor will make note of when the last completed time was, and will wait for a new completed time.\n\n## Examples\n\nSee the [**examples**](https://github.com/astronomer/airflow-provider-fivetran-async/tree/main/fivetran_provider_async/example_dags) directory for an example DAG.\n\n## Issues\n\nPlease submit [issues](https://github.com/astronomer/airflow-provider-fivetran-async/issues) and [pull requests](https://github.com/astronomer/airflow-provider-fivetran-async/pulls) in our official repo:\n[https://github.com/astronomer/airflow-provider-fivetran-async](https://github.com/astronomer/airflow-provider-fivetran-async)\n\nWe are happy to hear from you. Please email any feedback to the authors at [humans@astronomer.io](mailto:humans@astronomer.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastronomer%2Fairflow-provider-fivetran-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastronomer%2Fairflow-provider-fivetran-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastronomer%2Fairflow-provider-fivetran-async/lists"}