A weather pipeline must fetch a forecast before cleaning it, then clean it before updating a dashboard. In Airflow, each step is a task in a directed acyclic graph (DAG); dependencies specify which steps must finish before others can run. section 1.1 section 1.2.1
An operator implements one piece of work, such as running a Bash command or a Python function. A task manages that operator’s execution, including dependencies, scheduling, and errors. The terms are often used interchangeably, but the distinction is useful: the operator defines the work; the task manages its run. section 2.2.1
Ordering a download workflow
A rocket-launch workflow downloads launch data, retrieves its pictures, and then sends a notification. Its dependency expression is `download_launches >> get_pictures >> notify`. The middle task cannot run until the download completes; the last waits for the pictures. section 2.2 section 1.1.2
Define tasks and their dependencies in a DAG file. At runtime, Airflow’s scheduler checks whether upstream tasks have completed before passing ready tasks to workers. The DAG’s schedule determines when the pipeline is run; dependencies determine which of its tasks are ready. section 1.2.1 section 1.2.3
Figure 2.5 Airflow users employ both DAGs and operators. Tasks are internal components
that manage operator state and display state changes (e.g., started/finished) to the user.
The diagram distinguishes operators that do work from tasks that manage operator state and expose state changes. section 2.2.1
