dr_validate()
With a table and contract, returns quality evidence. With a composed product
or pipeline alone, checks its configuration and returns the definition.
Preflight does not evaluate source callbacks or prove data quality.
Usage
dr_validate(data, contract = NULL, ...)
\method{dr_validate}{default}(
data,
contract,
stage = "candidate",
keep_agents = FALSE,
keep_errors = FALSE,
...
)Arguments
- data
- A data frame, lazy table, composed product or pipeline.
- contract
- Contract definition.
- ...
- Arguments forwarded to a validation method.
- stage
- Label stored with each check, such as
"ingest"or"candidate". - keep_agents
- Retain interrogated pointblank agents as an in-memory
attribute for
dr_pointblank_report(). Defaults toFALSE. - keep_errors
- Retain original R conditions in an in-memory
dr_errorsattribute. They can contain private data and are never persisted in the registry. Inspect withdr_quality_errors(). Defaults toFALSE.
Value
For data, a tibble with one row per check; only passed and warning
permit publication. For a workflow, the validated definition.
Examples
contract <- dr_contract(
"orders", version = "1.0.0",
columns = c(order_id = "integer", amount = "numeric"), key = "order_id"
)
dr_validate(data.frame(order_id = 1:2, amount = c(25, 75)), contract)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.