noctua_options: A method to configure noctua backend options.

View source: R/Options.R

noctua_optionsR Documentation

A method to configure noctua backend options.

Description

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

Usage

noctua_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

noctua_options() returns NULL, invisibly.

Examples

library(noctua)

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

# cache queries locally
noctua_options(cache_size = 5)

noctua documentation built on Aug. 9, 2023, 1:07 a.m.