# 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.

- Source: https://akshaythakare.com/notes/apache-airflow/airflow-core-concepts
- Topic: Apache Airflow
- Level: beginner
- Reading time: 2 min
- Tags: airflow, orchestration, fundamentals, interview
- Updated: 2026-10-11

## The vocabulary

| Term | Meaning |
| --- | --- |
| **DAG** | A workflow: tasks plus their dependencies, with a schedule |
| **Task** | One unit of work in a DAG |
| **Operator** | A template for a task (`PythonOperator`, `BashOperator`, `SQLExecuteQueryOperator`) |
| **Sensor** | A task that waits for a condition (a file, a partition, another job) |
| **DAG run** | One execution of the DAG for one data interval |
| **XCom** | Small values passed between tasks (ids, paths — not datasets) |

## A minimal DAG

```python
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.

> **Tip: Interview framing**
>
> "Airflow schedules and coordinates. Each run processes its data interval, tasks are idempotent, and heavy compute runs elsewhere."
