translateSql: translateSql

Description Usage Arguments Details Value Examples

Description

translateSql translates SQL from one dialect to another

Usage

1
2
translateSql(sql = "", sourceDialect = "sql server",
  targetDialect = "oracle", oracleTempSchema = NULL)

Arguments

sql

The SQL to be translated

sourceDialect

The source dialect. Currently, only "sql server" for Microsoft SQL Server is supported

targetDialect

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

oracleTempSchema

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

Details

This function takes SQL in one dialect and translates it into another. It uses simple pattern replacement, so its functionality is limited.

Value

A list containing the following elements:

originalSql

The original parameterized SQL code

sql

The translated SQL

Examples

1
2
3
4
## Not run: 
translateSql("USE my_schema", "sql server", "oracle")

## End(Not run)

fagirtmi/SqlRender documentation built on May 16, 2019, 9:58 a.m.