Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/integrations/engines/duckdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ SQLMesh will place models with the explicit catalog "ephemeral", such as `epheme
type: ducklake
path: 'catalog.ducklake'
data_path: data/ducklake
override_data_path: true
encrypted: True
data_inlining_row_limit: 10
metadata_schema: main
Expand All @@ -105,6 +106,7 @@ SQLMesh will place models with the explicit catalog "ephemeral", such as `epheme
type="ducklake",
path="catalog.ducklake",
data_path="data/ducklake",
override_data_path=False,
encrypted=True,
data_inlining_row_limit=10,
metadata_schema="main",
Expand All @@ -120,6 +122,7 @@ SQLMesh will place models with the explicit catalog "ephemeral", such as `epheme

- `path`: Path to the DuckLake catalog file
- `data_path`: Path where DuckLake data files are stored
- `override_data_path`: Whether data_override_path option is set
- `encrypted`: Whether to enable encryption for the catalog (default: `False`)
- `data_inlining_row_limit`: Maximum number of rows to inline in the catalog (default: `0`)
- `metadata_schema`: The schema in the catalog server in which to store the DuckLake metadata tables (default: `main`)
Expand Down Expand Up @@ -364,6 +367,7 @@ The `filesystems` accepts a list of file systems to register in the DuckDB conne
type: ducklake
path: myducklakecatalog.duckdb
data_path: abfs://MyFabricWorkspace/MyFabricLakehouse.Lakehouse/Files/DuckLake.Files
override_data_path: False
extensions:
- ducklake
filesystems:
Expand Down
3 changes: 3 additions & 0 deletions sqlmesh/core/config/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class DuckDBAttachOptions(BaseConfig):

# DuckLake specific options
data_path: t.Optional[str] = None
override_data_path: t.Optional[bool] = False
encrypted: bool = False
data_inlining_row_limit: t.Optional[int] = None
metadata_schema: t.Optional[str] = None
Expand All @@ -258,6 +259,8 @@ def to_sql(self, alias: str) -> str:
path = f"ducklake:{path}"
if self.data_path is not None:
options.append(f"DATA_PATH '{self.data_path}'")
if self.override_data_path:
options.append("OVERRIDE_DATA_PATH true")
if self.encrypted:
options.append("ENCRYPTED")
if self.data_inlining_row_limit is not None:
Expand Down
1 change: 1 addition & 0 deletions tests/core/test_connection_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ def test_duckdb_attach_ducklake_catalog(make_config):
type="ducklake",
path="catalog.ducklake",
data_path="/tmp/ducklake_data",
override_data_path=False,
encrypted=True,
data_inlining_row_limit=10,
),
Expand Down