From a691144ff819a13dba77e9bf43e664dc8ab95851 Mon Sep 17 00:00:00 2001 From: Andrew Sikowitz Date: Tue, 9 Apr 2024 08:59:43 -0700 Subject: [PATCH] fix(ingest/unity): Fix bug around unity notebook ingestion --- .../src/datahub/ingestion/source/unity/source.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/unity/source.py b/metadata-ingestion/src/datahub/ingestion/source/unity/source.py index 2008991dad72e..d58a12b9cbb0b 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/unity/source.py +++ b/metadata-ingestion/src/datahub/ingestion/source/unity/source.py @@ -489,9 +489,10 @@ def process_table(self, table: Table, schema: Schema) -> Iterable[MetadataWorkUn if self.config.include_notebooks: for notebook_id in table.downstream_notebooks: - self.notebooks[str(notebook_id)] = Notebook.add_upstream( - table.ref, self.notebooks[str(notebook_id)] - ) + if str(notebook_id) in self.notebooks: + self.notebooks[str(notebook_id)] = Notebook.add_upstream( + table.ref, self.notebooks[str(notebook_id)] + ) # Sql parsing is required only for hive metastore view lineage if (