cdm_from_con {CDMConnector}R Documentation

Create a CDM reference object from a database connection

Description

Create a CDM reference object from a database connection

Usage

cdm_from_con(
  con,
  cdm_schema = NULL,
  cdm_tables = tbl_group("default"),
  write_schema = NULL,
  cohort_tables = NULL,
  cdm_version = "5.3"
)

Arguments

con

A DBI database connection to a database where an OMOP CDM v5.4 or v5.3 instance is located.

cdm_schema

The schema where the OMOP CDM tables are located. Defaults to NULL.

cdm_tables

Which tables should be included? Supports a character vector, tidyselect selection helpers, or table groups.

  • tbl_group("all")all CDM tables

  • tbl_group("vocab")the CDM vocabulary tables

  • tbl_group("clinical")the clinical CDM tables

write_schema

An optional schema in the CDM database that the user has write access to.

cohort_tables

A character vector listing the cohort table names to be included in the CDM object.

cdm_version

The version of the OMOP CDM: "5.3" (default), "5.4", "auto". "auto" attempts to automatically determine the cdm version using heuristics. Cohort tables must be in the write_schema.

Value

A list of dplyr database table references pointing to CDM tables


[Package CDMConnector version 0.4.1 Index]