Introduction
Introduction
An audio editor expects an asset ID, a sponsor and a filename. The sponsor happens to have punctuation in its name. Removing the comma would change the credit. Moving the filename into a fourth column could leave the clip without its attachment. Here is a small read-only rehearsal you can do before importing the file.
Start with the three values you expect
Keep the received file unchanged. On a copy, use the header asset_id,sponsor,file. For the first record, write down the expected values separately: S12 for the ID, Bay, Studio for the full sponsor credit, and clip.wav for the filename. The surrounding quotes belong to the CSV encoding. A plain-text sponsor field in the destination should display the credit without those outer quotes.
Read four versions of the same sponsor row
These are results from a local Python CSV reader in strict mode, using a comma delimiter and straight double quotes. Each row was checked independently. The four-field record parsed successfully, so a separate width check was essential.
Fictional inputs and results from the read-only preview.
| Record in the copy | Preview | Decision |
|---|---|---|
| S12,"Bay, Studio",clip.wav | 3 fields. The middle one reads Bay, Studio. | Keep |
| S12,Bay, Studio,clip.wav | 4 fields. The filename is fourth. | Repair the sponsor field |
| S12,"Bay, ""Studio""",clip.wav | 3 fields. The middle one reads Bay, "Studio". | Keep when the credit includes quotation marks |
| S12,"Bay, Studio,clip.wav | Parser error at the end of this isolated record. | Find the missing closing quote |
Check the next record before accepting the preview
Open the copy with newline="" if you use Python, pass it to csv.reader with strict=True, and compare each parsed record’s field count with the header length. In your destination’s preview, also check that the middle field displays the full sponsor name and the last field displays the intended filename. A matching field count alone cannot detect swapped values.
In our two-record rehearsal, the first record was valid in both files. The next record used S13 and outro.wav. With the sponsor quoted, both records had three fields. Without the second pair of outer quotes, the counts were three and four. Importing after a one-row spot check would have missed the error.
Try one more row against the same header: S12,clip.wav,"Bay, Studio". The parser accepts three fields. Read them under the column names and the mistake becomes visible: the sponsor is clip.wav and the filename is Bay, Studio. Keep the import paused. Move the complete quoted sponsor field back to the middle in your copy, then preview S12,"Bay, Studio",clip.wav. Now the credit and attachment both match the handoff.
Repair the copy and keep the original credit
If the credit contains a quotation mark, write that mark twice inside the quoted field. Ask the editor to confirm the spelling when punctuation is ambiguous. A closing quote missing in the middle of a longer file can cause a reader to continue into subsequent lines. Inspect the affected record and the following one before accepting the repair.
Run the preview again on the copy and keep the destination disconnected until the header, credit and filenames agree. Once each record has the right fields, check separately whether the destination preserves identifiers such as 0042. That is a data-type decision made after parsing.
