Database guides

DuckDB

Updated 2026-08-01 · 3 min read

In-process analytical SQL over a local file — and the engine quietly powering every CSV, Parquet and Excel file you open in AddisDB.

DuckDB is an analytical database that runs inside the application rather than as a server — think SQLite, but columnar and built for aggregation. AddisDB bundles it, which is also how every CSV, Parquet, Excel and Arrow file you open gets real SQL.

Who it is for

DuckDB is for analysis on a laptop. It scans columnar data at speeds that make a warehouse feel unnecessary for anything under a few hundred gigabytes, reads Parquet and CSV directly, and needs no infrastructure at all.

Its SQL dialect is a genuine reason to use it, not just a compatibility layer: SELECT * EXCLUDE (col), GROUP BY ALL, list and struct types, and QUALIFY for filtering on a window function all remove a layer of boilerplate you would otherwise write by hand.

Use it for local exploration of exported data, as a fast intermediate step between raw files and a warehouse, for reproducible analysis you can hand to someone as a single file, or to prototype the SQL you will eventually run on Snowflake or BigQuery.

Getting a database file

  1. Install the DuckDB CLI (brew install duckdb, or download a binary) if you want to create databases outside AddisDB.
  2. Run duckdb analytics.duckdb to create a persistent database file.
  3. Load your data into it — DuckDB reads Parquet, CSV and JSON directly with read_parquet(), read_csv_auto() and read_json_auto().
  4. A .duckdb file is written by one process at a time. Close the CLI before opening the same file in AddisDB.
  5. Or skip this entirely and open your data file directly in AddisDB; it is materialized into DuckDB for you.
-- Build a DuckDB file from Parquet in one statement
CREATE TABLE events AS
  SELECT * FROM read_parquet('exports/events-*.parquet');

Connect from AddisDB

  1. New Connection → DuckDB under Relational / SQL.
  2. Choose your .duckdb file — there is no host, port or password.
  3. Test, then Save.

Dialect worth knowing

-- Everything except the noisy columns, grouped without repeating yourself
SELECT * EXCLUDE (raw_payload, ingest_id)
FROM   events
WHERE  ts >= now() - INTERVAL 7 DAY;

SELECT status, source, count(*) AS n
FROM   events
GROUP  BY ALL
ORDER  BY n DESC;

The AI chat is grounded in DuckDB’s dialect specifically, so a generated query uses these functions rather than the Postgres or MySQL equivalents that would not parse.

What AddisDB gives you

  • Full SQL with the schema diagram and ⌘K search across every object.
  • The Chart view for turning an aggregation into a visual without leaving the results pane.
  • Mock data generated from your real schema.
  • AI querying grounded in DuckDB’s SQL dialect, so generated queries use the right functions.
  • Notebooks — mix narrative and queries when the analysis needs to be readable later.
  • Read-only connections and destructive-statement detection, exactly as on a server engine.
A DuckDB aggregation rendered on the AddisDB Chart view.