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


##########
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:
   As long as we can access it via `TaskInstance` - that would make sense, but 
is also orthogonal from this PR itself - as we don't block the future solution.



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