incremental_refresh {rolap} | R Documentation |
Incremental update of a star database from the star database generated with the new data.
incremental_refresh(db, sdbu, existing_instances, replace_transformations, ...)
## S3 method for class 'star_database'
incremental_refresh(
db,
sdbu,
existing_instances = "ignore",
replace_transformations = FALSE,
...
)
db |
A |
sdbu |
A |
existing_instances |
A string, operation to be carried out on the instances of already existing facts. The possible values are: "ignore", "replace", "group" and "delete". |
replace_transformations |
A boolean, replace the |
... |
internal test parameters. |
There may be data in the update that already exists in the facts: it is indicated what to do with it, replace it, group it, delete it or ignore it in the update.
If to obtain the update data we have had to perform new transformations (which were not necessary to obtain the star database), we can indicate that these are the new transformation operations for the star database. These operations are not applied to the star database, they will only be applied to new periodic updates.
A star_database
object.
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()
,
update_according_to()
db <-
flat_table('ft_num', ft_cause_rpd[ft_cause_rpd$City != 'Cambridge' &
ft_cause_rpd$WEEK != '4',]) |>
as_star_database(mrs_cause_schema_rpd) |>
role_playing_dimension(rpd = "When",
roles = c("When Available", "When Received"))
f2 <- flat_table('ft_num2', ft_cause_rpd[ft_cause_rpd$City != 'Bridgeport' &
ft_cause_rpd$WEEK != '2',])
f2 <- f2 |>
update_according_to(db)
db <- db |>
incremental_refresh(f2)