Airflow 3 Features

Airflow 3 is a major release that changes how Airflow is built and used. It brings a new user interface, a cleaner way for tasks to talk to Airflow, versioned DAGs, and event-driven scheduling. Knowing the main changes helps you read new tutorials, plan upgrades, and write code that lasts.

The Home Renovation Picture

Imagine a house renovation. The walls and the plumbing stay, but the kitchen gets a fresh layout, the wiring gets safer, and a few old fixtures leave. Airflow 3 keeps the core idea of DAGs and tasks. The surrounding structure gets modern parts, and some old features disappear.

 Airflow 2                          Airflow 3
 ──────────────────────────────────────────────────────
 Classic web UI                 →   Modern React-based UI
 Tasks access the database      →   Tasks use a Task Execution API
 Datasets                       →   Assets
 Only latest DAG code shown     →   DAG versioning
 Webserver                      →   API server
 SubDAGs                        →   Removed, use task groups

Main Changes

New User Interface

The UI is rebuilt with modern web tools. It offers dark mode, faster pages, and clearer views of runs and task details.

Task Execution Interface and Task SDK

In Airflow 2, task code could reach the metadata database directly. Airflow 3 routes task communication through an API. Tasks gain better isolation and security. A new package named airflow.sdk holds the public objects you import to author DAGs.

from airflow.sdk import DAG, task

with DAG(dag_id="hello_v3", schedule="@daily"):

    @task
    def hello():
        print("Hello from Airflow 3")

    hello()

DAG Versioning

Airflow now stores versions of your DAG code. A run keeps the version it started with, even when you deploy a change halfway through. The UI shows which version a run used.

Assets

Datasets are now called assets. Assets support event-driven scheduling, where an outside event, such as a message arriving in a queue, can trigger a DAG.

from airflow.sdk import Asset, DAG, task

sales = Asset("s3://company-data/sales/daily.csv")

with DAG(dag_id="producer", schedule="@daily"):
    @task(outlets=[sales])
    def build():
        print("Updated sales file")
    build()

Scheduler-Managed Backfills

Backfills now run inside the scheduler, with a UI and API for creating them. They no longer depend on a command that stays open in a terminal.

Removed and Changed Features

AreaChange
SubDAGsRemoved. Use task groups
execution_dateRemoved. Use logical_date and data interval values
schedule_intervalRemoved. Use schedule
Default catchupNow False
Common operatorsMoved into the standard provider package
Direct database access from tasksBlocked. Use the Task SDK and API

Import Path Changes

Operators such as BashOperator and PythonOperator now live in the standard provider.

# Airflow 2 style
from airflow.operators.python import PythonOperator

# Airflow 3 style
from airflow.providers.standard.operators.python import PythonOperator

Upgrade Steps

  1. Upgrade to the latest Airflow 2.x release and fix every deprecation warning.
  2. Run the official compatibility check tool and read its report.
  3. Update imports, replace removed features, and review any code that touches the database directly.
  4. Test the full set of DAGs in a staging environment.
  5. Back up the metadata database before the production upgrade.

Planning Your Learning

  • Core ideas such as DAGs, tasks, operators, and scheduling work the same in both versions.
  • Check the version of every tutorial and code sample before you copy it.
  • Learn the new import paths early, since most examples online still use the older ones.

Version Compatibility Check

airflow version
pip show apache-airflow

Key Takeaways

  • Airflow 3 adds a new UI, the Task SDK, DAG versioning, and assets.
  • Several old features leave, including SubDAGs and execution_date.
  • Import paths change, so check each sample against your version.
  • A staged upgrade with tests protects production.