Operators, Tasks, and Dependencies – Fundamentals Study Guide
This domain accounts for roughly 20% of the exam and covers the building blocks of a DAG: operators (which become tasks), the ways tasks share data and configuration (XComs, Connections, Variables), sensors, and trigger rules. The exam expects you to pick the right operator/mechanism for a scenario and know how tasks coordinate.
Operators and Tasks
- An operator is a template for a unit of work; instantiating one in a DAG creates a task.
- Common operators:
| Operator | Does |
|---|---|
| PythonOperator | Runs a Python callable (function) |
| BashOperator | Runs a shell command |
| EmptyOperator (formerly DummyOperator) | No-op placeholder to structure a DAG (start/end/group) |
| Provider operators | Integrate with external systems (Postgres, S3, Spark, etc.) |
Task vs task instance: the task is the definition; a task instance is one execution of it for a specific DAG run/logical date.
Passing Data: XComs
XComs (cross-communications) let tasks push and pull small pieces of data (an ID, a filename, a count). Key rule: XCom values are stored in the metadata database, so they're for small data only. Passing large datasets through XComs would bloat the database and hurt performance — instead pass a reference (like an S3 path) and let the downstream task fetch the data.
Unlock with a paid plan
4 more sections (about 266 words) continue below. Every paid plan unlocks all Apache Airflow 3 Fundamentals study guides, the full question bank and mock exams, from $4.97/month.