These functions are used to build the different types of SQL queries. The AWS Athena implementation give extra parameters to allow access the to standard DBI Athena methods. They also utilise AWS Glue to speed up sql query execution.

sql_query_explain.AthenaConnection(con, sql, format = "text", type = NULL, ...)

sql_query_fields.AthenaConnection(con, sql, ...)

sql_escape_date.AthenaConnection(con, x)

sql_escape_datetime.AthenaConnection(con, x)

Arguments

con

A dbConnect object, as returned by dbConnect()

sql

SQL code to be sent to AWS Athena

format

returning format for explain queries, default set to `"text"`. Other formats can be found: https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html

type

return plan for explain queries, default set to `NULL`. Other type can be found: https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html

...

other parameters, currently not implemented

x

R object to be transformed into athena equivalent

Value

sql_query_explain

Returns sql query for AWS Athena explain statement

sql_query_fields

Returns sql query column names

sql_escape_date

Returns sql escaping from dates

sql_escape_datetime

Returns sql escaping from date times