Learn R Programming

SqlRender (version 1.6.2)

translateSqlFile: Translate a SQL file

Description

This function takes SQL and translates it to a different dialect.

Usage

translateSqlFile(sourceFile, targetFile, targetDialect,
  oracleTempSchema = NULL)

Arguments

sourceFile

The source SQL file

targetFile

The target SQL file

targetDialect

The target dialect. Currently 'oracle', 'postgresql', and 'redshift' are supported

oracleTempSchema

A schema that can be used to create temp tables in when using Oracle.

Details

This function takes SQL and translates it to a different dialect.

Examples

Run this code
# NOT RUN {
translateSqlFile("myRenderedStatement.sql",
                 "myTranslatedStatement.sql",
                 targetDialect = "postgresql")
# }

Run the code above in your browser using DataLab