User Tools

Site Tools


documentation:support_for_database_platforms:snowflake

Snowflake Support in OHDSI tools

This page has a list of branches in repositories to be merged into the corresponding ‘master’ branches and officially released in the upcoming future (targeting ATLAS/WebAPI 2.12 release in September / October 2022)

To enable Snowflake support before the official release across all repositories, please build the environment utilizing the branches listed below. After all components are released they can use the officially released versions of each particular component or then whole stack as the dependencies should be properly referenced:

  • OMOP CDM - Snowflake OMOP CDM DDL scripts can be found there
  • DatabaseConnector - an R package to connect to a Snowflake database
  • SqlRender - an R package to translate OHDSI SQL to the Snowflake dialect
  • Achilles - an R package which provides descriptive statistics for a Snowflake OMOP CDM database
  • ARACHNE Commons (a common component used by ATLAS/WebAPI and ARACHNE to share common code)
  • ARACHNE Execution Engine - an application used to execute SQL and R code provided by ATLAS/WebAPI (Patient Level Prediction (PLP), Population Level Effect Estimation (PLE) analyses or ARACHNE Data Node
  • WebAPI - a centralized API to perform analytical work on Snowflake OMOP CDM databases
  • ATLAS - a web application helps researchers to analyze Snowflake OMOP CDM data and make decisions based on the analyses results

Known Limitations

DatabaseConnectorJars will be updated with the new dialect support information when the DatabaseConnector branch is officially released with the corresponding dialect

Component Dependencies

The dependencies between components are displayed on the diagram below, so if a use case requires a top-level component (like ATLAS) the related down-level components should be available in their infrastructure

Connection Example

Below is an example for connection to your Snowflake Instance from R code

# Download Snowflake JDBC driver
# https://docs.snowflake.com/en/user-guide/jdbc-download.html
 
install.packages("remotes")
library(remotes)
 
# Install DatabaseConnector and SqlRender from branches
install_github("ohdsi/DatabaseConnector", ref="develop")
install_github("ohdsi/SqlRender", ref="develop")
 
connectionDetails <- DatabaseConnector::createConnectionDetails(
  dbms = "snowflake",
  user = "My_user",
  password = "My_password",
  pathToDriver = "/path/to/driver",
  connectionString = "jdbc:snowflake://my-snowflake-url.snowflakecomputing.com?warehouse=My_Warehouse&db=My_Database"
)
 
conn <- DatabaseConnector::connect(connectionDetails)
DatabaseConnector::querySql(conn, "SELECT * FROM MY_OMOP_SCHEMA.vocabulary")
documentation/support_for_database_platforms/snowflake.txt · Last modified: 2022/09/07 19:12 by konstantin