Enterprise Document IntelligenceCase studies← Back to the case
Table diff · v1 vs v2

Portfolio version diff (v1 vs v2)

Three-layer diff between two versions of the same 600-row claims table.

v1 comes from the vol2_sql_agent generator (SEED=20260701). v2 = v1 with a fixed edit set (5 drops, 3 adds, 1 amount bump, 1 column rename). Deterministic on every run.

INPUT — what we fed the pipeline

v1 shape
600 rows × 12 cols
v2 shape
598 rows × 12 cols
key_cols
['claim_id'] (primary key for row alignment)
edits
drop CLM-00001..05 · add CLM-00601..03 · bump CLM-00100 payment +10% · rename covid_flag → covid_flag_type

PROCESSING — what the pipeline does

  1. table_diff(v1, v2, key_cols=['claim_id']) → TableDiff
  2. align_columns : header similarity (SequenceMatcher, threshold 0.80) → schema layer
  3. diff_rows : left/right join on claim_id → added / removed / changed / same
  4. analyze_column : dtype, null rate, distinct count, numeric stats per shared column

OUTPUT — what came back

Schema changes
1 non-same
Row summary
{'added': 3, 'removed': 5, 'changed': 1, 'same': 595}
Column analyses
12
renamed   'covid_flag' → 'covid_flag_type'

VERDICT — assertions

10 PASS out of 10
PASSSchema : 1 renamed column
PASSSchema : rename covid_flag -> covid_flag_type
PASSSchema : 0 added, 0 removed columns
PASSRow : v1 = 600 rows
PASSRow : v2 = 598 rows (600 - 5 + 3)
PASSRow : 5 removed
PASSRow : 3 added
PASSRow : exactly 1 changed
PASSColumn analyses count = shared count
PASSpayment_amount reports non-zero disagreement in numeric stats

Angela Shi · medium.com/@angela.shi

Static demonstration (frozen data), not the live tool. For a tool on your own documents, contact us. · Case studies