H12 Configure a local target
Use your current course session. Preparation and course runner · R script ↓
H12 Configure a local target
Goal: Describe storage without writing.
Prerequisites: H09; dataraft.adapters.
The RDS adapter manages versions in a directory. Its constructor only describes the target.
training_step(
"H12",
{
rds_path <- file.path(training_root, "policies-rds")
rds_target <- dataraft.adapters::dr_target_rds(rds_path)
rds_product <- prepared_product |> dr_set_target(rds_target)
rds_trial <- dr_run(rds_product, write = FALSE)
stopifnot(!dir.exists(rds_path))
print(rds_trial)
},
needs = c("H09"),
packages = c("dataraft.adapters")
)Expected result: The check-only run creates no output directory.
Task: Why explicitly set write=FALSE?
Show solution
Otherwise dr_run can execute the configured target.