From b68cd31bdea176fd1721f32014fb964d7121f60e Mon Sep 17 00:00:00 2001 From: Jonny Dixon Date: Thu, 14 Nov 2024 12:40:38 +0000 Subject: [PATCH] Update dremio_api.py --- .../src/datahub/ingestion/source/dremio/dremio_api.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/dremio/dremio_api.py b/metadata-ingestion/src/datahub/ingestion/source/dremio/dremio_api.py index 9a39b891eebbf..acd0e2b10b4a1 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/dremio/dremio_api.py +++ b/metadata-ingestion/src/datahub/ingestion/source/dremio/dremio_api.py @@ -781,7 +781,9 @@ def get_context_for_vds(self, resource_id: str) -> str: context_array = self.get( url=f"/catalog/{resource_id}", ).get("sqlContext") - - return ".".join( - f'"{part}"' if "." in part else f"{part}" for part in context_array - ) + if context_array: + return ".".join( + f'"{part}"' if "." in part else f"{part}" for part in context_array + ) + else: + return ""