From e3d507bad3a4254c85b75cc987a14dba2f3a5795 Mon Sep 17 00:00:00 2001 From: Edward Louth Date: Mon, 6 Nov 2023 09:51:09 +0000 Subject: [PATCH] Openlineage namespaces (#774) --- grai-server/app/connections/adapters/open_lineage.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/grai-server/app/connections/adapters/open_lineage.py b/grai-server/app/connections/adapters/open_lineage.py index caae048fb..e83b57eb5 100644 --- a/grai-server/app/connections/adapters/open_lineage.py +++ b/grai-server/app/connections/adapters/open_lineage.py @@ -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( @@ -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