write_parquet_zstd: Write a zstd-compressed parquet file

View source: R/utils_filesave.R

write_parquet_zstdR Documentation

Write a zstd-compressed parquet file

Description

A basic wrapper around arrow::write_parquet().

Usage

write_parquet_zstd(
  x,
  sink,
  compression_level = 6,
  write_statistics = FALSE,
  ...
)

Arguments

x

data.frame, RecordBatch, or Table

sink

A string file path, URI, or OutputStream, or path in a file system (SubTreeFileSystem)

compression_level

compression level. Meaning depends on compression algorithm

write_statistics

Specify if we should write statistics. Default TRUE

...

Arguments passed on to arrow::write_parquet

chunk_size

how many rows of data to write to disk at once. This directly corresponds to how many rows will be in each row group in parquet. If NULL, a best guess will be made for optimal size (based on the number of columns and number of rows), though if the data has fewer than 250 million cells (rows x cols), then the total number of rows is used.

version

parquet version, "1.0" or "2.0". Default "1.0". Numeric values are coerced to character.

compression

compression algorithm. Default "snappy". See details.

use_dictionary

Specify if we should use dictionary encoding. Default TRUE

data_page_size

Set a target threshold for the approximate encoded size of data pages within a column chunk (in bytes). Default 1 MiB.

use_deprecated_int96_timestamps

Write timestamps to INT96 Parquet format. Default FALSE.

coerce_timestamps

Cast timestamps a particular resolution. Can be NULL, "ms" or "us". Default NULL (no casting)

allow_truncated_timestamps

Allow loss of data when coercing timestamps to a particular resolution. E.g. if microsecond or nanosecond data is lost when coercing to "ms", do not raise an exception

properties

A ParquetWriterProperties object, used instead of the options enumerated in this function's signature. Providing properties as an argument is deprecated; if you need to assemble ParquetWriterProperties outside of write_parquet(), use ParquetFileWriter instead.

arrow_properties

A ParquetArrowWriterProperties object. Like properties, this argument is deprecated.


adamleejohnson/R-ajtools documentation built on April 4, 2022, 7:24 a.m.