|
||
---|---|---|
.. | ||
OMOP CDM Results snowflake ddl.txt | ||
OMOP CDM snowflake cluster keys.txt | ||
OMOP CDM snowflake constraints.txt | ||
OMOP CDM snowflake ddl.txt | ||
OMOP CDM snowflake primary keys.txt | ||
README.md |
README.md
Common-Data-Model / Snowflake
This folder contains the SQL scripts for Snowflake.
In order to create your instantiation of the Common Data Model, we recommend following these steps:
-
Create a database for all OHDSI assets, if one does not already exist within your Snowflake account.
-
Within the OHDSI database, create a schema for the Common Data Model.
-
Open a Snowflake session and set the session context to use the database and schema referenced in Steps 1 and 2.
-
Set the session context to use an available Warehouse.
-
Execute the scripts
OMOP CDM snowflake ddl.txt
andOMOP CDM Results snowflake ddl.txt
to create the tables and fields. -
Execute the script
OMOP CDM snowflake primary keys.txt
to add the minimum set of primary keys we recommend. -
Execute the script
OMOP CDM snowflake constraints.txt
to add the foreign key constraints. -
Load your data into the schema.
Optionally, before loading your data into the schema, execute the OMOP CDM snowflake cluster keys.txt
in full or for individual tables to add cluster keys where indexes are used in other technologies.
Note: adding cluster keys will result in additional compute costs in Snowflake and should be considered carefully with respect to performance SLAs vs. compute costs.