dr_contract_policy()
Keep identity, columns and keys in
dr_contract() and compose policy only
when required. This builds a new definition without I/O. Changing a registered
contract still requires a new version before registration or publication.
Usage
dr_contract_policy(
x,
required = x$required,
allow_empty = x$allow_empty,
allow_extra = x$allow_extra,
max_age_hours = x$max_age_hours,
constraints = x$constraints
)Arguments
- x
- Contract specification.
- required
- Non-null columns; keys always remain non-null.
- allow_empty, allow_extra
- Whether empty deliveries or extra columns are allowed.
- max_age_hours
- Freshness limit, or NULL for no freshness monitoring.
- constraints
- Named per-column min, max, enum, nullable, timezone or precision checks.
Value
An updated contract specification.
Examples
dr_contract("orders", columns = c(id = "integer"), key = "id") |>
dr_contract_policy(allow_extra = TRUE)Documentation source snapshot · View source at d9cb454 ↗
Code examples are documented source examples; they are not executed in this website build.
Code examples are documented source examples; they are not executed in this website build.