You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ra...@apache.org on 2026/08/04 12:56:40 UTC
(airflow) branch v3-3-test updated: Clarify AssetAlias usage (#67392) (#71087)
This is an automated email from the ASF dual-hosted git repository.
vatsrahul1001 pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-3-test by this push:
new d3be18ffc2d Clarify AssetAlias usage (#67392) (#71087)
d3be18ffc2d is described below
commit d3be18ffc2dca10336c31a0a4108fdb8eb2c125d
Author: Rahul Vats <43...@users.noreply.github.com>
AuthorDate: Tue Aug 4 18:26:28 2026 +0530
Clarify AssetAlias usage (#67392) (#71087)
(cherry picked from commit 602e74a22a60489fd7bcc81388ddf77cd5aa50de)
Co-authored-by: Silva Dev BR <11...@users.noreply.github.com>
Co-authored-by: Wei Lee <de...@wei-lee.me>
---
airflow-core/docs/authoring-and-scheduling/assets.rst | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/airflow-core/docs/authoring-and-scheduling/assets.rst b/airflow-core/docs/authoring-and-scheduling/assets.rst
index b5561392587..8a3db2b5078 100644
--- a/airflow-core/docs/authoring-and-scheduling/assets.rst
+++ b/airflow-core/docs/authoring-and-scheduling/assets.rst
@@ -328,12 +328,18 @@ The shorthand for this is ``@asset.multi``:
Dynamic data events emitting and asset creation through AssetAlias
-----------------------------------------------------------------------
-An asset alias can be used to emit asset events of assets with association to the aliases. Downstreams can depend on resolved asset. This feature allows you to define complex dependencies for Dag executions based on asset updates.
+Use ``AssetAlias`` when a task must declare an asset dependency before the Asset's fixed attributes
+(like URI or name) are available. The alias is listed in ``outlets`` as a stable name, and the task
+resolves it at runtime by adding one or more concrete ``Asset`` objects through ``outlet_events`` or
+yielded ``Metadata``. Downstream Dags can depend on the alias, and Airflow triggers them when events
+are emitted for the resolved assets.
How to use AssetAlias
~~~~~~~~~~~~~~~~~~~~~~~
-``AssetAlias`` has one single argument ``name`` that uniquely identifies the asset. The task must first declare the alias as an outlet, and use ``outlet_events`` or yield ``Metadata`` to add events to it.
+``AssetAlias`` has one single argument ``name`` that uniquely identifies the alias. The task must
+first declare the alias as an outlet, and then use ``outlet_events`` or yield ``Metadata`` during
+execution to associate the alias with the concrete assets it produced.
The following example creates an asset event against the S3 URI ``f"s3://bucket/my-task"`` with optional extra information ``extra``. If the asset does not exist, Airflow will dynamically create it and log a warning message.