dr_target_rds()
Publish a table using only R and the hard DataRaft dependencies. Each successful
write creates a new version directory containing data and its checksum. Existing
versions are never overwritten. A directory lock rejects concurrent writers;
staging is renamed into place only after both files are complete. This is local
filesystem storage, not a database transaction or a distributed lock service.
After a crashed writer, inspect the directory before manually removing
.lock
and abandoned .staging-* directories. Network filesystems must provide the
same directory creation and rename semantics to use this adapter safely.
Usage
dr_target_rds(path)Arguments
- path
- Local directory containing versioned releases, not a single file.
Value
A target for
dataraft.core::dr_set_target().
Examples
path <- tempfile("orders-")
result <- dataraft.core::dr_product("orders", data.frame(id = 1:2)) |>
dataraft.core::dr_set_target(dr_target_rds(path)) |>
dataraft.core::dr_publish()
dataraft.core::dr_read_source(dr_source_rds(path, result$outputs$version))
unlink(path, recursive = TRUE)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.