Function to read cached arrow files. Reads from the most recently updated cache across all storage depths. Optionally returns the partition information as a dataset column.
Usage
read_cache(table_name, type, depth = deprecated(), ...)
cache_read(
table_name,
depth,
type,
include_partition = FALSE,
select = NULL,
num_tries = 60,
...
)
Arguments
- table_name
string
- type
string, e.g. "tessi" or "stream"
- depth
string, e.g. "deep" or "shallow", deprecated in read_cache
- ...
extra arguments to pass on to cache_read and then arrow::open_dataset, arrow::read_parquet, or arrow::read_feather
- include_partition
boolean, whether or not to return the partition information as a column
- select
vector of strings indicating columns to select from database
- num_tries
integer number of times to try reading before failing
Functions
cache_read()
: Underlying cache reader that invokes arrow::open_dataset, arrow::read_parquet, or arrow::read_feather and handles partitioning information
Examples
if (FALSE) { # \dontrun{
write_cache(data.table(a=letters), "test", "stream")
read_cache("test", "stream")
} # }