The issue to look for
A repeated identifier can represent an accidental duplicate, different pack quantities, alternate supplier SKUs or a source-data mistake. Automatically deleting every repeat can discard useful context.
What this check can tell you
The fixture reports one repeated occurrence but retains two rows. It explicitly separates detection from deduplication or product-equivalence claims.
A transparent review
- Run the two-row synthetic file and compare DUP-A with DUP-B.
- Confirm duplicateRows is one while retainedRows is two.
- Inspect supplier SKU, pack/unit fields and original source records before choosing a merge rule.
- Keep an audit copy of any rows you remove outside the cleaner.
How to read the result
- The analyzer builds a repeat key from normalized UPC when present, otherwise from the trimmed source MPN or SKU. It does not combine prices, sum stock or pick a preferred row. Compare quantities independently before deciding whether the two records describe the same inventory.
- Because key selection is separate from displayed MPN whitespace cleanup, do not assume every visually similar part number is consolidated. The report is a review prompt, not a master-data reconciliation service.
Limits to keep in view
- Rows are retained by default, including repeats.
- A shared UPC does not prove identical pack or inventory ownership.
- A checksum result does not resolve a duplicate's business meaning.
Synthetic fixture: synthetic-duplicates.csv
This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.
Input
UPC,SKU,Qty 012345678905,DUP-A,2 012345678905,DUP-B,5
Output
{
"checks": {
"totalRows": 2,
"duplicateRows": 1,
"retainedRows": 2,
"removedRows": 0
},
"cleanedRows": [
{
"UPC": "012345678905",
"SKU": "DUP-A",
"Qty": "2"
},
{
"UPC": "012345678905",
"SKU": "DUP-B",
"Qty": "5"
}
]
}Observation: The second occurrence is flagged as a duplicate identifier. Both supplier rows remain in the cleaned result for review.
Download synthetic fixture