dr_lookup_spec()
Defines an enrichment independently of a product or recipe. Use
dr_set_engine()
to select dm constraint checks, then attach it with
dr_step_transform().
Usage
dr_lookup_spec(
source,
by,
unmatched = c("error", "keep"),
suffix = c(".x", ".y"),
name = NULL,
table = NULL
)Arguments
- source
- Reference data, path, source adapter, product or successful result.
- by
- Equality keys as a character vector, named vector or
dplyr::join_by(). - unmatched
- Whether unmatched input rows fail or retain missing attributes.
- suffix
- Two suffixes for overlapping non-key column names.
- name
- Stable reference delivery name for source replacement.
- table
- Member table to select from a successful model result.
Value
A deferred lookup transformation specification.
Examples
customers <- data.frame(id = 1:2, region = c("North", "South"))
lookup <- dr_lookup_spec(customers, by = "id", name = "customers") |>
dr_set_engine("dm")
dr_recipe() |> dr_step_transform(lookup)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.