OMOP/man/writeDdl.Rd

71 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

2021-08-19 20:22:08 +00:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/writeDDL.R
2021-08-19 20:22:08 +00:00
\name{writeDdl}
\alias{writeDdl}
\alias{writePrimaryKeys}
\alias{writeForeignKeys}
\alias{writeIndex}
\title{Write DDL script}
\usage{
writeDdl(
targetDialect,
cdmVersion,
outputfolder,
2021-08-19 20:22:08 +00:00
cdmDatabaseSchema = "@cdmDatabaseSchema"
)
writePrimaryKeys(
targetDialect,
cdmVersion,
outputfolder,
2021-08-19 20:22:08 +00:00
cdmDatabaseSchema = "@cdmDatabaseSchema"
)
writeForeignKeys(
targetDialect,
cdmVersion,
outputfolder,
2021-08-19 20:22:08 +00:00
cdmDatabaseSchema = "@cdmDatabaseSchema"
)
writeIndex(
targetDialect,
cdmVersion,
outputfolder,
2021-08-19 20:22:08 +00:00
cdmDatabaseSchema = "@cdmDatabaseSchema"
)
}
\arguments{
\item{targetDialect}{The dialect of the target database. Support dialects are specified by SqlRender::listSupportedDialects}
2021-08-19 20:22:08 +00:00
\item{cdmVersion}{The version of the CDM you are creating, e.g. 5.3, 5.4}
\item{outputfolder}{The directory or folder where the SQL file should be saved.}
2021-08-19 20:22:08 +00:00
\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.
Defaults to "@cdmDatabaseSchema"}
}
2024-02-06 20:13:45 +00:00
\value{
Writes SQL file with the OMOP CDM DDL for the specified CDM version and target dialect in the output folder.
Writes a SQL file with the primary keys for the OMOP CDM based on the specified target dialect and CDM version.
Writes a SQL file with the foreign keys for the OMOP CDM based on the specified target dialect and CDM version.
Writes a SQL file with the indices for the OMOP CDM based on the specified target dialect and CDM version.
}
2021-08-19 20:22:08 +00:00
\description{
Write the DDL to a SQL file. The SQL will be rendered (parameters replaced) and translated to the target SQL
dialect. By default the @cdmDatabaseSchema parameter is kept in the SQL file and needs to be replaced before
execution.
}
\section{Functions}{
\itemize{
\item \code{writePrimaryKeys()}: writePrimaryKeys Write the SQL code that creates the primary keys to a file.
2021-08-19 20:22:08 +00:00
\item \code{writeForeignKeys()}: writeForeignKeys Write the SQL code that creates the foreign keys to a file.
2021-08-19 20:22:08 +00:00
\item \code{writeIndex()}: writeIndex Write the rendered and translated sql that creates recommended indexes to a file.
2021-08-19 20:22:08 +00:00
}}