dirrao commented on code in PR #37512:
URL: https://github.com/apache/airflow/pull/37512#discussion_r1493964274


##########
airflow/api_connexion/endpoints/dataset_endpoint.py:
##########
@@ -74,7 +77,13 @@ def get_datasets(
 
     total_entries = session.scalars(select(func.count(DatasetModel.id))).one()
     query = select(DatasetModel)
-    if uri_pattern:
+    if dag_ids:
+        dags_list = dag_ids.split(",")
+        query = query.filter(
+            
(DatasetModel.consuming_dags.any(DagScheduleDatasetReference.dag_id.in_(dags_list)))
+            | 
(DatasetModel.producing_tasks.any(TaskOutletDatasetReference.dag_id.in_(dags_list)))
+        )
+    elif uri_pattern:

Review Comment:
   what is the expected behavior when we mention both of them?



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