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.
db_save_query.AthenaConnection(
con,
sql,
name,
file_type = c("NULL", "csv", "tsv", "parquet", "json", "orc"),
s3_location = NULL,
partition = NULL,
compress = TRUE,
...
)db_explain.AthenaConnection(con, sql, ...)
db_query_fields.AthenaConnection(con, sql, ...)
sql_escape_date.AthenaConnection(con, x)
sql_escape_datetime.AthenaConnection(con, x)
A dbConnect
object, as returned by dbConnect()
SQL code to be sent to AWS Athena
Table name if left default RAthena will use default from 'dplyr''s compute
function.
What file type to store data.frame on s3, RAthena currently supports ["NULL","csv", "tsv", "parquet", "json", "orc"].
"NULL"
will let Athena set the file_type for you.
s3 bucket to store Athena table, must be set as a s3 uri for example ("s3://mybucket/data/")
Partition Athena table, requires to be a partitioned variable from previous table.
Compress Athena table, currently can only compress ["parquet", "orc"] AWS Athena CTAS
other parameters, currently not implemented
R object to be transformed into athena equivalent
Returns table name
Raises an error
as AWS Athena does not support EXPLAIN
queries Athena Limitations
Returns sql query column names