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


##########
task-sdk/src/airflow/sdk/definitions/asset/metadata.py:
##########
@@ -31,8 +31,15 @@
 
 @attrs.define(init=True)
 class Metadata:
-    """Metadata to attach to an AssetEvent."""
+    """
+    Metadata to attach to an AssetEvent.
+
+    ``extra`` is a JSON-serializable mapping merged onto the outlet event.
+    ``partition_key`` is an optional identity for partitioned consumers; it is
+    not inferred from ``extra``.
+    """
 
     asset: Asset
     extra: dict[str, JsonValue] = attrs.field(factory=dict)
     alias: AssetAlias | None = None
+    partition_key: str | None = None

Review Comment:
   should we just make it `partition_keys` instead? so that it works the same 
as its outlet_events counter part



##########
airflow-core/newsfragments/71999.bugfix.rst:
##########
@@ -0,0 +1 @@
+Add optional ``Metadata.partition_key`` so yielding ``Metadata`` records 
partitions the same way as ``outlet_events.add_partitions``.

Review Comment:
   I kinda feel like it's more like a feature instead of a bug. It's not really 
breaking anything. Just didn't have the same degree of support



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