dr_target_pins()
Storage, authentication and version retention belong to pins and the board.
The output descriptor identifies this write using supported pins user metadata,
rather than assuming that a hash-sorted version is newest. Identical content
may reuse the current version. Coordinate writers externally; this adapter
does not promise atomic or immutable publication. A return to older tied
content can trigger pins' unchanged-content shortcut and is rejected if it
cannot be confirmed. After the board timestamp advances, use
dr_target_pins(board, name, force_identical_write = TRUE) to publish that content,
or choose a new pin name. Ordinary retries can keep hitting the same shortcut.
Forcing an identical version identifier within the same timestamp can fail
after pins updates its metadata; do not use it to bypass timestamp collisions.
The publication ID is verified after writing. Storage remains pins' responsibility.
Extra arguments go to pins::pin_write().
Usage
dr_target_pins(board, name, type = "rds", ...)Arguments
- board
- Configured pins board.
- name
- Pin name.
- type
- Storage format accepted by pins. Defaults to
"rds". - ...
- Named arguments to
pins::pin_write(), such asversioned = TRUE.
Value
A target specification for
dataraft.core::dr_set_target().
Examples
\dontshow{if (requireNamespace("pins", quietly = TRUE)) withAutoprint(\{ # examplesIf}
board <- pins::board_temp(versioned = TRUE)
dataraft.core::dr_product("orders") |>
dataraft.core::dr_add_source(data.frame(id = 1:2)) |>
dataraft.core::dr_set_target(dr_target_pins(board, "orders")) |>
dataraft.core::dr_run()
\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.