DuckLake keeps all of its bookkeeping – snapshots, table schemas, data file locations, and more – in ordinary tables inside the catalog database. This function gives you a lazy reference to any of them, which is handy for auditing and for understanding how your lake evolves.
Details
Commonly useful tables include ducklake_snapshot (one row per
snapshot), ducklake_table (registered tables), and ducklake_data_file
(the Parquet files backing each table). The full list is in the
DuckLake specification.
See also
list_table_snapshots() for a friendlier view of snapshot history.
Other table operations:
add_data_files(),
create_schema(),
create_table(),
create_view(),
drop_schema(),
drop_view(),
ducklake_exec(),
get_ducklake_table(),
list_ducklake_tables(),
replace_table(),
show_ducklake_query()
Examples
lake_dir <- tempfile("meta_lake_")
dir.create(lake_dir)
attach_ducklake("meta_lake", lake_path = lake_dir)
create_table(mtcars, "cars")
# Every snapshot ever taken
get_metadata_table("ducklake_snapshot") |> dplyr::collect()
#> # A tibble: 2 × 5
#> snapshot_id snapshot_time schema_version next_catalog_id next_file_id
#> <dbl> <dttm> <dbl> <dbl> <dbl>
#> 1 0 2026-09-17 21:43:05 0 1 0
#> 2 1 2026-09-17 21:43:05 1 2 1
# Which Parquet files back the lake?
get_metadata_table("ducklake_data_file") |>
dplyr::select(data_file_id, path) |>
dplyr::collect()
#> # A tibble: 1 × 2
#> data_file_id path
#> <dbl> <chr>
#> 1 0 ducklake-01a0b152-c02f-7d31-ac09-c292cbab5d31.parquet
detach_ducklake("meta_lake", shutdown = TRUE)
unlink(lake_dir, recursive = TRUE)
