Skip to contents

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 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

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)