dr_lake_config()
This constructor validates configuration and resolves paths, but does not
create directories, install extensions, connect to databases or read secrets.
With
path, it may read an existing dataraft.json to preserve the saved
backend and ordered layers, including named layer roles. It never creates
or writes files. A new shorthand lake defaults to
DuckDB; other calls retain the usual DuckLake default. The local layout and
backend marker are shared with dr_open_lake(). Unknown non-empty folders are
refused rather than interpreted as a new lake.
Pass its result to dr_connect_lake() or dr_target_lake() when ready to execute.
Usage
dr_lake_config(
catalog = dr_registry_duckdb("metadata.ducklake"),
storage = dr_storage_local("data"),
layers = c("raw", "validated", "products"),
landing = "landing",
backend = c("ducklake", "duckdb"),
install_extensions = TRUE,
read_only = FALSE,
path = NULL
)Arguments
- catalog
- Metadata configuration.
- storage
- Data file storage configuration.
- layers
- Ordered schema names.
- landing
- Local immutable landing directory and S3 staging folder.
- backend
"ducklake"or local"duckdb".- install_extensions
- Allow DuckDB to install required extensions.
- read_only
- Attach existing storage read-only and skip creation writes.
- path
- Optional local lake folder. Derives
metadata.duckdb,dataandlandingwithin that folder. Supply eitherpathor explicitcatalog,storageandlanding, not both. An explicit backend must agree with a folder's saved backend. Explicit layers must match its saved layers; omit them when reopening. Default layers are unchanged; selectlayers = c("raw", "staging", "core", "marts")when needed.
Value
A connection-free
lake_config specification.
Examples
config <- dr_lake_config(backend = "duckdb")
print(config)
local <- dr_lake_config(path = file.path(tempdir(), "my-data-lake"))
print(local)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.