parquet_options {nanoparquet} | R Documentation |
Nanoparquet options
Description
Create a list of nanoparquet options.
Usage
parquet_options(
class = getOption("nanoparquet.class", "tbl"),
use_arrow_metadata = getOption("nanoparquet.use_arrow_metadata", TRUE),
write_arrow_metadata = getOption("nanoparquet.write_arrow_metadata", TRUE)
)
Arguments
class |
The extra class or classes to add to data frames created
in |
use_arrow_metadata |
If this option is
|
write_arrow_metadata |
Whether to add the Apache Arrow types as
metadata to the file |
Value
List of nanoparquet options.
Examples
# the effect of using Arrow metadata
tmp <- tempfile(fileext = ".parquet")
d <- data.frame(
fct = as.factor("a"),
dft = as.difftime(10, units = "secs")
)
write_parquet(d, tmp)
read_parquet(tmp, options = parquet_options(use_arrow_metadata = TRUE))
read_parquet(tmp, options = parquet_options(use_arrow_metadata = FALSE))