InsertRecord¶
Inserts a static record into the current CDM table.
Useful when a CDM table needs a fixed set of rows that are not derived
from the source data. The most common case is the cdm_source table,
which typically contains a single row describing the data source.
Each parameter is a keyword-style assignment whose key matches a field name on the current CDM table and whose value matches that field's type. All non-nullable fields must be supplied.
Parameters¶
- N —
assignmentsMandatory — accepts: keyword parameters (field=value) -
One
field=valuepair per field to populate. The field name must exist on the table; the value's type must match the field's type. Every non-nullable field must be provided.
Requires¶
- All non-nullable fields on the table must be assigned a value.
- Each assignment's value type must match its field's type.
Examples¶
A minimal person row
InsertRecord(person_id=1, gender_concept_id=8507, year_of_birth=2000, race_concept_id=4218674, ethnicity_concept_id=38003564, location_id=1)
cdm_source metadata
InsertRecord(cdm_source_name="Synthetic Massachusetts",
cdm_source_abbreviation="Synthmas",
cdm_holder="Rook IT ApS",
source_description="Test translation of the Synthmas dataset",
source_release_date='2023-01-13',
cdm_release_date='2023-06-30',
cdm_version="5.4",
vocabulary_version="v5.0 31-MAY-23")