Skip to content
PHP2Shell: The PHP Bug
Akshay Thakare

Airflow Core Concepts: DAGs, Tasks, Operators and Runs

The vocabulary you need to read any Airflow project: DAGs, tasks, operators, sensors, XComs, data intervals and the scheduler.

Apache AirflowBeginner2 min readUpdated 11 Oct 2026

The vocabulary

TermMeaning
DAGA workflow: tasks plus their dependencies, with a schedule
TaskOne unit of work in a DAG
OperatorA template for a task (PythonOperator, BashOperator, SQLExecuteQueryOperator)
SensorA task that waits for a condition (a file, a partition, another job)
DAG runOne execution of the DAG for one data interval
XComSmall values passed between tasks (ids, paths — not datasets)

A minimal DAG

Python.py
from datetime import datetime
from airflow import DAG
from airflow.operators.python import PythonOperator
 
def extract(data_interval_start, data_interval_end, **_):
    print(f"extract rows from {data_interval_start} to {data_interval_end}")
 
with DAG("orders_daily", start_date=datetime(2026, 1, 1), schedule="@daily", catchup=False) as dag:
    e = PythonOperator(task_id="extract", python_callable=extract)
    t = PythonOperator(task_id="transform", python_callable=lambda: None)
    e >> t

Data intervals

A daily run for 5 January covers the interval 5 Jan 00:00 → 6 Jan 00:00, and it starts after that interval ends. Use data_interval_start and data_interval_end for what to process, never "now".

Airflow orchestrates; it does not process

Heavy work belongs in Spark, a warehouse or a container. Airflow tasks should start that work and wait for it, keeping workers light.

Finished this note?

Share