forked from OHDSI/SqlRender
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrenderSqlFile.Rd
36 lines (33 loc) · 1.33 KB
/
renderSqlFile.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HelperFunctions.R
\name{renderSqlFile}
\alias{renderSqlFile}
\title{Render a SQL file}
\usage{
renderSqlFile(sourceFile, targetFile, warnOnMissingParameters = TRUE, ...)
}
\arguments{
\item{sourceFile}{The source SQL file}
\item{targetFile}{The target SQL file}
\item{warnOnMissingParameters}{Should a warning be raised when parameters provided to this
function do not appear in the parameterized SQL that is being
rendered? By default, this is TRUE.}
\item{...}{Parameter values}
}
\description{
\code{renderSqlFile} Renders SQL code in a file based on parameterized SQL and parameter values,
and writes it to another file.
}
\details{
This function takes parameterized SQL and a list of parameter values and renders the SQL that can
be send to the server. Parameterization syntax: \describe{ \item{@parameterName}{Parameters are
indicated using a @ prefix, and are replaced with the actual values provided in the render call.}
\item{\{DEFAULT @parameterName = parameterValue\}}{Default values for parameters can be defined
using curly and the DEFAULT keyword.} \item{\{if\}?\{then\}:\{else\}}{The if-then-else pattern is
used to turn on or off blocks of SQL code.} }
}
\examples{
\dontrun{
renderSqlFile("myParamStatement.sql", "myRenderedStatement.sql", a = "myTable")
}
}