HeadlinesBriefing favicon HeadlinesBriefing.com

DuckDB Power Tools for Clojure

Hacker News •
×

TechAscent introduces tmducken, a Clojure integration for DuckDB, enabling powerful in-memory data processing on a laptop. While tech.ml.dataset (TMD) excels with in-memory data, handling datasets exceeding RAM often led to unwieldy workarounds or cluster solutions.

DuckDB, a columnar database, addresses this by providing efficient out-of-memory storage and fast relational queries. The tmducken integration leverages DuckDB's vectorized SQL execution engine. A practical example demonstrates loading a 50GB CSV file into DuckDB, which is compressed to 18GB with automatic indexing. This data can then be queried directly from Clojure using TMD.

Further, tmducken facilitates joining large datasets, such as a 400 million row transaction table with a color information table. Complex queries, like calculating sales per color in a specific month, are executed rapidly. The integration also supports advanced processing, including zero-copy query pathways for memory-efficient reductions, allowing arbitrary processing of realized datasets without memory constraints.