Learn R Programming

RAthena (version 1.7.0)

db_save_query: S3 implementation of db_save_query for Athena

Description

This is a backend method for dplyr function db_save_query to creating tables from tbl using compute function. Users won't be required to access and run this function. However users may find it useful to know the extra parameters db_save_query provided for compute function.

Usage

db_save_query.AthenaConnection(
  con,
  sql,
  name,
  file_type = c("NULL", "csv", "parquet", "json"),
  s3_location = NULL,
  partition = NULL,
  ...
)

Arguments

con

A dbConnect object, as returned by dbConnect()

sql

SQL code to be sent to the data

name

Table name if left default RAthena will use default from 'dplyr''s compute function.

file_type

What file type to store data.frame on s3, RAthena currently supports ["NULL","csv", "parquet", "json"]. "NULL" will let athena set the file_type for you.

s3_location

s3 bucket to store Athena table, must be set as a s3 uri for example ("s3://mybucket/data/")

partition

Partition Athena table, requires to be a partitioned variable from previous table.

...

other parameters, currently not implemented

Value

db_save_query returns table name