mobuchowski commented on code in PR #49237:
URL: https://github.com/apache/airflow/pull/49237#discussion_r2055797306


##########
providers/openlineage/src/airflow/providers/openlineage/plugins/macros.py:
##########
@@ -101,3 +87,44 @@ def lineage_parent_id(task_instance: TaskInstance):
             lineage_run_id(task_instance),
         )
     )
+
+
+def lineage_root_parent_id(task_instance: TaskInstance):
+    return "/".join(
+        (
+            lineage_job_namespace(),
+            lineage_root_job_name(task_instance),
+            lineage_root_run_id(task_instance),
+        )
+    )
+
+
+def lineage_root_job_name(task_instance: TaskInstance):
+    return task_instance.dag_id
+
+
+def lineage_root_run_id(task_instance: TaskInstance):
+    return OpenLineageAdapter.build_dag_run_id(
+        dag_id=task_instance.dag_id,
+        logical_date=_get_logical_date(task_instance),
+        clear_number=task_instance.dag_run.clear_number,
+    )

Review Comment:
   There would need to be a mechanism to propagate this information to a task - 
which there is not right now. 
   I don't know how would it work, so I think it's futile to try to fit this in 
right now.



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