Skip to content

Commit

Permalink
[OpenLineage#2489] Fixed remaining references to previous macro argum…
Browse files Browse the repository at this point in the history
…ents.

Some pieces of documentation and tests still referenced the previous
arguments for the `lineage_run_id` and `lineage_parent_id` macros.

Signed-off-by: Fabio Manganiello <[email protected]>
  • Loading branch information
blacklight committed Apr 4, 2024
1 parent 884aaeb commit 46f0855
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ t1 = DataProcPySparkOperator(
job_name=job_name,
dataproc_pyspark_properties={
'spark.driver.extraJavaOptions':
f"-javaagent:{jar}={os.environ.get('OPENLINEAGE_URL')}/api/v1/namespaces/{os.getenv('OPENLINEAGE_NAMESPACE', 'default')}/jobs/{job_name}/runs/{{{{macros.OpenLineagePlugin.lineage_run_id(task, task_instance)}}}}?api_key={os.environ.get('OPENLINEAGE_API_KEY')}"
f"-javaagent:{jar}={os.environ.get('OPENLINEAGE_URL')}/api/v1/namespaces/{os.getenv('OPENLINEAGE_NAMESPACE', 'default')}/jobs/{job_name}/runs/{{{{macros.OpenLineagePlugin.lineage_run_id(task_instance)}}}}?api_key={os.environ.get('OPENLINEAGE_API_KEY')}"
dag=dag)
```

Expand Down
4 changes: 2 additions & 2 deletions integration/airflow/openlineage/airflow/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def lineage_run_id(task_instance: "TaskInstance"):
PythonOperator(
task_id='render_template',
python_callable=my_task_function,
op_args=['{{ lineage_run_id(task, task_instance) }}'], # lineage_run_id macro invoked
op_args=['{{ lineage_run_id(task_instance) }}'], # lineage_run_id macro invoked
provide_context=False,
dag=dag
)
Expand All @@ -41,7 +41,7 @@ def lineage_parent_id(task_instance: "TaskInstance"):
PythonOperator(
task_id='render_template',
python_callable=my_task_function,
op_args=['{{ lineage_parent_id(task, task_instance) }}'], # macro invoked
op_args=['{{ lineage_parent_id(task_instance) }}'], # macro invoked
provide_context=False,
dag=dag
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from airflow.utils.dates import days_ago
from airflow.version import version as AIRFLOW_VERSION

PLUGIN_MACRO = "{{ macros.OpenLineagePlugin.lineage_parent_id(task, task_instance) }}"
PLUGIN_MACRO = "{{ macros.OpenLineagePlugin.lineage_parent_id(task_instance) }}"


PROJECT_DIR = "/opt/data/dbt/testproject"
Expand Down

0 comments on commit 46f0855

Please sign in to comment.