View source: R/star_database_export.R
as_dm_class | R Documentation |
dm
class with fact and dimension tablesTo port databases to other work environments it is useful to be able to
export them as a dm
class, as this function does, in this way it can be
saved directly in a DBMS.
as_dm_class(db, pk_facts, fk)
## S3 method for class 'star_database'
as_dm_class(db, pk_facts = TRUE, fk = TRUE)
db |
A |
pk_facts |
A boolean, include primary key in fact tables. |
fk |
A boolean, include foreign key in fact tables. |
A dm
object.
star_database
Other star database exportation functions:
as_csv_files()
,
as_multistar()
,
as_rdb()
,
as_single_tibble_list()
,
as_tibble_list()
,
as_xlsx_file()
,
draw_tables()
db1 <- star_database(mrs_cause_schema, ft_num) |>
snake_case()
dm1 <- db1 |>
as_dm_class()
db2 <- star_database(mrs_age_schema, ft_age) |>
snake_case()
ct <- constellation("MRS", db1, db2)
dm <- ct |>
as_dm_class()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.