Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ def lineage_parent_id(task_instance: TaskInstance):


def lineage_root_parent_id(task_instance: TaskInstance):
"""
Macro function which returns a unique identifier of given task that can be used to create root information for ParentRunFacet.

This identifier is composed of the namespace, dag name, and generated run id for given dag, structured
as '{namespace}/{job_name}/{run_id}'.

.. seealso::
For more information take a look at the guide:
:ref:`howto/macros:openlineage`
"""
return "/".join(
(
lineage_job_namespace(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
lineage_job_name,
lineage_job_namespace,
lineage_parent_id,
lineage_root_job_name,
lineage_root_parent_id,
lineage_root_run_id,
lineage_run_id,
)

Expand All @@ -37,7 +40,15 @@ class OpenLineageProviderPlugin(AirflowPlugin):

name = "OpenLineageProviderPlugin"
if not conf.is_disabled():
macros = [lineage_job_namespace, lineage_job_name, lineage_run_id, lineage_parent_id]
macros = [
lineage_job_namespace,
lineage_job_name,
lineage_run_id,
lineage_parent_id,
lineage_root_run_id,
lineage_root_job_name,
lineage_root_parent_id,
]
listeners = [get_openlineage_listener()]
from airflow.lineage.hook import HookLineageReader

Expand Down