loadRenderTranslateSql: Load, render, and translate a SQL file in this package.

Description Usage Arguments Value

View source: R/HelperFunctions.R

Description

This helper function is used in place of using SqlRender::loadRenderTranslateSql otherwise unit tests will not function properly.

NOTE: This function does not support dialect-specific SQL translation at this time.

Usage

1
2
3
4
5
6
7
loadRenderTranslateSql(
  sqlFilename,
  dbms = "sql server",
  ...,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  warnOnMissingParameters = TRUE
)

Arguments

sqlFilename

The source SQL file

dbms

The target dialect. Currently 'sql server', 'oracle', 'postgres', and 'redshift' are supported

...

Parameter values used for render

tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

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.

Value

Returns a string containing the rendered SQL.


anthonysena/CohortGenerator documentation built on March 8, 2021, 12:04 a.m.