Move data between Clojure tech.v3.dataset and DuckDB inside one process
Replace tmducken with a Panama-backed bridge for more predictable memory release
Stream small Kafka or paginated API batches into DuckDB through a reusable appender
Work with richer DuckDB types like STRUCT, MAP, LIST, ENUM, and HUGEINT from Clojure
Requires Java 22 or newer, DuckDB 1.5 or newer, and the JVM flag that enables native foreign access.
Ducktape is a Clojure library that connects two existing pieces of software. The first is tech.v3.dataset, a Clojure way of working with tables of data in memory. The second is DuckDB, an embedded database that runs inside your own program rather than as a separate server. Ducktape lets a Clojure program move data back and forth between these two worlds. The README presents it as a near drop-in replacement for an older project called tmducken. The main reason the author gives for writing a new library is the underlying way it talks to DuckDB. Tmducken uses an older bridge called JNA. Ducktape uses Java's newer Panama foreign function and memory API, which is only available from Java 22 onwards. The README claims this brings two practical benefits. Memory used by the database is released at predictable times instead of waiting for the garbage collector, which the author says removes a class of crashes that could happen with the older approach. The library also covers more DuckDB column types than tmducken did, including BLOB, HUGEINT, DECIMAL, INTERVAL, ENUM, LIST, STRUCT, MAP, and several timestamp precision variants. A table in the README lists each type and confirms it can be both read and written. A second feature is a streaming appender. For programs that feed a database many small batches at a time, such as Kafka consumers or paginated API ingest, the appender keeps a single connection ready across batches instead of paying setup cost each time. The README claims this can be up to ten times faster for small-batch loads, and that overall read and write performance is up to four times faster than tmducken, with benchmark numbers shown lower in the document. Installation is one Clojure dependency and one JVM option that turns on native access. Java 22 or newer and DuckDB 1.5 or newer are required. The quick start example opens an in-memory database, creates a small table of names and scores from a dataset, and runs a SQL query against it.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.