-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathCreateCDMIndexAndConstraintScripts.Rd
37 lines (34 loc) · 1.69 KB
/
CreateCDMIndexAndConstraintScripts.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CreateCDMIndexAndConstraintScripts.r
\name{CreateCDMIndexAndConstraintScripts}
\alias{CreateCDMIndexAndConstraintScripts}
\title{Create Index and Constraint DDL SQL scripts for CDM tables on rdbms that support these features.}
\usage{
CreateCDMIndexAndConstraintScripts(
connectionDetails,
cdmSchema,
cdmVersion,
githubTag = NULL
)
}
\arguments{
\item{connectionDetails}{An R object of type\cr\code{connectionDetails} created using the
function \code{createConnectionDetails} in the
\code{DatabaseConnector} package.}
\item{cdmSchema}{The name of the CDM database schema. Requires read and write permissions to this database. On SQL
Server, this should specify both the database and the schema,
so for example 'cdm_instance.dbo'.}
\item{cdmVersion}{Your CDM version. Currently "5.3.1" and "5.4.0" are supported.}
\item{githubTag}{An optional github tag from which to pull the DDL script.
Currently "v5.3.1" and "v5.4.0" are supported. The default is NULL.}
}
\description{
This function creates one or more SQL scripts as defined in https://github.com/OHDSI/CommonDataModel.
}
\details{
This function creates SQL scripts for the indices and constraints on tables in a CDM by referring to the
correct SQL DDL script in the OHDSI CommonDataModel repo. The database platform is
determined by \code{connectionDetails$dbms}. Currently "oracle", "postgresql", "pdw", "netezza", and "sql server" are supported.
The SQL DDL scripts are written to the \code{output} directory. The SQL scripts can then be run manually in a SQL session
or by using \code{DatabaseConnector::executeSql(connection,DDLscriptName)}
}