uranusjr commented on code in PR #43142:
URL: https://github.com/apache/airflow/pull/43142#discussion_r1806155239
##########
airflow/assets/__init__.py:
##########
@@ -372,6 +372,26 @@ def iter_dag_dependencies(self, *, source: str, target:
str) -> Iterator[DagDepe
)
+class Dataset(Asset):
+ """Subclass of asset."""
+
+ group: str = "dataset"
+
+ def __init__(self, *args, **kwargs) -> None:
+ kwargs["group"] = Dataset.group
+ super().__init__(*args, **kwargs)
Review Comment:
This silently overrides `group`; not sure if that’s a good thing.
Maybe we should still allow the user to override group, with `dataset` only
being a default? And maybe we should add a class-level variable on Asset and
subclasses that’s not expected to be overridden (`asset_type` or something?
similar to how each operator class has an `task_type`)
--
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]