From f75bb470c39d12bfbd5a782e1743c9b3f80caecf Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Mon, 14 Nov 2022 15:36:03 -0500 Subject: [PATCH] fix(ingest): init dataset props if missing in transformer (#6429) --- .../datahub/ingestion/transformer/add_dataset_properties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_properties.py b/metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_properties.py index 76d89c68b89033..601a8eb612cd23 100644 --- a/metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_properties.py +++ b/metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_properties.py @@ -90,8 +90,8 @@ def transform_aspect( in_dataset_properties_aspect: DatasetPropertiesClass = cast( DatasetPropertiesClass, aspect ) - - assert in_dataset_properties_aspect + if not in_dataset_properties_aspect: + in_dataset_properties_aspect = DatasetPropertiesClass() out_dataset_properties_aspect: DatasetPropertiesClass = copy.deepcopy( in_dataset_properties_aspect