dstandish commented on code in PR #24743:
URL: https://github.com/apache/airflow/pull/24743#discussion_r914270777


##########
airflow/models/dag.py:
##########
@@ -2509,6 +2524,67 @@ def bulk_write_to_db(cls, dags: Collection["DAG"], 
session=NEW_SESSION):
 
         DagCode.bulk_sync_to_db(filelocs, session=session)
 
+        from airflow.models.dataset import Dataset
+        from airflow.models.dataset_dag_ref import DatasetDagRef
+        from airflow.models.dataset_task_ref import DatasetTaskRef

Review Comment:
   I see so you are thinking that DatasetTaskRef could be like the Association 
object in the example, and Dataset would be like Child.  It seems like it would 
work with DatasetDagRef.  But with DatasetTaskRef, since we don't have a Task 
table, we might not be able to use this approach.... But also, a lot of those 
lines are for extracting the dataset references from tasks in the dag.  Anyway, 
may be something we can simplify somehow or another.



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