Learn R Programming

CommonDataModel (version 1.0.1)

downloadCurrentDdl: Get current DDL sitting on the main branch

Description

Get current DDL sitting on the main branch

Usage

downloadCurrentDdl(
  githubPath = "OHDSI/CommonDataModel",
  pathToCsv = "Sql%20Server/OMOP%20CDM%20sql%20server%20ddl.txt",
  outputFile = paste0("inst/sql/sql_server/OMOP CDM ddl ", Sys.Date(), ".sql")
)

Value

The current DDL sitting on the main branch of the CommonDataModel repository.

Arguments

githubPath

The path for the GitHub repo containing the package (e.g. 'OHDSI/CommonDataModel').

pathToCsv

The path for the snapshot inside the package.

outputFile

The path where the file should be saved.

Details

This function gets the current ddl on the CDM main branch. It will be taken from the Sql Server folder. The default location is inst/settings/currentOmopDdl.sql.

Examples

Run this code
if (FALSE) {
downloadCurrentDdl("OHDSI/CommonDataModel",
 pathToCsv="Sql%20Server/OMOP%20CDM%20sql%20server%20ddl.txt")
}

Run the code above in your browser using DataLab