- con
A dbConnect
object, as returned by dbConnect()
- table
A character string specifying a table name. Names will be
automatically quoted so you can use any sequence of characters, not
just any valid bare table name.
- values
A data.frame to write to the database.
- overwrite
Allows overwriting the destination table. Cannot be TRUE
if append
is also TRUE
.
- append
Allow appending to the destination table. Cannot be TRUE
if overwrite
is also TRUE
. Existing Athena DDL file type will be retained
and used when uploading data to AWS Athena. If parameter file.type
doesn't match AWS Athena DDL file type a warning message will be created
notifying user and RAthena
will use the file type for the Athena DDL.
- types
Additional field types used to override derived types.
- partition
Partition Athena table (needs to be a named list or vector) for example: c(var1 = "2019-20-13")
- s3_location
s3 bucket to store Athena table, must be set as a s3 uri for example ("s3://mybucket/data/")
- file_type
What file type to store data.frame on s3, RAthena currently supports ["tsv", "csv", "parquet"]. Default delimited file type is "tsv", in previous versions
of RAthena (=< 1.4.0)
file type "csv" was used as default. The reason for the change is that columns containing Array/JSON
format cannot be written to
Athena due to the separating value ",". This would cause issues with AWS Athena.
Note: "parquet" format is supported by the arrow
package and it will need to be installed to utilise the "parquet" format.
- compress
FALSE | TRUE
To determine if to compress file.type. If file type is ["csv", "tsv"] then "gzip" compression is used, for file type "parquet"
"snappy" compression is used.
- max_batch
Split the data frame by max number of rows i.e. 100,000 so that multiple files can be uploaded into AWS S3. By default when compression
is set to TRUE
and file.type is "csv" or "tsv" max.batch will split data.frame into 20 batches. This is to help the
performance of AWS Athena when working with files compressed in "gzip" format. max.batch
will not split the data.frame
when loading file in parquet format. For more information please go to link
- ...
other parameters currently not supported in RAthena