dr_check_delivery()
Compares the latest published stand with an explicit due time and business
date. Partitioned releases are checked for the expected date in their current
data, so correcting an older partition does not hide a retained delivery.
A full replacement does not inherit historical delivery evidence.
This function must be called by an existing scheduler; it creates none.
Missing deliveries generate deduplicated metadata events. No message is sent
unless the caller supplies a notification transport.
Usage
dr_check_delivery(
lake,
asset,
contract,
business_date,
due_at,
at = Sys.time(),
notify = NULL,
date_column = NULL,
record = !isTRUE(lake$config$read_only)
)Arguments
- lake
- Connected lake.
- asset
- Expected governed asset ID.
- contract
- Contract identifying the producer and expected freshness.
- business_date
- Expected date, as
Dateor ISOYYYY-MM-DDstring. - due_at, at
- Due time and evaluation time, both POSIXct scalars.
- notify
- Optional function receiving an event without source rows.
Requires
record = TRUEto retain deduplication evidence. - date_column
- Optional business-date column to inspect in the current release. Inferred for a single date partition; otherwise the delivery's recorded business date is used. Supply explicitly for multi-date full writes.
- record
- Persist monitoring events. Defaults to
FALSEon read-only lakes.
Value
A tibble with status
pending, received or missing. Once due,
the result is also persisted as an operational event.
Examples
\dontshow{if (requireNamespace("duckdb", quietly = TRUE)) withAutoprint(\{ # examplesIf}
root <- tempfile("dataraft-")
lake <- dataraft.lake::dr_connect_lake(dr_lake_config(dr_registry_duckdb(file.path(root, "lake.db")),
dr_storage_local(file.path(root, "data")),
landing = file.path(root, "landing"), backend = "duckdb"))
contract <- dataraft.core::dr_contract("orders", version = "1",
columns = c(id = "integer"), key = "id")
dr_check_delivery(lake, "orders", contract, as.Date("2026-08-31"),
due_at = as.POSIXct("2026-09-01 09:00:00", tz = "UTC"),
at = as.POSIXct("2026-09-01 10:00:00", tz = "UTC"))
dataraft.lake::dr_disconnect_lake(lake)
unlink(root, recursive = TRUE)
\dontshow{\}) # examplesIf}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.