H36 Read and verify a report
Use your current course session. Preparation and course runner · R script ↓
H36 Read and verify a report
Goal: Reproduce results after a later delivery.
Prerequisites: H35.
Report values stay bound to the original release. Integrity and business correctness are separate questions.
training_step(
"H36",
{
report_before <- dataraft.metrics::dr_report_read(
training_lake,
"training.august.v1",
values_only = TRUE
)
changed_dates <- dated_policies
changed_dates$cancel_date[1] <- as.Date("2026-08-20")
cohort_later <- dr_publish(
cohort_product,
data = changed_dates,
to = training_lake
)
report_after <- dataraft.metrics::dr_report_read(
training_lake,
"training.august.v1",
values_only = TRUE
)
stopifnot(identical(report_before, report_after))
report_verification <- dataraft.metrics::dr_report_verify(
training_lake,
"training.august.v1",
metrics = portfolio_metrics
)
print(report_verification)
stopifnot(
all(report_verification$integrity == "match"),
all(report_verification$replay == "match")
)
},
needs = c("H35"),
enabled = training_options$lake,
optional = TRUE
)Expected result: Historical report values remain identical.
Task: Does successful integrity verification prove the cancellation definition is correct?
Show solution
No. The business definition needs separate review.