Learn R Programming

dm (version 0.2.8)

dm_examine_cardinalities: Learn about your data model

Description

[Experimental]

This function returns a tibble with information about the cardinality of the FK constraints. The printing for this object is special, use as_tibble() to print as a regular tibble.

Usage

dm_examine_cardinalities(dm, progress = NA)

Arguments

dm

A dm object.

progress

Whether to display a progress bar, if NA (the default) hide in non-interactive mode, show in interactive mode. Requires the 'progress' package.

Value

A tibble with the following columns:

child_table

child table,

child_fk_cols

foreign key column(s) in child table as list of character vectors,

parent_table

parent table,

parent_key_cols

key column(s) in parent table as list of character vectors,

cardinality

the nature of cardinality along the foreign key.

Details

Uses examine_cardinality() on each foreign key that is defined in the dm.

See Also

Other cardinality functions: examine_cardinality()

Examples

Run this code
# NOT RUN {
dm_nycflights13() %>%
  dm_examine_cardinalities()
# }

Run the code above in your browser using DataLab