update docs
This commit is contained in:
parent
08bf6ee17e
commit
e6a2940474
|
@ -1,24 +1,42 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/createDdl.R
|
||||
% Please edit documentation in R/createdDdl.R
|
||||
\name{createDdl}
|
||||
\alias{createDdl}
|
||||
\title{Create a DDL script from a two csv files that detail the OMOP CDM Specifications. These files also form the basis of the CDM documentation and the Data Quality
|
||||
Dashboard.}
|
||||
\alias{createPrimaryKeys}
|
||||
\alias{createForeignKeys}
|
||||
\title{Create the OHDSI-SQL Common Data Model DDL code}
|
||||
\usage{
|
||||
createDdl(cdmVersion = cdmVersion)
|
||||
createDdl(cdmVersion)
|
||||
|
||||
createPrimaryKeys(cdmVersion)
|
||||
|
||||
createForeignKeys(cdmVersion)
|
||||
}
|
||||
\arguments{
|
||||
\item{cdmVersionNum}{The version of the CDM you are creating, e.g. 5.3.1}
|
||||
|
||||
\item{cdmTableCsvLoc}{The location of the csv file with the high-level CDM table information. This is defaulted to "inst/csv/OMOP_CDMv5.3.1_Table_Level.csv".
|
||||
If a new version of this file was committed to the CDM repository the package automatically will grab it and place it in "inst/csv/".}
|
||||
|
||||
\item{cdmFieldCsvLoc}{The location of the csv file with the CDM field information. This is defaulted to "inst/csv/OMOP_CDMv5.3.1_Field_Level.csv".
|
||||
If a new version of this file was committed to the CDM repository the package automatically will grab it and place it in "inst/csv/".}
|
||||
|
||||
\item{outputFile}{The name of the output ddl sql file. This is defaulted to a location in the inst/sql/sql server folder and named with today's date and the CDM version.}
|
||||
\item{cdmVersion}{The version of the CDM you are creating, e.g. 5.3, 5.4}
|
||||
}
|
||||
\value{
|
||||
A character string containing the OHDSQL DDL
|
||||
}
|
||||
\description{
|
||||
Create a DDL script from a two csv files that detail the OMOP CDM Specifications. These files also form the basis of the CDM documentation and the Data Quality
|
||||
The createDdl, createForeignKeys, and createPrimaryKeys functions each return a character string
|
||||
containing their respective DDL SQL code in OHDSQL dialect for a specific CDM version.
|
||||
The SQL they generate needs to be rendered and translated before it can be executed.
|
||||
}
|
||||
\details{
|
||||
The DDL SQL code is created from a two csv files that detail the OMOP CDM Specifications.
|
||||
These files also form the basis of the CDM documentation and the Data Quality
|
||||
Dashboard.
|
||||
}
|
||||
\section{Functions}{
|
||||
\itemize{
|
||||
\item \code{createPrimaryKeys}: createPrimaryKeys asdfladsfj
|
||||
|
||||
\item \code{createForeignKeys}: createForeignKeys asdfladsf
|
||||
}}
|
||||
|
||||
\examples{
|
||||
ddl <- createDdl("5.4")
|
||||
pk <- createPrimaryKeys("5.4")
|
||||
fk <- createForeignKeys("5.4")
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ The default location is
|
|||
}
|
||||
\examples{
|
||||
\dontrun{
|
||||
downloadCurrentDdl("OHDSI/CommonDataModel", pathToCsv="Sql\%20Server/OMOP\%20CDM\%20sql\%20server\%20ddl.txt")
|
||||
downloadCurrentDdl("OHDSI/CommonDataModel",
|
||||
pathToCsv="Sql\%20Server/OMOP\%20CDM\%20sql\%20server\%20ddl.txt")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/executeDdl.R
|
||||
\name{executeDdl}
|
||||
\alias{executeDdl}
|
||||
\title{Generate and execute the DDL on a database}
|
||||
\usage{
|
||||
executeDdl(
|
||||
connectionDetails,
|
||||
cdmVersion,
|
||||
cdmDatabaseSchema,
|
||||
executeDdl = TRUE,
|
||||
executePrimaryKey = TRUE,
|
||||
executeForeignKey = TRUE,
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{connectionDetails}{An object of class connectionDetails as created by the DatabaseConnector::createConnectionDetails function.}
|
||||
|
||||
\item{cdmVersion}{The version of the CDM you are creating, e.g. 5.3, 5.4}
|
||||
|
||||
\item{cdmDatabaseSchema}{The schema of the CDM instance where the DDL will be run. For example, this would be "ohdsi.dbo" when testing on sql server.}
|
||||
|
||||
\item{executeDdl}{Should the DDL be executed? TRUE or FALSE}
|
||||
|
||||
\item{executePrimaryKey}{Should the primary keys be added? TRUE or FALSE}
|
||||
|
||||
\item{executeForeignKey}{Should the foreign keys be added? TRUE or FALSE}
|
||||
|
||||
\item{...}{Other arguments passed on to DatabaseConnector::executeSql. (This allows the user to set the path to errorReportFile.)}
|
||||
}
|
||||
\description{
|
||||
This function will generate the DDL for a specific dbms and CDM version and
|
||||
then execute the DDL on a database.
|
||||
}
|
||||
\examples{
|
||||
\dontrun{
|
||||
executeDdl(connectionDetails = connectionDetails,
|
||||
cdmVersion = "5.4",
|
||||
cdmDatabaseSchema = "myCdm")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue