Repository navigation
duckdb: read from and write to remote DuckDB servers over Quack - #1347
Open
iremcaginyurtturk wants to merge 5 commits into
Open
iremcaginyurtturk wants to merge 5 commits into
iremcaginyurtturk wants to merge 5 commits into
Conversation
duckdb://host:port?quack=true&token=... reads from and writes to a DuckDB server started with quack_serve. The connection attaches the server to an in-memory DuckDB through the shared ATTACH bootstrap, writes go through the memory stage, and bound query parameters are inlined because Quack doesn't forward them to the server (duckdb/duckdb-quack#323).
Contributor
|
[Medium impact] The PR appears safe to merge; no blocking issues remain. Reviews (4) · Last reviewed commit: "quack: take the token from the URI passw..." · Reviewed by Greptile |
duckdb://:<token>@host:port?quack=true keeps the token where URI maskers already redact it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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.
What
Lets the DuckDB connection talk to a remote DuckDB server started with
quack_serve:duckdb://:<token>@host:port?quack=true. Quack is a mode of the existing DuckDB connection rather than its own scheme, and it reuses the shared ATTACH bootstrap and memory-stage write from #1346.Changes
pkg/source/duckdb/quack.go: parses the URI (token from the password slot; unknown params are rejected instead of becoming part of a local file name) and builds the bootstrap: token as a secret,ATTACH ... AS quack_db,USE, and the server session pinned to UTC.pkg/source/duckdb/dialect.go,pkg/source/adbc: the source opens an in-memory DuckDB and attaches the server through a new optionalInitConnectionhook, so a bad token fails the connection instead of showing up later as a missing table.pkg/destination/duckdb: in Quack modeConnectattaches the server, writes go through the memory stage, CDC leases are rejected, and bound parameters are inlined as literals because Quack drops them (Parameterised statements against an attached quack catalog fail on 2.0-dev: remote_pushdown ships $1/? placeholders without values duckdb/duckdb-quack#323).docs/supported-sources/duckdb.md: Quack section.How to test
duckdb server.dbwith DuckDB 2.0, thenLOAD quack; CALL quack_serve('quack:localhost:9494', token='my_tok');ingestr ingest --source-uri csv://users.csv --source-table users --dest-uri "duckdb://:my_tok@localhost:9494?quack=true" --dest-table main.users, then the same with append, merge, delete+insert and scd2, and with the Quack URI as the source.Risk & rollback
duckdb://paths are unchanged; the only behavior change for them is that a query string now errors instead of silently creating a file with it in the name.Checklist
make test)make format,make lint)make test-integration)Security
Related issues