feat(loqe): read ADLS warehouses via the azure_wasm community extension - #281
feat(loqe): read ADLS warehouses via the azure_wasm community extension#281HynekBlaha wants to merge 1 commit into
Conversation
DuckDB-WASM has no Azure filesystem: the official `azure` extension has no wasm build, so LoQE could not read `abfss://` tables and ADLS warehouses were excluded from the storage whitelist. `azure_wasm` (https://community-extensions.duckdb.org, source: HynekBlaha/duckdb-azure-wasm) is a loadable wasm-only extension that claims the abfss/abfs/az/wasbs schemes, registers the `azure` secret type and rewrites requests to `https://<host>/<container>/<key>?<sas>`. That is exactly the shape DuckDB's iceberg extension produces from Lakekeeper's vended `adls.sas-token.<account>.<suffix>` credentials (account_name + `AccountName=...;SharedAccessSignature=...`), so no fork of duckdb-wasm is needed. It is only published for DuckDB core v1.5.5, hence the duckdb-wasm bump: - pin `@duckdb/duckdb-wasm` to 1.33.1-dev64.0 (core v1.5.5; the `latest` dist-tag still predates the v1.5.5 bump, and a caret range would not match 1.33.1-dev*) - vendor extensions for v1.5.5 and pull azure_wasm from the community repository, which uses the same `/v<ver>/<platform>/` layout, so the air-gapped mirror keeps working unchanged - LOAD azure_wasm before the first catalog scan, otherwise DuckDB tries to autoload the official `azure` extension and 404s against the mirror. Best-effort: s3/gcs warehouses do not need it - ATTACH option is `STAGE_CREATE_TABLES` since iceberg 1.5.x; the old `SUPPORT_STAGE_CREATE` is silently ignored, which disabled staged creates - allow `adls` in the DuckDB-WASM storage whitelist The lockfile also gains duckdb-wasm's new `qs` dependency tree. Verified against the published binaries: core reports v1.5.5 / wasm_eh, INSTALL + LOAD azure_wasm succeed, `azure` shows up in duckdb_secret_types() and abfss:// paths reach the extension. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
WalkthroughThis change updates DuckDB WASM and extension versions, adds community extension downloads for ChangesDuckDB and ADLS integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to This change adds ADLS warehouse support and updates Iceberg staging behavior, but an azure_wasm loading failure may leave an ADLS catalog appearing available while queries fail later, and the staged-create option still needs confirmation against the pinned runtime. Merge should wait for targeted verification or explicit owner acceptance. Sequence Diagram(s)sequenceDiagram
participant attachCatalog
participant azure_wasm
participant Iceberg
attachCatalog->>azure_wasm: Install and load extension
azure_wasm-->>attachCatalog: Return loaded or unavailable
attachCatalog->>Iceberg: Load and attach catalog
Iceberg-->>attachCatalog: Return attachment result
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🔇 Additional comments (5)
package.json (1)
90-90: LGTM!scripts/download-duckdb-extensions.mjs (1)
17-20: LGTM!Also applies to: 39-48, 89-98, 108-108
src/composables/loqe/LoQEEngine.ts (1)
598-603: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
⚠️ Unverified finding
Sandbox verification was unavailable.Do not silently accept an ADLS catalog when
azure_wasmfails.
useStorageValidation.tsnow marksadlsas supported, but this catch only logs the error and letsattachCatalogresolve. An ADLS query can then fail later with no user-facing feedback. Route the error throughhandleError(e, context, notify?). If the catalog is ADLS, propagate the failure or mark the catalog unavailable. Keep the fallback only for non-ADLS catalogs.As per coding guidelines, always use
handleError(error, context, notify?)for error handling in components and API functions.src/composables/useStorageValidation.ts (1)
16-19: LGTM!src/composables/loqe/CatalogManager.ts (1)
52-60: 📐 Maintainability & Code QualityVerify the option behavior against the exact vendored Iceberg build.
The current DuckDB REST-catalog documentation lists
STAGE_CREATE_TABLES. However, a recent DuckDB-WASM report showssupport_stage_createproducing an “Unhandled options found” error. Run the initial attach and both reattach flows against the pinned1.33.1-dev64.0WASM bundle and vendored v1.5.5 extension. Reword the comment if unknown options are rejected rather than silently collected. (duckdb.org)Also applies to: 159-159, 231-231
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 10e5bcda-60f5-4e1d-aad4-299c61a597e9
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
package.jsonscripts/download-duckdb-extensions.mjssrc/composables/loqe/CatalogManager.tssrc/composables/loqe/LoQEEngine.tssrc/composables/useStorageValidation.ts
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.
DuckDB-WASM has no Azure filesystem: the official
azureextension has no wasm build, so LoQE could not readabfss://tables and ADLS warehouses were excluded from the storage whitelist.azure_wasm(https://community-extensions.duckdb.org, source: HynekBlaha/duckdb-azure-wasm) is a loadable wasm-only extension that claims the abfss/abfs/az/wasbs schemes, registers theazuresecret type and rewrites requests tohttps://<host>/<container>/<key>?<sas>. That is exactly the shape DuckDB's iceberg extension produces from Lakekeeper's vendedadls.sas-token.<account>.<suffix>credentials (account_name +AccountName=...;SharedAccessSignature=...), so no fork of duckdb-wasm is needed.It is only published for DuckDB core v1.5.5, hence the duckdb-wasm bump:
@duckdb/duckdb-wasmto 1.33.1-dev64.0 (core v1.5.5; thelatestdist-tag still predates the v1.5.5 bump, and a caret range would not match 1.33.1-dev*)/v<ver>/<platform>/layout, so the air-gapped mirror keeps working unchangedazureextension and 404s against the mirror. Best-effort: s3/gcs warehouses do not need itSTAGE_CREATE_TABLESsince iceberg 1.5.x; the oldSUPPORT_STAGE_CREATEis silently ignored, which disabled staged createsadlsin the DuckDB-WASM storage whitelistThe lockfile also gains duckdb-wasm's new
qsdependency tree.Verified against the published binaries: core reports v1.5.5 / wasm_eh, INSTALL + LOAD azure_wasm succeed,
azureshows up in duckdb_secret_types() and abfss:// paths reach the extension.Tested complete integration with local lakekeeper fork build:

Summary by CodeRabbit
New Features
Bug Fixes