propagate.Rd
propagate
copy columns from a given table of a dm
object to all tables based on other common columns. If several
rows are associated with the same key, the rows will be duplicated in the receiving tables. In safe mode, the key
must be unique in the original table.
propagate(db, from, add, by, safe = FALSE)
(dm
) object for which some variable need to be propagated.
(string
) the name of the table where the variables to propagate are stored.
(character
) the names of the variables to propagate.
(character
) the key binding the from
table to the other tables.
(flag
) should the key be checked for uniqueness in the from
table.
updates dm
object.
db <- dm::dm_nycflights13()
res <- propagate(db, "airlines", "name", "carrier", safe = TRUE)
#>
#> Skipping: airlines
#> Skipping: airports
#> Updating: flights with: name
#> Skipping: planes
#> Skipping: weather