Lee-W commented on code in PR #37176:
URL: https://github.com/apache/airflow/pull/37176#discussion_r1487135574
##########
airflow/api_connexion/endpoints/dataset_endpoint.py:
##########
@@ -124,3 +130,153 @@ def get_dataset_events(
return dataset_event_collection_schema.dump(
DatasetEventCollection(dataset_events=events,
total_entries=total_entries)
)
+
+
+def _generate_queue_event_where_clause(
+ *,
+ dag_id: str | None = None,
+ dataset_id: int | None = None,
+ uri: str | None = None,
+ before: str | None = None,
+) -> list:
+ """Get DatasetDagRunQueue where clause."""
+ where_clause = []
+ if dag_id is not None:
+ where_clause.append(DatasetDagRunQueue.target_dag_id == dag_id)
+ if dataset_id is not None:
+ where_clause.append(DatasetDagRunQueue.dataset_id == dataset_id)
+ if uri is not None:
+ where_clause.append(DatasetModel.uri == uri)
+ if before is not None:
+ where_clause.append(DatasetDagRunQueue.created_at <
format_datetime(before))
+ return where_clause
+
+
[email protected]_access_dataset("GET")
Review Comment:
Sure! Just added it. Thanks!
--
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]