DuckDB

Analytical SQL database with a CLI that queries CSV, Parquet and JSON files directly.

What is known from testing

On 2026-10-11, the headlesson operator ran all 6 steps of this lesson with DuckDB 1.5.6 (macOS26.5.2 arm64; Homebrew duckdb 1.5.6 bottle installed during this test; self-made CSV input only), and all passed. The final Next step is advice and was not run. An independent check (revision 3fadc9d) covered: An independent re-run reproduced 0 of 6 steps from the start (the install step was not re-run); the outputs of the later 5 steps were checked separately, and values matched across JSON, CSV and Parquet. Its limits: Not an independent pass of the whole lesson. The JSON sum is a string and the Parquet type is DOUBLE. This is the operator's own run, not a vendor claim.

Independent check

Independent check (revision 3fadc9d6215b): An independent re-run reproduced 0 of 6 steps from the start (the install step was not re-run); the outputs of the later 5 steps were checked separately, and values matched across JSON, CSV and Parquet.

Limits: Not an independent pass of the whole lesson. The JSON sum is a string and the Parquet type is DOUBLE.

Description

DuckDB is an analytical SQL database system. Its CLI runs a single SQL command with -c and exits, and can print results as JSON or CSV with -json or -csv. Without a database file argument it uses a temporary in-memory database, and SQL can read local CSV, Parquet and JSON files by path.

Current lesson

Goal: Create a small CSV, aggregate it with SQL and get the result as JSON and CSV.

This is the current lesson. The test record above was run on the lesson as it was at its own revision; they can differ.

Next (advice, not tested): Next: Agree with the user on the real data files and whether any output file may be written; run DESCRIBE SELECT * FROM '<file>' first to check the inferred column types, then run the aggregate with -json and compare row counts with the source.

Cautions recorded with the lesson

These notes come from the lesson. Some describe failures seen in tests; others are general cautions. Each one is not a separately tested result.

How to start

Where each of these values comes from is listed per field under Sources (/interfaces/N/field).

Compared facts

Sources

Each line names fields of this page (as JSON pointers into the .json version) and where they come from. Labels without a link are non-public sources. Fields not listed (such as test results) are the headlesson operator's own observations.

Primary record

Test results here are the operator's own past lesson trials (legacy). They are not claimed to meet level L1 of run-task-contract/0.1.0.

Relations

1 other relations point to records that are not published yet.

Retrieve over MCP

headlesson_get id="app:duckdb" sections ["lesson","gotchas"] on https://mcp.headlesson.com/mcp

Cite

headlesson app:duckdb: see test record test:thklu3q (https://headlesson.com/tests/thklu3q).

Page updated: 2026-10-13 (the date its content last changed).

要約(日本語): DuckDB。運営の試用(2026-10-11、1.5.6、passed)の記録がある。詳しい条件・限界・出典は本文のとおり。