new_cohort_table
new_cohort_table(cdm, name, *, overwrite=True)
Create an empty cohort table in the CDM’s write schema and register it.
Creates tables: name (cohort), name_set (cohort_set), name_attrition (cohort_attrition). Returns the CDM with the new cohort table added.
Parameters
| cdm |
Cdm (database-backed, from cdm_from_con). |
|
required |
| name |
Table name (lowercase recommended). |
|
required |
| overwrite |
If True, replace existing tables. |
|
True |
Returns
|
The same Cdm with the new cohort table added. |
|
Raises
|
CohortError |
If cdm has no database source (e.g. from cdm_from_tables without a backend). |