@@ -369,7 +369,7 @@ class SnapshotWriter:
369369 "TOTALS" : {"ENTITY_COUNT" : 0 , "RECORD_COUNT" : 0 },
370370 "DATA_SOURCES" : {},
371371 "CROSS_SOURCES" : {},
372- "MULTI_SOURCES " : {},
372+ "ENTITY_SOURCES " : {},
373373 "ENTITY_SIZES" : {},
374374 }
375375 self .initialize_match_levels (["TOTALS" ])
@@ -482,7 +482,7 @@ class SnapshotWriter:
482482 # if len(entity0_sources) > 1:
483483 # include single source so can find non-matches, ie customers not on watch list or in reference file
484484 multi_source_key = "||" .join (sorted (entity0_sources .keys ()))
485- self .update_stat_pack (["MULTI_SOURCES " , multi_source_key ], {"ENTITY_COUNT" : 1 , "SAMPLE" : [entity_id ]})
485+ self .update_stat_pack (["ENTITY_SOURCES " , multi_source_key ], {"ENTITY_COUNT" : 1 , "SAMPLE" : [entity_id ]})
486486 elif related_id > entity_id :
487487 sample = f"{ entity_id } { related_id } "
488488 principle_matchkey = list (resume_data [related_id ]["PRINCIPLES" ].keys ())[0 ]
@@ -510,10 +510,11 @@ def check_stat_pack(stats_file_name, csv_file_name, args):
510510 abort = False
511511 stat_pack = json .load (open (stats_file_name ))
512512 prior_status = "unknown"
513- entity_count = 0
513+ entity_count = "?"
514514 if stat_pack .get ("PROCESS" ):
515515 prior_status = stat_pack ["PROCESS" ]["STATUS" ]
516- entity_count = stat_pack ["TOTALS" ]["ENTITY_COUNT" ]
516+ if stat_pack .get ("TOTALS" ):
517+ entity_count = stat_pack ["TOTALS" ].get ("ENTITY_COUNT" , "?" )
517518 print (f"\n { prior_status } snapshot file exists with { entity_count } entities processed!" )
518519 if args .quiet :
519520 print ("PRIOR FILES WILL BE OVERWRITTEN" )
0 commit comments