Check a delivery
Let a bad delivery fail visibly
Continue with orders from chapter 2. Supply one negative amount and retain the blocked result instead of throwing an error.
bad_delivery <- data.frame(id = 1:3, amount = c(25, -75, 50))
checked <- dr_run(orders, data = bad_delivery,
write = FALSE, stop_on_failure = FALSE)
checked$status
# "blocked"
dr_quality_report(checked)
The rejected row has id = 2 and amount = -75. The product definition stays reusable: fix the delivery, not the rule.
next_delivery <- data.frame(id = 1:3, amount = c(25, 75, 50))
result <- dr_run(orders, data = next_delivery, write = FALSE)
dr_collect(result)
Understand the boundary
write = FALSE suppresses framework target, catalog and run-evidence writes, including upstream products. It still reads sources and runs user functions, which can have their own side effects. It does not reserve the checked source for a later run.
Use action = "warn" for a non-blocking rule. Quarantine removes rejected rows before writing. Read the function reference before changing thresholds or introducing volatile checks.
Diagnose a thrown failure
dr_last_failure() retrieves retained evidence after an error. dataraft.core::dr_quality_errors(result) exposes locally retained exceptions. Exported reports omit raw exception text.