Use case of dummy operator

Nabin picture Nabin · Aug 13, 2019 · Viewed 10.1k times · Source

I was learning apache airflow and found that there is an operator called DummyOperator. I googled about its use case, but couldn't find anything that I can understand. Can anyone here please discuss its use case?

Answer

Yong Wang picture Yong Wang · Aug 14, 2019

Operator that does literally nothing. It can be used to group tasks in a DAG.

https://airflow.apache.org/_api/airflow/operators/dummy_operator/index.html

as far as I know, at least to two case:

  • test purpose. in dags, the dummy operation just between upstream and downstream, later, you can replace the true operator.
  • Workflow purpose: BranchPythonOperator work with DummyOperator. If you want to skip some tasks, keep in mind that you can’t have an empty path, if so make a dummy task. https://airflow.apache.org/concepts.html#workflows