translateSql: translateSql

Description Usage Arguments Details Value Examples

View source: R/RenderSql.R

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)

hxia/SqlRender4Impala documentation built on May 17, 2017, 12:06 a.m.