what does the >> operator do in an Airflow DAG ?

it defines downstream steps or step sequencing.


In the example below, dbt_run then dot_test

from datetime import timedelta
from airflow import DAGfrom airflow.operators.bash_operator import BashOperatorfrom airflow.utils.dates import datetimefrom airflow.utils.dates import timedelta

with DAG(dag_id='dbt_dag',start_date=datetime(2021, 12, 23),description='An Airflow DAG to invoke simple dbt commands',schedule_interval=timedelta(days=1),) as dag:

dbt_run = BashOperator(
    bash_command='dbt run'

dbt_test = BashOperator(
    bash_command='dbt test'

dbt_run >> dbt_test

Leave a Comment

Your email address will not be published. Required fields are marked *