Skip to contents

inst/extdata/5.4/duckdb/*.sql is the schema source of truth, shared with the Python ETL (python/omop_etl/build_omop_cdm.py) – only pass regenerate_ddl = TRUE when bumping CDM versions during package development, not on every run (and note it writes back into the package's inst/ source tree, so it only works when developing the package itself, e.g. via devtools::load_all(), not against an installed copy).

Usage

build_schema(db_path = "omop_cdm.duckdb", regenerate_ddl = FALSE)

Arguments

db_path

Path to the DuckDB database file to create/open.

regenerate_ddl

Regenerate the DDL via CommonDataModel::buildRelease() before building the schema. Requires the CommonDataModel package.

Value

Invisibly, db_path.