H20 Reuse one model table
Use your current course session. Preparation and course runner · R script ↓
H20 Reuse one model table
Goal: Select a member table deliberately.
Prerequisites: H19.
The table argument selects one table from a successful model result.
training_step(
"H20",
{
selected_product <- dr_product(
"portfolio.policies",
model_run,
table = "policies"
)
selected_run <- dr_run(selected_product, write = FALSE)
selected_rows <- dr_collect(selected_run)
print(selected_rows)
stopifnot(nrow(selected_rows) == 6L)
},
needs = c("H19")
)Expected result: Six policies with customer and broker IDs.
Task: Have we lost the dm model?
Show solution
No. model_run is still available; the new product is a selected view.