Build timeline

Seven months, one of them mostly bank CSVs

Nights and weekends. The honest version, including the month I'd like back.

  1. January 2026 · The itch

    A spreadsheet, and its swift collapse

    Exported Spotify and a year of bank statements into Google Sheets to answer one question. Got as far as manually matching UPI narrations to merchants before admitting this was a database problem wearing a spreadsheet costume.

  2. February 2026 · Design & scoping

    Schema first, importers second

    Wrote the curated table definitions and the privacy contract before a single line of import code. Decided the hard constraint early — the LLM sees DDL, never rows — because retrofitting that later is how you end up with a "privacy mode" nobody trusts. Also picked DuckDB over SQLite here, on the grounds that I wanted window functions and date_trunc without installing Postgres.

  3. March 2026 · First import

    Spotify in, and immediately duplicated

    The Spotify importer took an afternoon. Then I imported both the "account data" and "extended history" exports and every play from last March appeared twice. Built the sha256 file ledger, felt clever, and discovered it didn't help at all — two different files, same rows. That's where the per-row dedupe key came from.

  4. April 2026 · English to SQL

    The ask pipeline, and a healthy dose of paranoia

    Wired up the NL-to-SQL loop: schema doc in, SQL out, execution errors fed back for up to two repair attempts. Then spent longer on the guardrails than on the pipeline itself, because the first version of "is this SQL safe?" was a regex, and regexes lose to semicolons.

  5. May 2026 · Where it got hard

    The month the bank importer ate

    Every Indian bank exports CSV differently. Different header rows, different preamble junk, dates as %d/%m/%Y or %d-%b-%Y, amounts as one signed column or separate debit/credit, ₹ symbols, thousands separators, and Cr /Dr suffixes that invert the sign. I wrote heuristics. They worked for HDFC and broke for ICICI. I wrote better heuristics. They broke for the first one again. Around week three I deleted the lot and made it ask — four questions, once per bank, saved to a profile keyed on the header signature. Every import after that is silent. Shipping the question was better engineering than winning the guessing game.

  6. June 2026 · Absence

    Making nothing queryable

    Added the days and weeks calendar-spine views, plus pond log as the manual escape hatch for signals with no data trail. This is the change that made the original question answerable — and it also visibly improved the LLM's first-attempt SQL, because "weeks I skipped gym" stopped requiring a clever anti-join and started being a WHERE clause.

  7. July 2026 · Polish & ship

    Tests, CI, and this website

    Full pytest suite running against synthetic fixtures only — no real personal data in the repo, ever — plus ruff, GitHub Actions, and a cross-platform encoding fix found by running the suite on Windows for the first time. Then wrote the docs and built this site, because a CLI with no front door is a CLI nobody clones.

Technical decisions

Four calls I'd defend in an interview

Guardrails are an AST walk, not a blocklist

Problem: the model writes SQL that then runs against my real database. Prompt instructions are not a security boundary.

Solution: parse with sqlglot and walk the tree. Exactly one statement. Must be a Query node. Reject any Insert, Update, Delete, Create, Drop, Attach, Copy, Pragma, Set or raw Command anywhere in the tree, and any function that reaches the filesystem — read_csv, read_parquet, glob, getenv. Un-limited selects get a LIMIT 500 appended. A blocklist checks strings; a parser checks meaning.

Two-layer idempotency

Problem: exports overlap. Re-running an import should never be scary.

Solution: layer one is a sha256 of the file in an _imports ledger — skip files already processed. Layer two is a deterministic dedupe_key per row (source + natural key), enforced UNIQUE and checked at insert time, which also collapses duplicates within a single batch via a row_number() window. --force re-reads a file; row-level dedupe still refuses to duplicate anything.

Calendar spine views over clever anti-joins

Problem: the questions worth asking are about gaps, and gaps have no rows.

Solution: generate them. days is a generate_series over the full range of the data; weeks rolls it up and pre-computes went_to_gym as an EXISTS against activities. Cheap to rebuild, so they're re-created on every connect and can never drift from the code. The side effect nobody warns you about: giving the model a good schema is worth more than giving it a good prompt.

Ask the human once, then never again

Problem: bank CSV formats are genuinely un-inferable, and a wrong guess silently corrupts financial data.

Solution: an interactive first-run mapping saved as a profile keyed on the sorted header signature, so the same bank is recognised on every future import even when it shuffles its preamble rows around. In non-interactive contexts it fails loudly with instructions rather than guessing. Sometimes the right amount of automation is "not yet".

Tech stack

What's in it, and why that

DuckDB
An analytics engine that lives in one file with no server. Window functions, generate_series, and real timestamp handling on a laptop — SQLite would have meant hand-rolling half of that.
sqlglot
A proper SQL parser with a DuckDB dialect. It's what turns "validate the model's SQL" from wishful string matching into an AST walk.
Anthropic Claude
Does one job: schema in, SQL out. Model is configurable, retries are bounded, and the call is entirely optional — pond sql never touches it.
Typer + Rich
Typer turns typed function signatures into a CLI with help text for free; Rich makes the output something you'd actually want to read at 1am.
Pydantic
Config and bank profiles are validated models, not dictionaries you hope are shaped right. A malformed config.yaml fails at load with a useful message.
uv
Locked, reproducible environments in seconds, and uv tool install . puts pond on your PATH without a virtualenv ritual.
pytest · ruff · GitHub Actions
56 tests against synthetic fixtures, lint and format enforced in CI. The test suite runs with POND_HOME pointed at a temp directory so it can never touch a real warehouse.
This site
Hand-written HTML and CSS, zero dependencies, zero build step, deployed static on Vercel. A page about a local-first tool shouldn't need 400 npm packages to render a headline.

Project links

Go look at it

Source on GitHub

MIT licensed. Importers, guardrails, the full test suite, and a PROJECT_DEEP_DIVE.md if you want the architecture without the prose.

charanreddy-27/pond

The LinkedIn write-up

A shorter version of this page, for people who prefer their engineering stories with a scroll bar. Going up shortly — until then, follow along here.

What's next

Want to build something — or break something interesting?

If you've read this far you're probably the kind of person I like working with. Tell me what you're building.