pm_get_dm
extracts tables and relations in the form of a
dm
object. It is a wrapper around
dm_from_src
which manually adds primary and
foreign keys to the tables which dm currently does not support for MariaDB
databases.
pm_get_dm(con, learn_keys = FALSE)
con | A connection to the pmird database. This should be an object of
class |
---|---|
learn_keys | A logical value indicating if primary and foreign keys
should be assigned ( |
A dm
object with the pmird database and all primary and
foreign keys.
if (FALSE) { # connect to database con <- RMariaDB::dbConnect( drv = RMariaDB::MariaDB(), dbname = "pmird", default.file = "~/my.cnf" ) # get pmird database as dm object dm_pmird <- pm_get_dm(con, learn_keys = TRUE) # when finished, disconnect RMariaDB::dbDisconnect(con) }