bolkedebruin commented on code in PR #28333:
URL: https://github.com/apache/airflow/pull/28333#discussion_r1049586025
##########
airflow/datasets/__init__.py:
##########
@@ -42,3 +43,13 @@ def _check_uri(self, attr, uri: str):
parsed = urlsplit(uri)
if parsed.scheme and parsed.scheme.lower() == "airflow":
raise ValueError(f"{attr.name!r} scheme `airflow` is reserved")
+
+
+class any_of(UserList):
+ """
+ Custom collection to represent a list of Datasets that will trigger a
+ DAG run when any of them is updated.
+ """
+
+ def __init__(self, *datasets: Dataset):
+ super().__init__([*datasets])
Review Comment:
Looking at it further I don't think implementing this as a class makes
sense. It isn't equivalent to a Dataset. We are coercing the rule now into
Dataset-like thing which isnt sound imho.
--
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]