check_lookup_table {rolap} | R Documentation |
Check the result of joining a flat table with a lookup table
Description
Before joining a flat table with a lookup table we can check the result to determine if we need to adapt the values of some instances or add new elements to the lookup table. This function returns the values of the foreign key of the flat table that do not correspond to the primary key of the lookup table.
Usage
check_lookup_table(ft, fk_attributes, lookup)
## S3 method for class 'flat_table'
check_lookup_table(ft, fk_attributes = NULL, lookup)
Arguments
ft |
A |
fk_attributes |
A vector of strings, attribute names. |
lookup |
A |
Details
If no attributes are indicated, those that form the primary key of the lookup table are considered in the flat table.
Value
A tibble
with attribute values.
See Also
Other flat table join functions:
get_pk_attribute_names()
,
join_lookup_table()
,
lookup_table()
Examples
lookup <- flat_table('iris', iris) |>
lookup_table(
measures = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"),
measure_agg = c('MAX', 'MIN', 'SUM', 'MEAN')
)
values <- flat_table('iris', iris) |>
check_lookup_table(lookup = lookup)
[Package rolap version 2.5.1 Index]