Is a table of a dm referenced by another table?

dm_is_referenced(dm, table)

Arguments

dm

A dm object.

table

A table in the dm.

Value

TRUE if at least one foreign key exists that points to the primary key of the table argument, FALSE otherwise.

See also

Other functions utilizing foreign key relations: dm_get_referencing_tables()

Examples

dm_nycflights13() %>% dm_is_referenced(airports)
#> [1] TRUE
dm_nycflights13() %>% dm_is_referenced(flights)
#> [1] FALSE