PRECONDITIONS ARE CHECKED FIRST, and this is not a nicety. A rule whose input
measurement type is absent returns zero rows, which is indistinguishable from
"the data is clean" — a false pass. The three bottle-vs-sensor calibration rules
did exactly that against release v2026.07.30, which carries only btl_ammonium
because it predates the change making the other bottle-reference types canonical.
A QA/QC tool that reports green without having checked anything is worse than no
tool, so an unmet precondition is skip, never pass.
Usage
qc_run_rule(
con,
rule,
limit = 500L,
present_types = NULL,
scope_values = list()
)Arguments
- con
a DBI connection carrying the tables the rule targets
- rule
one row of
qc_read_rules()- limit
cap on rows returned. The
COUNTis always computed over the full result, so a truncated display never understates the problem — a rule that silently showed 500 of 40,000 hits would read as "minor".- present_types
output of
qc_present_types();NULLdisables the check- scope_values
named list supplying scope parameters, e.g.
list(cruise_key = "2023-11-33P4"). A rule withscope = "cruise"reads the full-resolutionobs_ctd_fulland is meaningless unscoped, so it SKIPS rather than silently scanning everything.