RAthena_options: A method to configure RAthena backend options.

View source: R/Options.R

RAthena_optionsR Documentation

A method to configure RAthena backend options.

Description

RAthena_options() provides a method to change the backend. This includes changing the file parser, whether RAthena should cache query ids locally and number of retries on a failed api call.

Usage

RAthena_options(
  file_parser,
  bigint,
  binary,
  json,
  cache_size,
  clear_cache,
  retry,
  retry_quiet,
  unload,
  clear_s3_resource,
  verbose
)

Arguments

file_parser

Method to read and write tables to Athena, currently default to "data.table". The file_parser also determines the data format returned for example "data.table" will return data.table and "vroom" will return tibble.

bigint

The R type that 64-bit integer types should be mapped to (default: "integer64"). Inbuilt bigint conversion types ["integer64", "integer", "numeric", "character"].

binary

The R type that [binary/varbinary] types should be mapped to (default "raw"). Inbuilt binary conversion types ["raw", "character"].

json

Attempt to converts AWS Athena data types [arrays, json] using jsonlite:parse_json (default: "auto"). Inbuilt json conversion types ["auto", "character"]. Custom Json parsers can be provide by using a function with data frame parameter.

cache_size

Number of queries to be cached. Currently only support caching up to 100 distinct queries (default: 0).

clear_cache

Clears all previous cached query metadata

retry

Maximum number of requests to attempt (default: 5).

retry_quiet

This method is deprecated please use verbose instead.

unload

set AWS Athena unload functionality globally (default: FALSE)

clear_s3_resource

Clear down 'AWS Athena' 'AWS S3' resource (s3_staging_dir location). This is useful for users that don't have the 'AWS IAM role' permissions delete from 's3_staging_dir' (default: TRUE)

verbose

print package info messages (default: TRUE)

Value

RAthena_options() returns NULL, invisibly.

Examples

library(RAthena)

# change file parser from default data.table to vroom
RAthena_options("vroom")

# cache queries locally
RAthena_options(cache_size = 5)

RAthena documentation built on May 20, 2022, 5:06 p.m.