Skip to contents

R counterpart of omop_etl.extract.import_omop: builds the CDM v5.4 schema in out and copies the requested tables from the source CDM (matching columns by name, case-insensitively; unknown server columns are dropped). Tables missing on the server are skipped; person is required.

Usage

import_omop(
  src,
  out,
  schema = NULL,
  tables = NULL,
  chunksize = 500000L,
  table_map = NULL
)

Arguments

src

An open DBI connection to the server holding the CDM.

out

DuckDB file to create or extend.

schema

Server schema with the CDM tables.

tables

Subset of CDM tables (default CDM_STUDY_TABLES).

chunksize

Rows per fetch.

table_map

Overrides for non-standard server table names (see from_sql()).

Value

A data.frame: table, rows (NA when skipped), note.