Skip to content

Commit

Permalink
Fix OpenLineage ingestor (open-metadata#16416)
Browse files Browse the repository at this point in the history
* Fix OpenLineage ingestor

* py format

---------

Co-authored-by: ulixius9 <[email protected]>
  • Loading branch information
dolfinus and ulixius9 authored May 27, 2024
1 parent 732a137 commit 18b2a22
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class OpenlineageSource(PipelineServiceSource):
"""

@classmethod
def create(cls, config_dict, metadata: OpenMetadata):
def create(
cls, config_dict, metadata: OpenMetadata, pipeline_name: Optional[str] = None
):
"""Create class instance"""
config: WorkflowSource = WorkflowSource.parse_obj(config_dict)
connection: OpenLineageConnection = config.serviceConnection.__root__.config
Expand Down Expand Up @@ -379,7 +381,7 @@ def yield_pipeline(
{json.dumps(pipeline_details.run_facet, indent=4).strip()}```"""
request = CreatePipelineRequest(
name=pipeline_name,
service=self.context.pipeline_service,
service=self.context.get().pipeline_service,
description=description,
)

Expand Down Expand Up @@ -433,8 +435,8 @@ def yield_pipeline_lineage_details(
pipeline_fqn = fqn.build(
metadata=self.metadata,
entity_type=Pipeline,
service_name=self.context.pipeline_service,
pipeline_name=self.context.pipeline,
service_name=self.context.get().pipeline_service,
pipeline_name=self.context.get().pipeline,
)

pipeline_entity = self.metadata.get_by_name(entity=Pipeline, fqn=pipeline_fqn)
Expand Down

0 comments on commit 18b2a22

Please sign in to comment.