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


##########
providers/openlineage/src/airflow/providers/openlineage/utils/spark.py:
##########
@@ -35,6 +35,43 @@
 log = logging.getLogger(__name__)
 
 
+class ParentJobInformation(NamedTuple):
+    """Container for OpenLineage parent job information."""
+
+    parent_job_namespace: str
+    parent_job_name: str
+    parent_run_id: str
+    root_parent_job_namespace: str
+    root_parent_job_name: str
+    root_parent_run_id: str
+
+
+def get_parent_job_information(context: Context) -> ParentJobInformation | 
None:
+    """
+    Retrieve parent job information from the Airflow context.

Review Comment:
   Yeah I wanted to not proliferate this code over multiple files - once we 
expand beyond Spark it would make sense to have some `inject.py` file and use 
it. 



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