Skip to content

docs: propose native DuckLake layered storage (SQLite-catalog)#74

Open
db-tycoon-stephen wants to merge 4 commits into
mainfrom
docs/ducklake-proposal
Open

docs: propose native DuckLake layered storage (SQLite-catalog)#74
db-tycoon-stephen wants to merge 4 commits into
mainfrom
docs/ducklake-proposal

Conversation

@db-tycoon-stephen

@db-tycoon-stephen db-tycoon-stephen commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Adds docs/proposals/ducklake-layered-storage.md — a storage-engine proposal for giving each warehouse layer its own DuckLake catalog (SQLite metadata + Parquet, S3-able), composed via ATTACH; dbt reads raw read-only and materializes into mart.

Docs-only. Not part of v0.1.10 (the security pass) — proposal for a future minor.

Why

Came out of a 4-spike investigation (all green; DuckDB 1.5.3, ducklake e6a3bd0a, real Rill 0.86, dbt-duckdb 1.10.1). Headline finding corrects shipped docs (docs/commands/data/analyze.md:68): the read-while-ingest lock that justified the Parquet bridge for Rill is a property of the catalog metadata backend (DuckDB-file locks per-process), not of DuckLake or SQLite. A SQLite-backed catalog supports live Rill reads during ingest — confirmed with the real Rill binary, 0 lock conflicts.

Validated

  • Quack and DuckLake do not compose (fronting DuckLake with Quack ruled out).
  • DuckDB-file catalog backend locks; SQLite is multi-process safe.
  • Real Rill 0.86 reads a ducklake:sqlite: catalog live during ingest, 0 conflicts.
  • dbt-duckdb materializes raw-catalog → mart-catalog via profiles.yml attach:.

Relationship

Open risk

data_path: s3://… is unproven (all spikes used local paths) — gated as Phase 1.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Storage-engine proposal from a 4-spike investigation (all green): one
DuckLake catalog per layer (SQLite metadata + Parquet, S3-able), composed
via ATTACH; dbt reads raw read-only and materializes into mart.

Key finding corrects docs/commands/data/analyze.md:68 — the
read-while-ingest lock is a property of the catalog metadata backend
(DuckDB-file locks per-process), not of DuckLake or SQLite. Real Rill 0.86
reads a ducklake:sqlite: catalog live during ingest with zero conflicts.

Builds on the shipped layer-aware data model (#30), unblocks layer-granular
backup (#31). Not part of v0.1.10. Filed #71, #72, #73.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a proposal for native DuckLake layered storage using a SQLite-catalog to enable a local-first lakehouse on object storage. The review feedback highlights a validation issue with the proposed dbt-duckdb profile configuration, which does not support custom fields like is_ducklake or options out-of-the-box, and identifies a missing markdown reference link for [no-legacy stance].

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/proposals/ducklake-layered-storage.md
Comment thread docs/proposals/ducklake-layered-storage.md Outdated
…d link

- Clarify the attach syntax (is_ducklake/options) is native in dbt-duckdb
  >= 1.10 (validated on 1.10.1 in spike 4); older versions reject it and
  need a custom plugin. Implementation must pin a version floor.
- Replace the undefined [no-legacy stance] markdown reference with plain text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@db-tycoon-stephen

Copy link
Copy Markdown
Contributor Author

Review triage — commit ae56ca6

Addressed the Gemini Code Assist review:

  • Undefined [no-legacy stance] markdown link → replaced with plain text.
  • ↩️ "dbt-duckdb attach rejects is_ducklake/options" → accurate for older dbt-duckdb, but not for 1.10.1 (the version this proposal targets): the Attachment model declares options/is_ducklake as first-class fields, and spike 4 ran a real dbt run with this exact profile (materialized into the mart DuckLake catalog, 3 snapshots). Rather than dismiss it, added an explicit dbt-duckdb ≥ 1.10 version-floor note with the plugin fallback for older versions.

For reviewers: this PR is docs-only (a proposal) and not part of v0.1.10 (the security pass). Tracked as #73 / PTC-41. Open risk noted in the doc: data_path: s3://… is unproven (Phase 1).

@db-tycoon-stephen

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a proposal for a native DuckLake layered storage architecture using a SQLite-backed catalog to enable multi-process, local-first lakehouses. The feedback identifies two key improvements in the proposal's examples: ensuring the SQL ATTACH statement uses READ_ONLY TRUE for better DuckDB version compatibility, and adding the missing data_path option to the raw attachment in the dbt profile configuration.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/proposals/ducklake-layered-storage.md
Comment thread docs/proposals/ducklake-layered-storage.md
A DuckLake catalog stores data_path in metadata at creation, so re-attaching
an existing catalog (raw, created by ingestion) needs no data_path — only the
catalog created here (mart) specifies it. Verified by re-attaching a
ducklake:sqlite: catalog read-only with no data_path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@db-tycoon-stephen

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new proposal document (docs/proposals/ducklake-layered-storage.md) outlining a native DuckLake layered storage architecture using a SQLite-catalog. The feedback points out that the dbt profile YAML example in the proposal is missing the required schema field, which would cause dbt validation to fail, and suggests adding a default schema to make the example valid.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/proposals/ducklake-layered-storage.md
…view)

The condensed profile example omitted schema:, which dbt requires (spike 4's
working profile had it). Add schema: main to keep the example copy-pasteable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant