Skip to contents

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.

Value

A star_database_update object.

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)