Skip to contents

Wrapper around nanoparquet::write_parquet() that reopens the file it just wrote and runs assert_parquet_integrity() on it. Use it for pipeline artifacts large enough that a silent write failure would go unnoticed; the verification is metadata-only, so it costs milliseconds regardless of file size.

Usage

write_parquet_checked(data, path, deep = FALSE, ...)

Arguments

data

Data frame to write.

path

Destination path.

deep

Whether to verify by decoding every row group as well as by checking the layout. Reads the whole file back.

...

Passed to nanoparquet::write_parquet().

Value

Invisibly, path.

Examples

path <- tempfile(fileext = ".parquet")
write_parquet_checked(data.frame(x = 1:10), path)
unlink(path)