cdm_from_tables

cdm_from_tables(tables, cdm_name, *, cdm_version='5.3', cohort_tables=None)

Create a CDM reference from a dict of (table_name -> Ibis table or DataFrame).

For local/in-memory CDMs: if tables are pandas/pyarrow, an in-memory DuckDB is created and tables are registered there; then CDM holds Ibis refs to them.

Parameters

Name Type Description Default
tables dict[str, Any] Mapping of table name -> Ibis table, pandas.DataFrame, or pyarrow.Table. required
cdm_name str Display name for this CDM. required
cdm_version str or None OMOP CDM version (default “5.3”). '5.3'
cohort_tables dict[str, Any] or None Optional cohort tables to attach (name -> table). None

Returns

Name Type Description
Cdm CDM reference (local or DuckDB-backed).