diff --git a/product2dataset/product2dataset.py b/product2dataset/product2dataset.py index 358591f4..16067d1b 100644 --- a/product2dataset/product2dataset.py +++ b/product2dataset/product2dataset.py @@ -272,8 +272,8 @@ def convert( # Get rid of bunch of data that we don't care about but takes up a lot of space logger.info("dataset_met_json[run_config].keys() = " + str(dataset_met_json["runconfig"].keys())) - dataset_met_json["runconfig"].pop("localize")# This list is the same as lineage so no point in duplicatingq - dataset_met_json["runconfig"]["input_file_group"].pop("input_file_paths") # This list is the same as lineage so no point in duplicating + dataset_met_json["runconfig"]["localize"] = None# This list is the same as lineage so no point in duplicatingq + dataset_met_json["runconfig"]["input_file_group"]["input_file_paths"] = None # This list is the same as lineage so no point in duplicating # "accountability" is added elsewhere in the code so we can't delete it here # dataset_met_json["accountability"]["L3_DISP_S1"]["inputs"] = _DELETED_TEXT # We don't consume this at all @@ -281,9 +281,9 @@ def convert( for file in dataset_met_json["Files"]: logger.info("Files keys: "+ str(file.keys())) logger.info("Removing runconfig and lineage from each file") - file.pop("lineage") # Lineage for the entire product is already at metadata level so no point in duplicating for each file - file["runconfig"].pop("localize") # this is superfulous - file["runconfig"]["input_file_group"].pop("input_file_paths") # this is superfulous + file["lineage"] = None # Lineage for the entire product is already at metadata level so no point in duplicating for each file + file["runconfig"]["localize"] = None # this is superfulous + file["runconfig"]["input_file_group"]["input_file_paths"] = None # this is superfulous logger.info("Reducing lineage string size by truncating basepath of lineage entries") if len(dataset_met_json["lineage"]) > 0: