H03 Run without saving data
Use your current course session. Preparation and course runner · R script ↓
H03 Run without saving data
Goal: Distinguish a product, a run result and an output table.
Prerequisites: policy_product from H02.
dr_run(write=FALSE) reads the source and runs configured preparation and checks, while suppressing DataRaft target and evidence writes. Sources and custom callbacks still execute and can have their own side effects. dr_collect retrieves the output.
policy_run <- dr_run(policy_product, write = FALSE)
print(policy_run)
policy_rows <- dr_collect(policy_run)
print(policy_rows)
stopifnot(identical(policy_run$status, "completed"))
stopifnot(identical(policy_run$validation_status, "unvalidated"))
stopifnot(isTRUE(all.equal(as.data.frame(policy_rows), policies)))Expected result: Status completed and six unchanged rows. Without an explicit contract, validation is unvalidated; completion alone does not prove business quality.
Task: Which object is the definition, which holds run status, and which is a table?
Show solution
policy_product, policy_run and policy_rows respectively. Next, declare the expected structure.