The issue to look for
Splitting CSV on every comma breaks descriptions such as Bracket, small. It shifts the cost and stock fields into the wrong positions and can make otherwise valid data look malformed.
What this check can tell you
The fixture runs through the actual quote-aware parser and asserts that the comma-containing description remains one unchanged field.
A transparent review
- Use a CSV-aware export function rather than joining raw cells with commas.
- Enclose descriptions containing commas in double quotes.
- Represent a quote inside a quoted field with two quotes, following the common RFC 4180 convention.
- Run the synthetic row, verify four headers, and inspect the cost and quantity validation counts.
How to read the result
- The shared parser understands CSV quoting and rejects inconsistent post-header row widths. Do not repair a broken row by deleting every comma from descriptions: locate the unmatched quote or incorrect delimiter.
- The cleaned CSV quotes all cells and doubles embedded quotes. This supports interchange but does not force spreadsheet identifiers to remain Text or validate whether a description belongs to a particular SKU.
Limits to keep in view
- Malformed quote syntax may require re-exporting from the original system.
- This is a file-structure check, not product matching.
- Do not use a physical-line count as a record count when fields contain quoted newlines.
Illustrative sample
Synthetic fixture: synthetic-quoted-comma.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
SKU,Description,Cost,Qty QUOTE-1,"Bracket, small",4.25,8
Output
{
"checks": {
"totalRows": 1,
"invalidCosts": 0,
"invalidQuantities": 0
},
"cleanedRows": [
{
"SKU": "QUOTE-1",
"Description": "Bracket, small",
"Cost": "4.25",
"Qty": "8"
}
]
}Observation: The comma inside the quoted description stays inside one cell. The record still has four cells.
Download synthetic fixture