Quack is released as a pre-release extension and is currently experimental. If you encounter any issues, please file them via GitHub.
The quack extension adds a client-server protocol to DuckDB. With this extension, DuckDB can act as both a server and a client to communicate over a network. For more details, please see
the announcement page,
the blog post
and the documentation.
The Quack extensions autoinstalls and autoloads on first use. You can also install and load it manually using:
INSTALL quack;
LOAD quack;Start Quack on one DuckDB instance, the server, using:
CALL quack_serve('quack:localhost', token = 'super_secret');
CREATE TABLE hello AS FROM VALUES ('world') v(s);And talk to this server from another instance:
CREATE SECRET (TYPE quack, TOKEN 'super_secret');
ATTACH 'quack:localhost' AS remote;
FROM remote.hello;This should show the content of the remote table hello on the client side.
We can also copy data from client to server:
-- on client
CREATE TABLE remote.hello2 AS FROM VALUES ('world2') v(s);-- on server
FROM hello2;DuckDB extensions uses VCPKG for dependency management. Enabling VCPKG via the provided makefile target:
make setup-vcpkg
export VCPKG_TOOLCHAIN_PATH=`pwd`/vcpkg/scripts/buildsystems/vcpkg.cmakeNow to build the extension, run:
makeThe main binaries that will be built are:
./build/release/duckdb
./build/release/test/unittest
./build/release/extension/quack/quack.duckdb_extensionduckdbis the binary for the duckdb shell with the extension code automatically loaded.unittestis the test runner of duckdb. Again, the extension is already linked into the binary.quack.duckdb_extensionis the loadable binary as it would be distributed.
Different tests can be created for DuckDB extensions. The primary way of testing DuckDB extensions should be the SQL tests in ./test/sql. These SQL tests can be run using:
make test