Introducción a Apache Airflow en Python
Mike Metzger
Data Engineer
Las tareas son:
example_task = BashOperator(task_id='bash_example',
bash_command='echo "Example!"')
$$
Upstream significa antes
Downstream significa despué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



Dependencias encadenadas:
task1 >> task2 >> task3 >> task4
Dependencias mixtas:
task1 >> task2 << task3
o:
task1 >> task2
task3 >> task2


Introducción a Apache Airflow en Python