Apache Airflow Core

3.2.0 · active · verified Thu Apr 09

Apache Airflow Core (part of the main `apache-airflow` distribution) provides the foundational components for the Apache Airflow platform, a powerful tool for programmatically authoring, scheduling, and monitoring data workflows. It includes the scheduler, API server, DAG file processor, and triggerer. Workflows, known as Directed Acyclic Graphs (DAGs), are defined as Python code, making them maintainable, versionable, and collaborative. Airflow follows semantic versioning, with minor releases typically every 2-3 months and patch releases as needed. Major versions, such as 3.x, introduce backwards-incompatible changes and are released on an irregular schedule. The current version of `apache-airflow` is 3.2.0.

Warnings

Install

Imports

Quickstart

This quickstart defines a simple 'Hello World' DAG. To run it locally, first install Apache Airflow (see 'install' section). Then, initialize the database and start Airflow components using `airflow standalone`. Place this Python file in your configured `AIRFLOW_HOME/dags` directory, then access the Airflow UI at `localhost:8080`, log in (admin/admin by default for `standalone`), and unpause the `hello_world_dag`.

from airflow import DAG
from airflow.operators.bash import BashOperator
from datetime import datetime, timedelta

with DAG(
    dag_id='hello_world_dag',
    start_date=datetime(2026, 1, 1),
    schedule_interval=timedelta(days=1),
    catchup=False, # Default in Airflow 3.x is False
    tags=['example'],
) as dag:
    start_task = BashOperator(
        task_id='start',
        bash_command='echo "Starting hello_world_dag"',
    )

    hello_task = BashOperator(
        task_id='hello',
        bash_command='echo "Hello, Airflow!"',
    )

    world_task = BashOperator(
        task_id='world',
        bash_command='echo "This is a simple DAG."',
    )

    end_task = BashOperator(
        task_id='end',
        bash_command='echo "Finished hello_world_dag"',
    )

    start_task >> hello_task >> world_task >> end_task

view raw JSON →