1
0
mirror of synced 2026-01-08 21:05:13 -05:00
Files
airbyte/resources/examples/airflow/dags/dag_airbyte_example.py
Abhi Vaidyanatha 64a8247b83 Add Airflow demo script for one click deployment (#4451)
* Add Airflow Demo Example

* Finalize script instructions

* Add down.sh and run gradle format

* Note about down.sh

* Address review comments

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
2021-07-01 18:38:21 -07:00

21 lines
676 B
Python

from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.providers.airbyte.operators.airbyte import AirbyteTriggerSyncOperator
from airflow.models import Variable
airbyte_connection_id = Variable.get("AIRBYTE_CONNECTION_ID")
with DAG(dag_id='trigger_airbyte_job_example',
default_args={'owner': 'airflow'},
schedule_interval='@daily',
start_date=days_ago(1)
) as dag:
example_sync = AirbyteTriggerSyncOperator(
task_id='airbyte_example',
airbyte_conn_id='airbyte_example',
connection_id=airbyte_connection_id,
asynchronous=False,
timeout=3600,
wait_seconds=3
)