Why Does a CSV Note Create Extra Rows in an Import?

A supplier sends a CSV file with a notes column. Most notes are short, but one includes a line break and another contains a comma. An importer splits the file into lines and then splits each line at commas. The resulting records no longer match what the supplier exported.
The failure is not necessarily bad source data. The importer may be treating visible separators as record boundaries without accounting for quoted fields. Review the parsing contract before anyone repairs the file by deleting meaningful punctuation or joining unrelated rows.
Establish the file's dialect
RFC 4180 documents a common CSV format in which quoted fields can contain commas and line breaks, and embedded quotation marks are represented by doubled quotation marks. It is an informational document, not proof that every file labeled CSV follows exactly the same conventions.
Ask the producer which delimiter, quoting rule, encoding and header convention it uses. Record those settings with a sample export. A filename ending in .csv does not supply all the information needed to interpret the bytes reliably.
Choose a maintained parser configured for that contract. A simple split operation may be adequate for a different explicitly restricted format, but it should not be assumed to implement quoted CSV behavior.
Distinguish physical lines from logical records
A record may span multiple visible lines when a quoted note contains a line break. Counting newline characters is therefore not a dependable record count for that file. Reconcile the number of parsed records after the parser has interpreted quoting.
Similarly, a comma inside a quoted field is content rather than a separator. The parser needs enough context to know which role the character plays. Removing commas from descriptions to make an import succeed changes the data and hides the defect.
Keep the original file unchanged while investigating. Store the parsing settings and a controlled test result so a later reviewer can reproduce the interpretation.
Illustrative multiline-note test
A fictional export contains three customer-service records. One note has two paragraphs, one includes the phrase “review, then confirm,” and one includes quotation marks around a short label. All customer details are synthetic.
The expected result is three records, each with the original note preserved in its field. The reviewer compares the parsed values with an agreed human-readable reference, including line breaks and quotation marks.
The test also includes an intentionally unfinished quoted field. The importer should follow a documented failure policy rather than silently manufacturing a partial record. No production customer record should be created from that malformed test input.
Validate shape after parsing
Parsing answers where fields and records begin and end. It does not establish that a record is acceptable for the destination. Check the expected column names, field count and required values after the parser has produced a record.
Decide how to handle an unexpected column or a duplicate header. Report the finding with enough context to locate it, while avoiding unnecessary exposure of the full row in logs. Do not let a shifted column map a note into an email field or an identifier into a status.
Keep row-level rejection and whole-file rejection policies explicit. Some workflows can safely quarantine one invalid record; others require the entire delivery to remain consistent. That is a business decision beyond the quoting syntax.
Test the export path as well
If your system writes CSV files, run its output through the intended receiving parser. Verify representative fields with delimiters, line breaks and quotes. A file that looks tidy in one spreadsheet application may still fail under the receiver's configured dialect.
Use the import reconciliation checklist to compare accepted, rejected and unchanged records. Quoting tests complement that reconciliation; they do not replace identity checks or duplicate handling.
Make acceptance observable
Keep a small fixture file, the agreed dialect, expected parsed records and the outcome for malformed input. Repeat the fixture after parser upgrades or export-setting changes.
The useful acceptance statement is precise: the supported file format preserves these field values and handles these invalid cases as specified. Avoid the broader claim that the importer accepts all CSV files. That promise conceals the very format differences the review is meant to make explicit.
FutureOS is in prelaunch. Use this guide to prepare a concrete project discussion, and read the published introduction for the current project context.
Prepared with AI assistance for the FutureOS editorial series. Primary sources checked on October 23, 2026. Examples are illustrative; this article does not announce an available FutureOS feature or an independently reviewed assessment.



Comments