Skip to contents

One row of facts about a lake: which catalog backend it uses and where the catalog and data live, the DuckLake format version the catalog was written in, the extension version reading it, whether its Parquet files are encrypted, and the current snapshot id. Handy at the top of a report or a pipeline log, and the first thing to look at when a lake behaves unexpectedly.

Usage

get_ducklake_info(ducklake_name = NULL)

Arguments

ducklake_name

Optional name of the attached DuckLake catalog. If NULL, the current database is used.

Value

A one-row data frame with ducklake_name, backend, catalog (the catalog file or connection string), data_path, format_version, extension_version, encrypted, and current_snapshot.

Examples

lake_dir <- tempfile("info_lake_")
dir.create(lake_dir)
attach_ducklake("info_lake", lake_path = lake_dir)
create_table(mtcars, "cars")

get_ducklake_info()
#>   ducklake_name backend
#> 1     info_lake  duckdb
#>                                                     catalog
#> 1 /tmp/RtmpRpiQmQ/info_lake_18d573d5ee7c/info_lake.ducklake
#>                                 data_path format_version extension_version
#> 1 /tmp/RtmpRpiQmQ/info_lake_18d573d5ee7c/            1.0          d8a1881e
#>   encrypted current_snapshot
#> 1     FALSE                1

detach_ducklake("info_lake", shutdown = TRUE)
unlink(lake_dir, recursive = TRUE)