Update a flat table according to another structure
Source:R/update_according_to.R
update_according_to.Rd
Update a flat table with the operations of another structure based on a flat table.
Usage
update_according_to(ft, sdb, star, sdb_operations)
# S3 method for flat_table
update_according_to(ft, sdb, star = 1, sdb_operations = NULL)
Arguments
- ft
A
flat_table
object.- sdb
A
star_database
object with defined modification operations.- star
A string or integer, star database name or index in constellation.
- sdb_operations
A
star_database
object with new defined modification operations.
See also
Other star database refresh functions:
get_existing_fact_instances()
,
get_lookup_tables()
,
get_new_dimension_instances()
,
get_star_database()
,
get_star_schema()
,
get_transformation_code()
,
get_transformation_file()
,
incremental_refresh()
Examples
f1 <- flat_table('ft_num', ft_cause_rpd) |>
as_star_database(mrs_cause_schema_rpd) |>
replace_attribute_values(
name = "When Available",
old = c('1962', '11', '1962-03-14'),
new = c('1962', '3', '1962-01-15')
) |>
group_dimension_instances(name = "When")
f2 <- flat_table('ft_num2', ft_cause_rpd) |>
update_according_to(f1)