Skip to contents

Site files often expose concept and the other vocabulary tables as views into a catalog named central_vocab. Those views only resolve when the vocabulary file is attached under exactly that name. HADES opens several connections per run and DatabaseConnector cannot ATTACH on connect, so run these statements on each new connection (see cohorts/run_plp_readonly_example.R). Nothing is written to either file.

Usage

readonly_attach_sql(
  cdm_db,
  vocab_db = NULL,
  cdm_alias = "cdm",
  vocab_alias = "central_vocab"
)

Arguments

cdm_db

Path to the CDM DuckDB file.

vocab_db

Optional path to the vocabulary DuckDB file; NULL when the CDM holds real vocabulary tables.

cdm_alias, vocab_alias

Catalog names (default "cdm" and "central_vocab").

Value

A character vector of ATTACH ... (READ_ONLY) statements.