From a2655f415c6fb893ce72c628f3d24c04a640b5db Mon Sep 17 00:00:00 2001 From: Kevin Karch Date: Thu, 6 Nov 2025 16:23:48 -0500 Subject: [PATCH 1/3] fix(logs): Warn instead of error on schema extract failure --- .../src/datahub/ingestion/source/s3/source.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/s3/source.py b/metadata-ingestion/src/datahub/ingestion/source/s3/source.py index ea55fa2e311cd9..d9251700c22901 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/s3/source.py +++ b/metadata-ingestion/src/datahub/ingestion/source/s3/source.py @@ -734,9 +734,9 @@ def ingest_table( platformSchema=OtherSchemaClass(rawSchema=""), ) aspects.append(schema_metadata) - except Exception as e: - logger.error( - f"Failed to extract schema from file {table_data.full_path}. The error was:{e}" + except Exception: + self.report.report_warning( + "Failed to extract schema from file {table_data.full_path}. The error was:{e}" ) else: logger.info( From 9d812451afbd475f2d3f994d16f56c8579eff4d7 Mon Sep 17 00:00:00 2001 From: Kevin Karch Date: Wed, 12 Nov 2025 08:54:06 -0500 Subject: [PATCH 2/3] Update metadata-ingestion/src/datahub/ingestion/source/s3/source.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sergio Gómez Villamor --- metadata-ingestion/src/datahub/ingestion/source/s3/source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/s3/source.py b/metadata-ingestion/src/datahub/ingestion/source/s3/source.py index d9251700c22901..67fd98248528fd 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/s3/source.py +++ b/metadata-ingestion/src/datahub/ingestion/source/s3/source.py @@ -736,7 +736,10 @@ def ingest_table( aspects.append(schema_metadata) except Exception: self.report.report_warning( - "Failed to extract schema from file {table_data.full_path}. The error was:{e}" + title="Failed to extract schema from file", + message="Schema may be missed for dataset because of failure when extracting schema from file", + context=f"dataset={table_data.display_name}, file={table_data.full_path}", + exc=e, ) else: logger.info( From d0992ebde305009ee5ab8212dd99d04c89f1029a Mon Sep 17 00:00:00 2001 From: Kevin Karch Date: Wed, 12 Nov 2025 09:21:44 -0500 Subject: [PATCH 3/3] fix error with missing e --- metadata-ingestion/src/datahub/ingestion/source/s3/source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/s3/source.py b/metadata-ingestion/src/datahub/ingestion/source/s3/source.py index 67fd98248528fd..01e38b42ee5bd8 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/s3/source.py +++ b/metadata-ingestion/src/datahub/ingestion/source/s3/source.py @@ -734,7 +734,7 @@ def ingest_table( platformSchema=OtherSchemaClass(rawSchema=""), ) aspects.append(schema_metadata) - except Exception: + except Exception as e: self.report.report_warning( title="Failed to extract schema from file", message="Schema may be missed for dataset because of failure when extracting schema from file",