as_rdb {rolap}R Documentation

Generate tables in a relational database

Description

Given a connection to a relational database, it stores the facts and dimensions in the form of tables. Tables can be overwritten.

Usage

as_rdb(db, con, overwrite)

## S3 method for class 'star_database'
as_rdb(db, con, overwrite = FALSE)

Arguments

db

A star_database object.

con

A DBI::DBIConnection object.

overwrite

A boolean, allow overwriting tables in the database.

Value

Invisible NULL.

See Also

star_database

Other star database exportation functions: as_csv_files(), as_dm_class(), as_multistar(), as_single_tibble_list(), as_tibble_list(), as_xlsx_file(), draw_tables()

Examples


my_db <- DBI::dbConnect(RSQLite::SQLite())

db <- star_database(mrs_cause_schema, ft_num) |>
  snake_case()
db |>
  as_rdb(my_db)

DBI::dbDisconnect(my_db)


[Package rolap version 2.5.1 Index]