dm_from_src()
creates a dm from some or all tables in a src
(a database or an environment) or which are accessible via a DBI-Connection.
For Postgres and SQL Server databases, primary and foreign keys
are imported from the database.
dm_from_src(src = NULL, table_names = NULL, learn_keys = NULL, ...)
src | A dplyr table source object or a
|
---|---|
table_names | A character vector of the names of the tables to include. |
learn_keys |
Set to |
... |
Additional parameters for the schema learning query.
|
A dm
object.
con <- DBI::dbConnect( RMariaDB::MariaDB(), username = "guest", password = "relational", dbname = "Financial_ijs", host = "relational.fit.cvut.cz" ) dm_from_src(con)#>#> ── Table source ──────────────────────────────────────────────────────────────── #> src: mysql [guest@relational.fit.cvut.cz:NA/Financial_ijs] #> ── Metadata ──────────────────────────────────────────────────────────────────── #> Tables: `accounts`, `cards`, `clients`, `disps`, `districts`, … (9 total) #> Columns: 57 #> Primary keys: 0 #> Foreign keys: 0