Utilises AWS Athena to convert AWS S3 backend file types. It also also to create more efficient file types i.e. "parquet" and "orc" from SQL queries.
dbConvertTable(conn, obj, name, ...)# S4 method for AthenaConnection
dbConvertTable(
conn,
obj,
name,
partition = NULL,
s3.location = NULL,
file.type = c("NULL", "csv", "tsv", "parquet", "json", "orc"),
compress = TRUE,
data = TRUE,
...
)
dbConvertTable()
returns TRUE
but invisible.
A DBI::DBIConnection object,
Athena table or SQL
DML query to be converted. For SQL
, the query need to be wrapped with DBI::SQL()
and
follow AWS Athena DML format link
Name of destination table
Extra parameters, currently not used
Partition Athena table
location to store output file, must be in s3 uri format for example ("s3://mybucket/data/").
File type for name
, currently support c("NULL","csv", "tsv", "parquet", "json", "orc")
.
"NULL"
will let Athena set the file type for you.
Compress name
, currently can only compress c("parquet", "orc")
(AWS Athena CTAS)
If name
should be created with data or not.