View source: R/star_schema_enrich_dimension.R
| enrich_dimension_import_test | R Documentation |
tibble to test to enrich a dimensionFor a dimension of a star schema a tibble is attached. This contains
dimension attributes and new attributes. If values associated with all rows
in the dimension are included in the tibble, the dimension is enriched with
the new attributes. This function checks that there are values for all
instances. Returns the dimension instances that do not match the imported
data.
enrich_dimension_import_test(st, name = NULL, tb)
## S3 method for class 'star_schema'
enrich_dimension_import_test(st, name = NULL, tb)
st |
A |
name |
A string, name of the dimension. |
tb |
A |
A dimension object.
Other dimension enrichment functions:
enrich_dimension_export(),
enrich_dimension_import()
tb <-
enrich_dimension_export(st_mrs_age,
name = "when_common",
attributes = c("week", "year"))
# Add new columns with meaningful data (these are not), possibly exporting
# data to a file, populating it and importing it.
tb <- tibble::add_column(tb, x = "x", y = "y", z = "z")[-1, ]
tb2 <- enrich_dimension_import_test(st_mrs_age, name = "when_common", tb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.