Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Courses / Data and analytics tools

        Apache Airflow tutorial: practice Dags online

        Learn Apache Airflow by writing real Dags in a working Airflow workspace. Each lesson has a worked example, then tasks that run your Dag and check what happened: TaskFlow, scheduling, XCom, sensors, retries and testing.

        Start lesson 1Practice interviewTake the assessmentPractice the first unit of every course. No account needed.
        68lessons
        395checked exercises
        11projects, cases and exams
        Prepares you for Data engineer interviews and Airflow certification-style tests

        What you will be able to do

        • Write Dags with with DAG and @dag, and tasks with the TaskFlow API and the classic operators
        • Set dependencies with >>, lists and chain, and fix the import errors that hide a Dag
        • Trigger, pause and rerun Dag runs for past days, and read task logs to find out why a task failed
        • Pass values with XCom, give Dags typed params, and read settings and credentials from variables and connections
        • Render dates, params and variables into commands with Jinja templates and macros
        • Schedule Dags, backfill history, retry what fails, wait for files with sensors and trigger Dags from assets (later units)

        Who it is for

        You're a data or analytics engineer starting with Airflow
        Learn the Airflow 3 way of writing Dags in short, checked tasks, without installing anything.
        You maintain Dags written by someone else
        Practice reading the Grid and task logs, fixing import errors and rerunning the right days.
        You have a data engineering interview or an Airflow certification coming up
        The course ends with interview sets and timed job tests modeled on the Airflow 3 certification topics.

        What you can practice free

        Unit 1, Dags, tasks and dependencies: 6 lessons and 33 checked exercises, with no account or card.

        Start the free unit

        The rest of the course opens with a One Course or All Access plan. See plans and prices

        Keep going in Apache Airflow

        Choose access here. Your course is already selected.

        One Course

        Every lesson, project and mock exam in Apache Airflow.

        Loading price/ month

        Billed monthly. Cancel any time.

        All Access

        Every course, exam and project, plus the Interview Hub.

        Loading price/ month

        Billed monthly. Cancel any time.

        Projects, case studies and mock exams

        Project · IntermediateMarigold's nightly sales pipeline

        Build Marigold's nightly sales pipeline step by step: the right day, retries, an idempotent load, a report, alerts, a deadline and a backfill.

        8 steps
        Project · AdvancedBramble's morning parcel tracker

        Build Bramble's morning tracker: map over the depots that reported, track every open parcel within the partner's limits, save the results and start the customer texts.

        7 steps
        Case study · ExpertA week stuck behind one bad day

        Find why a daily ledger stopped on Thursday, unblock the week safely, and make sure the next failure is noticed on the day.

        5 steps
        Case study · ExpertThe upgrade that moved the day

        Trace a wrong date after the Airflow 3 upgrade to the new cron timetable, fix it without touching task code, and backfill the history.

        5 steps
        Case study · ExpertThe morning the scanners stalled

        Explain why an on-time depot waits behind late ones, free the slots, stop waiting forever on a depot that may not upload, and recommend a design.

        5 steps
        Project · ExpertFenwick Pay's settlement reconciliation

        Build Fenwick Pay's nightly reconciliation: map over merchants, store results, alert on mismatches, wait for the network's file, schedule it by business day and hand the results on as an asset.

        7 steps
        Mock exam · ExpertAirflow job test A: fundamentals (timed)

        A timed, 20-question Airflow test on Dags, scheduling, runs, the UI and CLI, XCom, variables, connections and debugging.

        20 questions · 40 min
        Mock exam · ExpertAirflow job test B: Dag authoring (timed)

        A timed, 20-question Airflow test on TaskFlow, templating, branching, trigger rules, sensors, mapping, assets, testing and pools.

        20 questions · 45 min

        Practice Apache Airflow in a browser workspace that parses your Dag files and runs them against a simulation of Airflow 3.3: the Dags list, Grid and Graph views, task logs, XComs, variables, connections, pools, assets and a terminal with the airflow command line. Start with your first Dag and the TaskFlow API, then schedule it, pass data between tasks, retry what fails, wait for files with sensors, branch, map tasks over lists and trigger Dags from assets. Later levels cover backfills, testing, production patterns and incidents, with projects, interview sets and timed job tests. Every task is checked on your data and on a hidden copy. No installation is needed.

        Interview practice

        Explain what you've learned in a full-screen interview. Speak or type, then review your answers against the rubric for your level.

        Interview loops by job

        Beginner

        FreeNo account or card needed. Every lesson in this unit is yours to practice.

        Dags, tasks and dependencies

        Write Dag files with DAG and @dag, pass data with TaskFlow, set dependencies and use the classic operators.

        6 lessons

        Running Dags and reading logs

        Trigger and pause runs, read task logs, use the airflow command line and fix import errors.

        5 lessons

        XCom, params, variables and connections

        Pass values between tasks, give Dags inputs, read settings and credentials, and render templates.

        6 lessons

        Intermediate

        Schedules, data intervals and backfills

        Choose schedules, understand logical dates and data intervals in Airflow 3, replay history with catchup and backfills, and schedule in local time.

        5 lessons

        Retries, timeouts, alerts and reruns

        Retry what is transient, stop what hangs, alert on failures and late runs, make loads idempotent and rerun tasks safely, then build Marigold's nightly pipeline.

        8 lessons

        Advanced

        Trigger rules, branching and groups

        Decide when tasks run with trigger rules, choose paths with branches and short circuits, and organize tasks with groups, setup and teardown.

        5 lessons

        Sensors and cross-Dag dependencies

        Wait for files, reports and other Dags without wasting worker slots, and link Dags that depend on each other.

        5 lessons

        Assets and data-aware scheduling

        Start Dags when the data they read is updated, combine assets with conditions and clocks, pass details in asset events, and write assets with @asset.

        5 lessons

        Dynamic task mapping

        Fan out over lists known only at run time, pair and fix arguments, protect rate-limited systems, then build Bramble's morning parcel tracker.

        5 lessons

        Expert

        Testing Dags

        Catch broken files with DagBag tests, test task logic with pytest, and run whole Dags in CI with dag.test().

        4 lessons

        Production Airflow

        Share systems safely with pools and priorities, know the Airflow 3 components, write Dag files that are cheap to parse and safe to rerun, and compare Airflow with Dagster.

        5 lessons

        Incidents and a payments project

        Work through realistic incidents from symptom to fix to the summary for the business, then build Fenwick Pay's settlement reconciliation end to end.

        4 lessons

        Interviews and job tests

        Practice Airflow interview questions at three levels and take two timed job tests on fundamentals and Dag authoring.

        5 lessons

        A Dag in Airflow 3

        Every lesson builds on files like this one: a Dag defined with @dag, tasks written as Python functions with @task, and the date of the run read from Airflow rather than typed in.

        import pendulum
        from airflow.sdk import dag, task
        
        
        @dag(schedule="@daily", start_date=pendulum.datetime(2026, 11, 1, tz="UTC"))
        def marigold_daily():
            @task
            def extract_sales(ds=None):
                return fetch_sales(ds)
        
            @task
            def total_revenue(rows):
                return round(sum(r["revenue"] for r in rows), 2)
        
            total_revenue(extract_sales())
        
        
        marigold_daily()

        Airflow topics in the course

        Topic Lesson
        Dags, tasks, runs and task instances Airflow basics
        with DAG and @dag Your first Airflow Dag
        The TaskFlow API TaskFlow: tasks as Python functions
        >>, lists and chain Task dependencies
        BashOperator and PythonOperator Classic operators
        Triggering and pausing Dags Trigger, pause and read Dag runs
        Task logs Task logs
        The airflow CLI The airflow command line
        Import errors Fix Dag import errors
        XCom XCom: pass small values between tasks
        Params and run conf Params and run configuration
        Variables Variables: settings outside the code
        Connections Connections and hooks
        Jinja templates and macros Jinja templates and macros
        Schedules, cron and timedeltas Airflow schedules
        Logical dates and data intervals Logical dates and data intervals
        Catchup and backfills Catchup and backfills
        Time zones Time zones and daylight saving
        Retries Retries: when to try again and when to stop
        Timeouts Timeouts for tasks and runs
        Failure callbacks Callbacks: alert when a task fails
        Deadline alerts (the SLA replacement) Deadline alerts
        Idempotent tasks Idempotent tasks
        Clearing and rerunning tasks Clear, mark and rerun tasks
        Trigger rules Trigger rules: when a task may run
        Branching with @task.branch Branching with @task.branch
        Short circuits Short circuits: stop a run early
        Task groups, setup and teardown Task groups and setup and teardown
        FileSensor File sensors: wait for the file
        Sensor modes and deferrable sensors Sensor modes: poke, reschedule and deferrable
        @task.sensor Custom sensors with @task.sensor
        ExternalTaskSensor and TriggerDagRunOperator Dependencies between Dags
        Assets and data-aware scheduling Assets: start a Dag when its data changes
        Asset conditions and AssetOrTimeSchedule Asset conditions: and, or, and a clock
        Asset events, outlet_events and triggering_asset_events Pass details with asset events
        The @asset decorator The @asset decorator
        Dynamic task mapping with expand Dynamic task mapping: one task per item
        partial and expand_kwargs partial, several arguments and expand_kwargs
        Limits and retries for mapped tasks Mapped tasks: retries, limits and chains
        DagBag import and policy tests Dag integrity tests with DagBag
        Unit tests for TaskFlow tasks Unit tests for task functions
        dag.test() in pytest Run a whole Dag in a test with dag.test()
        Pools and priority weights Pools and priority weights
        Scheduler, Dag processor, API server, triggerer and executors How Airflow 3 runs your Dags
        Airflow best practices Dag files that are cheap to parse and safe to rerun
        Airflow vs Dagster Airflow and Dagster: a fair comparison
        Incident case studies Case: a week stuck behind one bad day, the upgrade that moved the day, the morning the scanners stalled
        An end-to-end reconciliation project Project: Fenwick Pay’s settlement reconciliation
        Airflow interview questions Easy, medium, hard
        Timed Airflow job tests Fundamentals, Dag authoring

        Event streams

        Practice Apache Kafka to inspect keyed records, partition ordering and consumer offsets before querying downstream data. Use the Kafka command reference to connect each console action with the state it changes.

        Common questions

        Do I need to install Airflow?

        No. The workspace runs a simulation of Airflow 3.3 in your browser: it parses your Dag files, runs them on a simulated scheduler and shows the Dags list, Grid, Graph, logs and a terminal with the airflow command line. Where it simplifies, the lesson says so.

        Which version of Airflow does it teach?

        Airflow 3, with the Task SDK imports (from airflow.sdk import dag, task), schedule instead of schedule_interval, and the Airflow 3 defaults for catchup and timetables. Changes in 3.4 are named where they matter.

        Is it free?

        The first unit is free and needs no account. The rest of the course opens with a One Course or All Access plan, and the pricing page shows every plan and its price.

        How is my work checked?

        By running it: the check parses your Dag file, runs the Dag and looks at the result (task states, XCom values, rendered commands, loaded rows), on your data and on a hidden copy. A wrong answer gets a hint about what probably went wrong.

        Is this course made by the Apache Software Foundation?

        No. The Work Gym is independent and not affiliated with the Apache Software Foundation. Apache, Apache Airflow and Airflow are trademarks of the Apache Software Foundation.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.