Skip to contents

Getters / setters for the codec of the tables energyRt writes to disk: a scenario's parameter and variable stores, and the model / repository / dataset stores. "feather" (Arrow IPC) and "parquet" both compress and both support lazy, filtered reads through open_dataset(); parquet is smaller, feather reads faster. "csv" is uncompressed and loses column types on the round trip.

The format is recorded in the store's manifest and is authoritative when an existing store is rewritten, so changing this option never mixes codecs inside one store. The content-addressed stores (save_model(), save_repository(), save_dataset()) pin parquet regardless, because their identity is a content hash that must be reproducible.

For the files handed to a solver, see get_exchange_format().

Usage

get_storage_format()

set_storage_format(format = c("feather", "parquet", "csv"))

get_storage_compression()

set_storage_compression(codec = c("zstd", "lz4", "uncompressed"))

get_storage_compression_level()

set_storage_compression_level(level = 15L)

Arguments

format

one of "feather", "parquet", "csv".

codec

compression codec, e.g. "zstd", "lz4", "uncompressed".

level

integer compression level (ZSTD: 1-22; ignored for lz4).

Value

the option value (getters) or the previous value, invisibly (setters).

Examples

get_storage_format()
#> [1] "feather"