Skip to content

Commit

Permalink
Openlineage namespaces (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
edlouth authored Nov 6, 2023
1 parent b977844 commit e3d507b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion grai-server/app/connections/adapters/open_lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

class OpenLineageAdapter(IntegrationAdapter):
def get_integration(self) -> OpenLineageIntegration:
metadata = self.run.connection.metadata
namespace = self.run.connection.namespace

source = SourceV1.from_spec(
Expand All @@ -16,5 +17,10 @@ def get_integration(self) -> OpenLineageIntegration:
"name": self.run.source.name,
}
)
integration = OpenLineageIntegration(self.run.input, source=source, namespace=namespace)
integration = OpenLineageIntegration(
self.run.input,
source=source,
namespace=namespace,
namespaces=json.loads(metadata["namespaces"]) if metadata.get("namespaces") else None,
)
return integration

0 comments on commit e3d507b

Please sign in to comment.