Introduction à Apache Airflow en Python
Mike Metzger
Data Engineer
Les tâches sont :
example_task = BashOperator(task_id='bash_example',
bash_command='echo "Example!"')
$$
Upstream signifie avant
Downstream signifie après
# Define the tasks task1 = BashOperator(task_id='first_task', bash_command='echo 1' )task2 = BashOperator(task_id='second_task', bash_command='echo 2' )# Set first_task to run before second_task task1 >> task2 # or task2 << task1



Dépendances en chaîne :
task1 >> task2 >> task3 >> task4
Dépendances mixtes :
task1 >> task2 << task3
ou :
task1 >> task2
task3 >> task2


Introduction à Apache Airflow en Python