This function renders, and translates SQL, sends it to the server, and returns the results as an ffdf object

renderTranslateQuerySql.ffdf(
  connection,
  sql,
  errorReportFile = file.path(getwd(), "errorReport.txt"),
  snakeCaseToCamelCase = FALSE,
  oracleTempSchema = NULL,
  ...
)

Arguments

connection

The connection to the database server.

sql

The SQL to be send.

errorReportFile

The file where an error report will be written if an error occurs. Defaults to 'errorReport.txt' in the current working directory.

snakeCaseToCamelCase

If true, field names are assumed to use snake_case, and are converted to camelCase.

oracleTempSchema

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

...

Parameters that will be used to render the SQL.

Value

An ffdf object

Details

This function calls the render and translate functions in the SqlRender package before calling querySql.ffdf.

Examples

if (FALSE) { connectionDetails <- createConnectionDetails(dbms = "postgresql", server = "localhost", user = "root", password = "blah", schema = "cdm_v4") conn <- connect(connectionDetails) persons <- renderTranslatequerySql.ffdf(conn, sql = "SELECT * FROM @schema.person", schema = "cdm_synpuf") disconnect(conn) }