This function takes SQL and translates it to a different dialect.
translateSqlFile(
sourceFile,
targetFile,
targetDialect,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
oracleTempSchema = NULL
)
The source SQL file
The target SQL file
The target dialect. Currently "oracle", "postgresql", "pdw", "impala", "sqlite", "netezza", "bigquery", "snowflake", "synapse", "spark", "redshift" and "iris" are supported.
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.
DEPRECATED: use tempEmulationSchema
instead.
This function takes SQL and translates it to a different dialect.
if (FALSE) { # \dontrun{
translateSqlFile("myRenderedStatement.sql",
"myTranslatedStatement.sql",
targetDialect = "postgresql"
)
} # }