The issue to look for
Blank stock can mean unknown, not sold out. A broad falsy-value filter can silently delete both zero-quantity rows and rows that need supplier clarification.
What this check can tell you
The fixture enables removeZeroStock and proves that only the numeric-zero row disappears. The blank row remains and is counted as an invalid quantity.
A transparent review
- Run the file with the default filter disabled and retain all three records.
- Enable removeZeroStock and compare the two retained records with the original.
- Inspect the unknown-stock finding separately from the zero-stock count.
- Use a separate source-confirmed rule for blanks rather than interpreting them as unavailable.
How to read the result
- Quantity validation accepts non-negative whole-number text. Zero is a valid quantity, whereas an empty field is invalid/unknown. The removal option tests for numeric zero specifically.
- Summary counts describe the analyzed input as well as removals: totalRows remains three, zeroStockRows is one, removedRows is one, and retainedRows is two. A successful parse does not establish that current availability is fresh.
Limits to keep in view
- Filtering is off by default and changes exported row counts.
- The tool does not fetch live stock or interpret supplier allocation rules.
- Missing quantity columns are reported separately rather than assumed to contain zeros.
Synthetic fixture: synthetic-zero-stock.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,Qty,Cost STOCK-0,0,3.00 STOCK-4,4,3.00 STOCK-UNKNOWN,,3.00
Output
{
"checks": {
"totalRows": 3,
"retainedRows": 2,
"removedRows": 1,
"zeroStockRows": 1,
"invalidQuantities": 1
},
"cleanedRows": [
{
"SKU": "STOCK-4",
"Qty": "4",
"Cost": "3.00"
},
{
"SKU": "STOCK-UNKNOWN",
"Qty": "",
"Cost": "3.00"
}
]
}Observation: With removeZeroStock enabled, only the numeric-zero row is removed. Blank stock is invalid/unknown, not zero, and remains.
Download synthetic fixture