Retrieves information about available snapshots/versions for a table.
Details
This function queries the snapshot history of a table, showing available versions and their timestamps. This is useful for understanding what historical versions are available for time-travel queries.
A table's snapshots are matched by its name and by every table id the
name has had in its schema, so the history stays complete across
replace_table() and restore_table_version(), which give the table a
new id.
Examples
lake_dir <- tempfile("snaplist_lake_")
dir.create(lake_dir)
attach_ducklake("snaplist_lake", lake_path = lake_dir)
create_table(data.frame(id = 1:3, amount = c(10, 20, 30)), "orders")
# List all snapshots for a table
list_table_snapshots("orders")
#> snapshot_id snapshot_time schema_version
#> 1 1 2026-09-17 21:43:09 1
#> changes author commit_message
#> 1 tables_created, inlined_insert, main.orders, 1 <NA> <NA>
#> commit_extra_info
#> 1 <NA>
detach_ducklake("snaplist_lake", shutdown = TRUE)
unlink(lake_dir, recursive = TRUE)
