Data and databases · Edition No. 24 · 18 Sep 2026

noborus/trdsql

Runs SQL queries directly against CSV, LTSV, JSON, YAML and TBLN files, with no database involved.

← Data and databasesRead the whole edition →
05

noborus/trdsql

💎 hidden gem

2.2k stars · MIT · v1.2.3 (2026-05-29), read from /releases/latest on 2026-09-18; the release page states ten commits have landed since · Track this in Scout

Runs SQL queries directly against CSV, LTSV, JSON, YAML and TBLN files, with no database involved.

Repo detailsthe review · specs · pros & cons · install

What it is

A command-line program written in Go. SQL is the language you use to ask a database questions. Trdsql loads your file into a temporary database in memory, runs your query against it, and prints the result. It reads CSV, TSV, LTSV, JSON, YAML and TBLN, and it can write out as CSV, JSON, a Markdown table or several other shapes.What it is good for. Anyone with a folder full of exports that nobody ever looks at properly. The problem it removes is the small program you write, use once and throw away. It will also join a CSV against a JSON file in a single query, which is the thing a spreadsheet cannot do at all. A short line about ScalpingMate: trade exports arrive as CSV, and counting how many trades in a month closed at a loss is now one line rather than a script.

Stars2.2k
LicenceMIT
Latestv1.2.3 (2026-05-29), read from /releases/latest on 2026-09-18; the release page states ten commits have landed since
Good
  • It joins two files of different formats in one query, which nothing else in this ledger does as simply.
  • It prints the answer as CSV, JSON, a Markdown table or an aligned table, so the result goes straight into a document.
  • MIT licence, a single binary, and it can be pointed at a real PostgreSQL or MySQL server when the file is too big for memory.
Watch for
  • You have to know some SQL. If you do not, this is a thing to learn rather than a thing to install.
  • By default the file is read into memory, so a very large file needs the PostgreSQL mode instead.
  • There is no screen and no history. It answers one question and exits.
Similar repositories
Install
# With Go installed:
go install github.com/noborus/trdsql/cmd/trdsql@latest
# Or on macOS:
brew install noborus/tap/trdsql
# Or download a binary from
# https://github.com/noborus/trdsql/releases/latest
# Ask a question:
trdsql -ih "SELECT symbol, COUNT(*) FROM trades.csv GROUP BY symbol"
# Join two files of different formats, and print a Markdown table:
trdsql -omd "SELECT t.id, a.name FROM trades.csv AS t JOIN accounts.json AS a ON t.acct = a.id"
Screenshots
noborus/trdsql: GitHub preview cardnoborus/trdsql: Screenshot 1

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.