dr_target_parquet()
Writes a temporary file beside its destination, then publishes with one
filesystem rename. Writing or rename failure preserves the existing file.
Atomic replacement depends on the filesystem: platforms that cannot replace
an existing file this way report an error. Coordinate concurrent writers
externally. Remote URIs and dataset-directory writes are unsupported here.
Usage
dr_target_parquet(path, overwrite = FALSE, ...)Arguments
- path
- Local destination file. Its parent directory must already exist.
- overwrite
- Allow replacing an existing file; defaults to
FALSE. - ...
- Named arguments to
arrow::write_parquet().
Value
A target specification for
dataraft.core::dr_set_target().
Examples
\dontshow{if (requireNamespace("arrow", quietly = TRUE)) withAutoprint(\{ # examplesIf}
path <- tempfile(fileext = ".parquet")
dataraft.core::dr_product("orders") |>
dataraft.core::dr_add_source(data.frame(id = 1:2)) |>
dataraft.core::dr_set_target(dr_target_parquet(path)) |>
dataraft.core::dr_run()
unlink(path)
\dontshow{\}) # examplesIf}Documentation source snapshot · View source at 2f9432d ↗
Code examples are documented source examples; they are not executed in this website build.
Code examples are documented source examples; they are not executed in this website build.