uranusjr commented on code in PR #55408:
URL: https://github.com/apache/airflow/pull/55408#discussion_r2340907789


##########
airflow-core/docs/authoring-and-scheduling/assets.rst:
##########
@@ -106,6 +106,33 @@ This can be used to supply custom description to the 
asset, such as who has owne
 
 .. note:: **Security Note:** Asset URI and extra fields are not encrypted, 
they are stored in cleartext in Airflow's metadata database. Do NOT store any 
sensitive values, especially credentials, in either asset URIs or extra key 
values!
 
+Event extra information on asset events
+---------------------------------------
+
+In addition to static extra information, Airflow also supports attaching 
dynamic information to individual asset events using the event_extra_template 
parameter.
+
+This dictionary supports Jinja templating, allowing runtime values such as 
execution dates, run IDs, or task-specific information to be rendered when the 
asset event is emitted.
+
+.. code-block::
+
+    templated_asset = Asset(
+        "s3://asset/example.csv",
+        event_extra_template={
+            "dag_id": "{{ dag.dag_id }}",
+            "run_id": "{{ run_id }}",
+            "execution_date": "{{ ds }}",
+        },
+    )
+
+    At runtime, the templates are rendered in the task's execution context, 
and the resulting dictionary is attached to the emitted AssetEvent. This allows 
metadata such as row counts, partitions, or execution identifiers to be 
recorded for each specific event.

Review Comment:
   ```suggestion
       At runtime, the templates are rendered in the task's execution context, 
and the resulting dictionary is attached to the emitted asset event's 
``extra``. This allows metadata such as row counts, partitions, or execution 
identifiers to be recorded for each specific event.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to