CSV import audit: what a duplicate checker cannot decide

A CSV validator can detect repeated rows and empty cells. It cannot tell whether two invoices with the same identifier are legitimate updates, duplicates, or corrections without business rules.

Reproduce the synthetic CSV audit and JSON findings.

A reproducible CSV fixture

This synthetic fixture contains four data rows. It has one exact duplicate record, but invoice_id A1 appears three times. One email is blank. Those are three different findings.

invoice_id,customer,email,amount
A1,Ada,ada@example.test,19.00
A1,Ada,ada@example.test,19.00
A1,Ada,ada+revised@example.test,19.00
A2,Grace,,10.00

Download the synthetic CSV example

1. Separate three failure modes

Exact duplicate rows: all column values match, byte-for-byte after CSV decoding. Here the first two A1 rows are duplicates.

Duplicate keys: a supposedly unique identifier occurs more than once. A1 occurs three times, including a revised email. Whether that is invalid depends on the import contract.

Missing required values: Grace's email is blank. If email is optional, it is not a failure; if required, it blocks the import.

2. Check CSV parsing before counting

Choose the correct delimiter (comma, semicolon, tab or pipe). Quoted commas and line breaks can be legitimate field values. A trailing empty value still represents a column. Mismatched row widths may signal a broken export or a wrong separator.

3. Make the rule explicit before deleting anything

Write down the unique key, required fields, allowed amount ranges, and how updates should be handled. If invoice_id must be unique, inspect all three A1 rows. Do not automatically discard the third row merely because its ID repeats; it may contain a correction that needs reconciliation.

4. Keep evidence and a reversible workflow

  1. Save a read-only copy of the original export.
  2. Run structure and completeness checks on a sample.
  3. Classify issues as errors, warnings or expected values.
  4. Resolve duplicates using the documented business rule, not a guess.
  5. Run the corrected import on a test destination and reconcile row counts and totals before production.

5. Understand the limits

The free local tool counts exact duplicates, blank cells, whitespace and inconsistent row lengths. It does not certify numeric correctness, decide unique keys, or infer financial rules. Schema-based validation should be reviewed against explicit acceptance criteria.

Try and continue

Run the free browser-side CSV quality check

Review the schema-based Data Quality Checker ZIP · 490 Stars

Open the product in Telegram

Explore specialist data-analysis toolkits

Synthetic example only. It contains no customer information and is not an estimate of commercial outcomes.