noctua_options: A method to configure noctua backend options.

Description Usage Arguments Value Examples

View source: R/Options.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
noctua_options(
  file_parser = c("data.table", "vroom"),
  bigint = NULL,
  binary = NULL,
  json = NULL,
  cache_size = 0,
  clear_cache = FALSE,
  retry = 5,
  retry_quiet = FALSE
)

Arguments

file_parser

Method to read and write tables to Athena, currently defaults 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 NULL won't make any changes that dbConnect has set. Inbuilt bigint conversion types ["integer64", "integer", "numeric", "character"].

binary

The R type that [binary/varbinary] types should be mapped to. Default NULL won't make any changes that dbConnect has set. Inbuilt binary conversion types ["raw", "character"].

json

Attempt to converts AWS Athena data types [arrays, json] using jsonlite:parse_json. Default NULL won't make any changes that dbConnect has set. 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.

clear_cache

Clears all previous cached query metadata

retry

Maximum number of requests to attempt.

retry_quiet

If FALSE, will print a message from retry displaying how long until the next request.

Value

noctua_options() returns NULL, invisibly.

Examples

1
2
3
4
5
6
7
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 Sept. 23, 2021, 5:12 p.m.