I 'm new to Airflow and I know DummyOperator just does nothing. So what is the scenario for DummyOperator? When would you typically use it?
A common use is to create simplified workflows. Consider an example.
task_1 >> task_3
task_2 >> task_3
task_1 >> task_4
task_2 >> task_4
Technically you want task_3 and task_4 to be executed only after both task_1 and task_2 are completed. But when you look at the graph, it is not super intuitive.
Solution? You can improve the readability (not code readability instead you can understand the graphs and thereby workflow.) by adding a task_dummy after task_1 and task_2 and run task_3 and task_4 after task_dummy. So when a new user takes a look at graphs, he will immediately understand the workflow. The modified workflow will be as follows.
task_1 >> task_dummy << task_2
task_dummy >> task_3
task_dummy >> task_4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With