From c38bb91519e0005f6e8a0a2d648bd1c77fac97bb Mon Sep 17 00:00:00 2001 From: Aseem Bansal Date: Tue, 5 Sep 2023 21:50:27 +0530 Subject: [PATCH] fix(elastic): improve error handling for profiling (#8785) --- .../src/datahub/ingestion/source/elastic_search.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/elastic_search.py b/metadata-ingestion/src/datahub/ingestion/source/elastic_search.py index 0549a518d9..7ec71a22f6 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/elastic_search.py +++ b/metadata-ingestion/src/datahub/ingestion/source/elastic_search.py @@ -553,8 +553,10 @@ class ElasticsearchSource(Source): row_count = 0 size_in_bytes = 0 for profile_info in profile_info_current: - row_count += int(profile_info["docs.count"]) - size_in_bytes += int(profile_info["store.size"]) + if profile_info["docs.count"] is not None: + row_count += int(profile_info["docs.count"]) + if profile_info["store.size"] is not None: + size_in_bytes += int(profile_info["store.size"]) yield MetadataChangeProposalWrapper( entityUrn=dataset_urn, aspect=DatasetProfileClass(