From 0740b01624cd73fbb2d353defeb97debe0eccc47 Mon Sep 17 00:00:00 2001 From: Imri Paran Date: Wed, 10 Jul 2024 14:02:49 +0200 Subject: [PATCH] MINOR: log context when failing to yield table (#16977) * chore: log context when failing to yield table * changed error to db/schema/table --- .../metadata/ingestion/source/database/common_db_source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/source/database/common_db_source.py b/ingestion/src/metadata/ingestion/source/database/common_db_source.py index 338be3e9d25..3720ab61feb 100644 --- a/ingestion/src/metadata/ingestion/source/database/common_db_source.py +++ b/ingestion/src/metadata/ingestion/source/database/common_db_source.py @@ -567,7 +567,10 @@ class CommonDbSourceService( self.context.get_global().table_views.append(table_view) except Exception as exc: - error = f"Unexpected exception to yield table [{table_name}]: {exc}" + error = ( + f"Unexpected exception to yield table " + f"(database=[{self.context.get().database}], schema=[{schema_name}], table=[{table_name}]): {exc}" + ) yield Either( left=StackTraceError( name=table_name, error=error, stackTrace=traceback.format_exc()