Skip to content

Commit

Permalink
Additional totals added to summary log
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilAppleby committed May 21, 2024
1 parent c0883b9 commit ddafde6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion carrot/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.73'
__version__ = '0.735'
6 changes: 6 additions & 0 deletions carrot/cli/subcommands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,12 @@ def mapstream(rules_file, output_dir, write_mode, person_file, omop_ddl_file, om
else:
key = srcfilename + "~" + datacol +"~" + tgtfile + "~" + outrecord[2] + "~"
metrics.increment_key_count(key, "output_count")
key = srcfilename + "~all~" + tgtfile + "~" + outrecord[2] + "~"
metrics.increment_key_count(key, "output_count")
key = "all~all~" + tgtfile + "~" + outrecord[2] + "~"
metrics.increment_key_count(key, "output_count")
key = "all~all~all~" + outrecord[2] + "~"
metrics.increment_key_count(key, "output_count")
fhd[tgtfile].write("\t".join(outrecord) + "\n")
else:
key = srcfilename + "~all~" + tgtfile + "~all~"
Expand Down
3 changes: 2 additions & 1 deletion carrot/tools/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def get_mapstream_summary(self):
if "output_count" in dvalue:
output_count = str(dvalue["output_count"])

if (int(output_count) >= self.log_threshold) or (tablename == "person"):
#if (int(output_count) >= self.log_threshold) or (tablename == "person"):
if (int(output_count) >= self.log_threshold):
summary_str += self.dataset_name + "\t" + source + "\t" + fieldname + "\t" + tablename + "\t" + concept_id + "\t" + additional +"\t" + input_count + "\t" + invalid_person_ids + "\t" + invalid_date_fields + "\t" + invalid_source_fields + "\t" + output_count + "\n"

return summary_str
Expand Down

0 comments on commit ddafde6

Please sign in to comment.