Overview

4 Asset-aware scheduling

Asset-aware scheduling introduces an event-driven alternative to purely time-based orchestration by modeling dependencies between DAGs as assets. Instead of aligning brittle schedules or tightly coupling workflows, teams split pipelines into producer DAGs that create or update assets (such as datasets or models identified by URIs) and consumer DAGs that are automatically triggered when those assets change. This approach reduces duplicated ingestion, minimizes wasted runs when data hasn’t changed, and scales cleanly as more consumers subscribe to the same upstream assets. It complements, rather than replaces, time-based schedules, enabling responsive yet orderly pipelines.

In practice, producers declare assets and attach them as task outputs so that successful updates emit asset events; consumers declare those assets in their schedule so Airflow triggers them on updates and passes triggering_asset_events with the event details. Because event-driven runs do not define a logical_date, consumers that need run context can derive it from the source DAG run or, more robustly, read explicit metadata embedded by producers in each event’s extra field (e.g., the processed date). Producers can also suppress noisy updates by raising AirflowSkipException when nothing actually changed. This event payload becomes part of a data contract between teams, so any changes to the included fields should be coordinated to avoid breaking consumers.

For more complex topologies, consumers can listen to multiple assets, with the default behavior triggering a run once every input has emitted at least one new event since the last run. Asset expressions support AND and OR to define richer conditions, and consumers can select the correct event per asset when building inputs. A key caveat is that Airflow does not align execution dates across assets, so consumers must validate and reconcile mismatches themselves. When both responsiveness and cadence are required, hybrid schedules combine asset triggers with time-based timetables, ensuring quick reactions to upstream changes while still enforcing regular runs.

Multiple teams relying on the same data can each do their own ingestion (A), but this is hardly efficient and can lead to inconsistencies. In this case, it’s more efficient to have a single team ingest the data and trigger the workloads of the other teams whenever new data is ingested (B). This raises a new question though: how do we align the schedules of the producer and consumer DAGs?
Splitting the events DAG into separate producer and consumer DAGs that are owned by different teams. The producer DAG creates and updates an asset representing the event dataset, which is consumed by the downstream DAGs owned by the other teams. Airflow ensures that these downstream DAGs are automatically triggered whenever the asset is updated.
The producer and consumer DAGs for our use case example. The producer DAG fetches event data and updates the file:///data/events asset. This triggers the consumer DAG which will calculate statistics for the new events.
Asset view in the Airflow UI. On the left, you can see the relationship between the asset and the producer DAG. On the right, you can see the event(s) produced by runs of the producer DAG.
View of the events dataset asset, now including the relationship with the consumer DAG.
View of the asset event, now including the data from the extra metadata field.
The second run of the task is now skipped as the data file already exists. This ensures that any DAGs downstream listening to the asset are not triggered as there isn’t any new data available to process.
Adding a second producer that (conceptually) fetches additional event data from a different source.
The DAG listing view, showing that the new DAG is waiting for events from two different assets. The first number will update when events occur and reset after each run of the consumer DAG.
The asset view showing the two assets and their relationship with the two producer and single consumer DAGs.
Every ‘star’ icon indicates an asset update, either for the first or second dataset. Only once both datasets have been updated is a DAGRun for our Consumer DAG triggered. The order in which the assets are updated does not matter.

Summary

  • Airflow's asset feature allows for event-driven (or asset-aware) scheduling, where task execution is triggered by data availability or changes, as opposed to strict time intervals.
  • In data pipelines, this is useful for splitting concerns between DAGs where producer DAGs focus on fetching/transforming data to produce one or more output datasets, and consumer DAGs are triggered by updates to these datasets (potentially producing their own datasets in turn).
  • Information about upstream DAGs (e.g., a DAG’s scheduling interval) can be accessed via the triggering_asset_events variable provided to a consumer DAG.
  • Producer DAGs can also include extra information in an asset event via the `extra` field. This information can be accessed by any downstream DAGs triggered by the event.
  • A producer DAG can skip downstream updates by raising an AirflowSkipException. This is useful in situations where a DAG run didn’t modify an asset and should therefore not trigger any dependent consumer DAGs.
  • Consumer DAGs can also depend on multiple assets, in which case they’ll by default be executed whenever all input assets have seen at least one event. You can use conditional logic for more complicated relationships between assets. Either way, this functionality does not take any scheduling semantics of upstream DAGs into account.
  • DAGs can also combine time- and asset-based scheduling if they need to react in a timely fashion to dataset updates and also be run periodically.

FAQ

What problem does asset-aware scheduling solve compared to time-based schedules?Time-based schedules are brittle and inefficient across multiple DAGs: consumers may run when data hasn’t changed or before producers finish, causing wasted compute or stale inputs. Asset-aware scheduling models dependencies as assets and automatically triggers consumer DAGs when those assets are updated, decoupling teams and improving efficiency.
What is an “asset” in Airflow and how is it identified?An asset is a virtual reference to something produced or consumed by DAGs (for example, a dataset, table, or ML model). It is identified by a URI-like string; Airflow treats the URI as an opaque ID and doesn’t interpret its location or content. Valid examples include s3://bucket/key, file:///path/to/file, /absolute/path, or a simple string like my_dataset.
How do I make a producer task emit an asset event?Create an Asset with the asset’s URI and pass it to the producing task’s outlets argument. When the task finishes successfully, Airflow emits an asset event. You can inspect events and producer–asset relationships in the Assets tab of the UI.
How do I trigger a consumer DAG when an asset is updated?In the consumer DAG, define the same Asset and set schedule to a list containing that asset (for example, schedule=[events_asset]). Airflow will trigger the DAG whenever the asset receives a new event. The DAG has no fixed schedule in this setup.
Why does my asset-driven DAG fail with “logical_date is undefined”?Event-driven DAGs have no time-based context, so logical_date isn’t defined. Instead, read the triggering_asset_events from the Airflow context to get information about the producer run or use metadata embedded in the asset event. Note: in Airflow 3, source_dag_run on events may be missing; use the metadata approach as a workaround until it’s fixed.
How can producers pass extra information (like the date) to consumers?Have the producing task yield a Metadata object for the asset with an extra dictionary (for example, { "date": "YYYY-MM-DD" }). The consumer reads this via triggering_asset_events[...] .extra to build paths or parameters. Treat extra fields as a contract with consumers and coordinate schema and semantics.
How can I avoid triggering consumers when nothing changed?Detect no-op conditions in the producing task and raise AirflowSkipException. The task is marked skipped, no asset event is emitted, and downstream consumer DAGs are not triggered.
How do I consume multiple assets and when does the consumer run?Add multiple assets to the consumer’s schedule. By default, Airflow triggers the DAG only after each input asset has at least one new event since the last run (logical AND). You can also compose conditions with AND (&) and OR (|). Airflow doesn’t align producer execution dates; add your own checks if matching dates are required.
How do I pick the correct event for each asset when multiple inputs trigger a run?Use the triggering_asset_events mapping keyed by Asset(uri) to select the relevant event(s) per asset (often the first event in the list). A small helper (for example, a user-defined macro) can fetch the first event for a given URI, whose metadata you then use to build input paths.
Can I combine asset-driven triggers with a time-based cadence?Yes. Use AssetOrTimeSchedule with a time timetable (for example, CronTriggerTimetable) and a set of assets. The DAG will run when either the cron fires or the asset expression triggers. Be mindful of differing timetable semantics (such as data intervals) and handle them in your DAG logic.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Data Pipelines with Apache Airflow, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Data Pipelines with Apache Airflow, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Data Pipelines with Apache Airflow, Second Edition ebook for free