cache_update | R Documentation |
Internal function to update portions of cached arrow files.
cache_update(
x,
table_name,
depth,
type,
primary_keys = cache_get_attributes(x)$primary_keys,
date_column = NULL,
delete = FALSE,
incremental = TRUE,
prefer = "to",
...
)
x |
data.frame or part of a data.frame to be cached |
table_name |
string |
depth |
string, e.g. "deep" or "shallow" |
type |
string, e.g. "tessi" or "stream" |
primary_keys |
character vector of columns to be used for identifying rows when updating the cache |
date_column |
character name of the column to be used for determining the date of last row update |
delete |
whether to delete rows in cache missing from |
incremental |
whether or not to update the cache incrementally or to simply overwrite the existing cache, default is |
prefer |
"from" or "to": which table to prefer on conflict during a date-only update.
The default is to prefer the destination table, so that existing data in |
... |
extra arguments passed on to arrow::write_dataset |
invisible
## Not run:
x <- data.table(a = 1:1000, b = runif(1000))
y <- data.table(b = 100:199, b = runif(100))
cache_write(x, "test", "deep", "stream")
cache_update(y, "test", "deep", "stream")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.