dr_read_release()
Returns the latest successfully published data as a tibble. Failed writes
leave that release intact. Set
lazy = TRUE to filter or aggregate in the
database before collecting large data; keep the connection open while using
a lazy table. Use release to read an exact historical version.
Usage
dr_read_release(lake, name, release = NULL, lazy = FALSE)Arguments
- lake
- Connected lake.
- name
- Published asset name.
- release
- Optional release ID. Defaults to the latest release.
- lazy
- Return a lazy database table instead of collecting all rows.
Value
A tibble, a lazy
tbl_sql when lazy = TRUE, or a dm for a
model product. Models restore all member tables from the same manifest.
Examples
\dontshow{if (requireNamespace("duckdb", quietly = TRUE)) withAutoprint(\{ # examplesIf}
root <- tempfile("dataraft-")
lake <- dr_open_lake(root)
dr_write_data(lake, data.frame(id = 1:3), "orders")
dr_read_release(lake, "orders")
dr_read_release(lake, "orders", lazy = TRUE) |>
dplyr::filter(id > 1) |>
dplyr::collect()
dr_close_lake(lake)
unlink(root, recursive = TRUE)
\dontshow{\}) # examplesIf}See also
Documentation source snapshot · View source at 113c179 ↗
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.