Lee-W commented on code in PR #68886:
URL: https://github.com/apache/airflow/pull/68886#discussion_r3457789382


##########
airflow-core/docs/core-concepts/asset-state-store.rst:
##########
@@ -37,6 +37,30 @@ When is ``asset_state_store`` available?
 
 When using asset state store within a task, ``context["asset_state_store"]`` 
is populated for **concrete** :class:`~airflow.sdk.definitions.asset.Asset` 
inlets and outlets. A task must declare at least one concrete inlet or outlet 
for ``asset_state_store`` to contain any entries.
 
+If a task has no inlets or outlets and accesses 
``context["asset_state_store"]``, a ``KeyError`` is raised at runtime. Declare 
at least one asset inlet or outlet on the task to use asset state store.
+
+This applies to both the ``@asset`` pattern and the ``@task`` pattern:
+
+.. code-block:: python
+
+    from airflow.sdk import Asset, DAG, asset, task
+
+    my_asset = Asset("my_data", uri="s3://bucket/my_data")
+
+
+    # @asset DAGs implicitly declare the asset as an outlet

Review Comment:
   ```suggestion
       # @asset Dags implicitly declare the asset as an outlet
   ```



-- 
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