Returns snapshot metadata plus computed row counts for bars and instruments. This function does not mutate the database.
Value
A 1-row tibble with: snapshot_id, status, created_at_utc, sealed_at_utc, snapshot_hash, bar_count, instrument_count, start_date, end_date, meta_json, error_msg.
bar_count and instrument_count are live counts from the snapshot tables.
start_date and end_date are parsed from seal metadata when present.
meta_json remains available as the raw envelope metadata written on the
snapshot row. Metadata is not part of snapshot_hash.
Details
Timestamps are returned as ISO8601 UTC strings with trailing Z.
Errors:
ledgr_invalid_conifconis not a valid DBI connection.ledgr_invalid_argsifsnapshot_idis not a non-empty character scalar.LEDGR_SNAPSHOT_NOT_FOUNDifsnapshot_iddoes not exist.
Articles
Durable experiment stores:
vignette("experiment-store", package = "ledgr")
system.file("doc", "experiment-store.html", package = "ledgr")
Examples
db_path <- tempfile(fileext = ".duckdb")
con <- ledgr_db_init(db_path)
snapshot_id <- ledgr_snapshot_create(
con,
snapshot_id = "snapshot_20200101_000000_abcd"
)
ledgr_snapshot_info(con, snapshot_id)
#> # A tibble: 1 × 11
#> snapshot_id status created_at_utc sealed_at_utc snapshot_hash bar_count
#> <chr> <chr> <chr> <chr> <chr> <int>
#> 1 snapshot_20200101… CREAT… 2026-05-15T16… NA NA 0
#> # ℹ 5 more variables: instrument_count <int>, start_date <chr>, end_date <chr>,
#> # meta_json <chr>, error_msg <chr>
DBI::dbDisconnect(con, shutdown = TRUE)