feat: support cloudflare R2 natively#180
Merged
MaxHalford merged 12 commits intocarbonfact:mainfrom Apr 14, 2026
Merged
Conversation
Member
|
I would assume R2 is compatible with S3, so we shouldn't need specific env vars. Let me give it a try. |
0c78e41 to
0d82670
Compare
Contributor
Author
|
@MaxHalford duckdb have specific secret type r2 to work with cloudflare so it very easy to connect via this specific secret type |
88fe344 to
6f1fcfe
Compare
There was a problem hiding this comment.
3 issues found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/quack/README.md">
<violation number="1" location="examples/quack/README.md:85">
P2: README shell example uses an unquoted env value with spaces, causing command parsing errors when copy-pasted.</violation>
</file>
<file name="examples/r2-ducklake/README.md">
<violation number="1" location="examples/r2-ducklake/README.md:28">
P2: README quickstart path is broken: `--scripts jaffle_shop/scripts` does not match the symlink target and repository layout, causing a non-existent scripts directory.</violation>
</file>
<file name="README.md">
<violation number="1" location="README.md:162">
P2: README shell snippets use unquoted env values with spaces, causing copy-paste commands to fail in POSIX shells.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Member
|
Alright @dheerapat I've made some changes in order to support any kind of secret, not just R2 secrets. Now you can do this: LEA_USERNAME=max
LEA_WAREHOUSE=ducklake
LEA_DUCKLAKE_CATALOG_DATABASE=metadata.ducklake
LEA_DUCKLAKE_DATA_PATH=r2://lea-demo
LEA_DUCKLAKE_SECRET=TYPE r2, KEY_ID '<key_id>', SECRET '<secret>', ACCOUNT_ID '<account_id>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Natively support Cloudflare's R2
Summary by cubic
Add native Cloudflare R2 support to DuckLake and quack by configuring DuckDB secrets via env vars. Docs add
r2://,examples/r2-ducklake, and support remote PostgreSQL/MySQL catalogs; quack UI now runsCREATE SECRET, and we only set the active database when the client is DuckLake.LEA_DUCKLAKE_SECRETandLEA_QUACK_DUCKLAKE_SECRET(the body of DuckDBCREATE SECRET).Written for commit 951e93f. Summary will update on new commits.