Skip to content

Commit 47bf1f9

Browse files
authored
fix(ingestion/airflow-plugin): replace deprecated calls (#10238)
1 parent 995af4e commit 47bf1f9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

metadata-ingestion-modules/airflow-plugin/src/datahub_airflow_plugin/client/airflow_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def generate_datajob(
274274
if config and config.datajob_url_link == DatajobUrl.GRID:
275275
datajob.url = f"{base_url}/dags/{datajob.flow_urn.get_flow_id()}/grid?task_id={task.task_id}"
276276
else:
277-
datajob.url = f"{base_url}/taskinstance/list/?flt1_dag_id_equals={datajob.flow_urn.get_flow_id()}&_flt_3_task_id={task.task_id}"
277+
datajob.url = f"{base_url}/taskinstance/list/?flt1_dag_id_equals={datajob.flow_urn.flow_id}&_flt_3_task_id={task.task_id}"
278278

279279
if capture_owner and dag.owner:
280280
datajob.owners.add(dag.owner)

metadata-ingestion/src/datahub/api/entities/datajob/datajob.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class DataJob:
6161

6262
def __post_init__(self):
6363
job_flow_urn = DataFlowUrn.create_from_ids(
64-
env=self.flow_urn.get_env(),
65-
orchestrator=self.flow_urn.get_orchestrator_name(),
66-
flow_id=self.flow_urn.get_flow_id(),
64+
env=self.flow_urn.cluster,
65+
orchestrator=self.flow_urn.orchestrator,
66+
flow_id=self.flow_urn.flow_id,
6767
)
6868
self.urn = DataJobUrn.create_from_ids(
6969
data_flow_urn=str(job_flow_urn), job_id=self.id
@@ -87,7 +87,7 @@ def generate_ownership_aspect(self) -> Iterable[OwnershipClass]:
8787
],
8888
lastModified=AuditStampClass(
8989
time=0,
90-
actor=builder.make_user_urn(self.flow_urn.get_orchestrator_name()),
90+
actor=builder.make_user_urn(self.flow_urn.orchestrator),
9191
),
9292
)
9393
return [ownership]

metadata-ingestion/src/datahub/api/entities/dataprocess/dataprocess_instance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ def from_datajob(
301301
:return: DataProcessInstance
302302
"""
303303
dpi: DataProcessInstance = DataProcessInstance(
304-
orchestrator=datajob.flow_urn.get_orchestrator_name(),
305-
cluster=datajob.flow_urn.get_env(),
304+
orchestrator=datajob.flow_urn.orchestrator,
305+
cluster=datajob.flow_urn.cluster,
306306
template_urn=datajob.urn,
307307
id=id,
308308
)

0 commit comments

Comments
 (0)