Skip to contents

Takes the result of match_columns() and writes two files: a per-dataset match log and (optionally) an issues log from clean_dataset(). A master log that accumulates entries across all datasets is also updated.

Usage

export_match_log(
  match_result,
  issues_dt = NULL,
  dataset_label = "",
  year_tag = NA,
  log_dir = "logs/matching",
  append_master = TRUE
)

Arguments

match_result

List returned by match_columns().

issues_dt

data.table of issues from clean_dataset(), or NULL to skip the issues log.

dataset_label

Human-readable label (used in filenames and metadata).

year_tag

Integer year for traceability. Default NA.

log_dir

Directory where CSV logs are written. Created if absent.

append_master

If TRUE (default), updates the master log CSV.

Value

The annotated log data.table for this dataset, invisibly.

Details

Each concern is handled by a dedicated internal helper so the function body reads as a plain checklist of steps.