Validating Data Files Before You Import Them
By SyncBuilder
Many integrations start from a file drop. A CSV, JSON or XML file lands in a folder, an inbox or an endpoint, and something imports it. It is a simple pattern that works well until the day a single malformed file arrives and quietly breaks the whole flow.
Check the file at the door
The fix is to validate the file before you process it, not after a failed run. Checking structure at the door means a bad file is rejected up front with a clear reason, instead of being discovered halfway through an import when half your records are already written.
What to validate per format
- JSON must parse cleanly and have the shape you expect, with the fields and nesting your integration reads.
- XML must be well-formed, with every tag opened and closed and a single root element.
- CSV must have a consistent number of columns on every row and a real header row, not data in the first line.
- The character encoding should be UTF-8, so accented characters and symbols are not mangled downstream.
- The delimiter should be exactly what you expect, whether that is a comma, a semicolon or a tab.
Validate before importing, not after. Catching a bad file at the door is far cheaper than debugging a half-finished import and cleaning up the records it already wrote.
Previewing the file first catches the usual culprits: a wrong delimiter, a missing header, an unexpected encoding, or extra and missing columns. Our free File Inspector previews and validates CSV, JSON and XML files entirely in your browser, so nothing is uploaded.
Try the free tool