Why datasets differ, not just that they do

wherefore is an open-source CLI that compares two datasets — two CSVs, two database tables, a source and a target in a migration — and explains which specific, known failure pattern caused each difference, instead of handing you a raw list of unequal cells.

Try it live →

The problem

Every data migration, ETL pipeline, and system cutover eventually produces the same question: "why don't these two datasets match?" Most diff tools answer half of that — they tell you that row 47 is different, or that column X has 12 mismatches — and stop there. Someone still has to open both files side by side and manually work out whether it's a timezone bug, a truncated field, a dropped column, or something else entirely.

The approach

wherefore runs a deterministic taxonomy of known data-failure patterns against the comparison — truncation, null coercion, enum drift, timezone shifts, schema/column drift, deduplication failures, reformatted keys — and reports which pattern's statistical signature actually matches each mismatch, with a confidence score. That detection is entirely rule-based: no model call, no guessing, fully reproducible.

An optional layer on top can call Claude to write a plain-English narrative explaining the likely cause — but the underlying detection never depends on it. Every finding you see in the live demo is deterministic first; the narrative, when present, is additive.

What it's built on

wherefore wraps datacompy, Capital One's open-source dataframe comparison library, for the actual row/column matching — then adds the pattern-detection and explanation layer on top. It's a CLI-first tool: no server, no account, works against local files or a real database connection (SQLite, PostgreSQL).

What it supports today

SourceDetails
Files.csv, .json, .parquet, .xlsx / .xls
Cloud storages3:// paths, same file types as above
DatabasesSQLite and PostgreSQL, via db://table connection strings — single table or a whole batch with compare-dir
Detected patternsTruncation, null coercion, enum drift, timezone shift, float precision, encoding mismatch, dedup failure, key mismatch, schema/column drift

Full docs, flags, and source: github.com/tracelore/wherefore

Performance

Measured directly (wall-clock, real CLI runs) on a MacBook Pro (Apple M5 Max) — see PERFORMANCE.md for full methodology, more tiers, and database/S3 results.

Rows comparedCSVParquet
10,0000.48s1.59s
100,0000.60s0.53s
500,0001.33s0.93s
1,000,0002.26s1.46s

Get it

pip install wherefore  or  brew install tracelore/wherefore/wherefore

github.com/tracelore/wherefore