Data Schema Validation: Your First Gate on Any Export
RedHub AI Editorialupdated October 7, 20266 min read

Jump to a section6
Before any tool reads a single value, data schema validation asks whether the file matches the shape you agreed on: these columns, these types, no more than this many blanks. It is a comparison between a file and a written description of what the file should look like. That description is the schema, and how well you write it sets how much a pass is worth.
TL;DR: A schema names each column, its type, whether it is required, and how many blanks it may hold. Validation checks the file against that list before anything else runs. It answers "can this be processed?" and says nothing about whether a value is true. The CSV / Data-Export Schema & Quality Gate ($69) does this with a small JSON schema and returns READY, FIX or BLOCK. The wider picture is in the CSV data quality guide.
What a schema says
A schema is short. For the gate it is a JSON file with one entry per column, and each entry says four things:
- The column's name
- Its type: text, integer, decimal, date, email, or a fixed list of allowed words
- Whether the column is required
- The largest share of blanks you will accept
The sample schema that ships with the gate shows the range. order_id is an integer, required, with no blanks allowed. status is optional, may be up to 10% blank, and must be one of four words: new, paid, shipped or refunded. notes is free text and may be half empty.
Dates are the strict one. The date type means YYYY-MM-DD. A cell that reads 05/03/2026 counts as a mismatch, even though a person reads it as a date at a glance.
Three layers, three questions
Checks on a data file stack in a fixed order, and each layer asks something different.
- Schema validation asks about shape. Do the rows line up under the right headers, and does each column hold the kind of thing it should?
- Record-level validation asks about values. Is this total the sum of its parts? Is this code on the allowed list for this customer?
- Cross-system reconciliation asks about agreement. Does this file say the same thing as the other systems that describe the same orders?
Run them out of order and the later layers misreport. A record check on a shifted file will reject an email address that is really a phone number that slid over one column. The report says "bad email." The fault is a stray comma four fields to the left.
Types sit on the border
It is common to list type alongside headers and row width as "structure." The gate does not treat them the same way.
A ragged row is a structural failure. The file no longer lines up, so the verdict is BLOCK, even when every column scores 100. A wrong type is different. The file still lines up. One column holds a value it should not. So the gate grades it: the column reads DIRTY and the file reads FIX.
Whether you load a FIX file is your call, and the honest answer depends on the destination. If it rejects a bad row and tells you, loading and cleaning up afterward may be fine. If it stores an unreadable date as an empty field and says nothing, treat FIX as a stop.
The schema is a second thing to keep current
A schema is a promise about what the source system sends. Source systems change, and the gate reacts differently to each kind of change:
- A required column renamed at the source reads as missing. The file is BLOCK, though every value in it is fine. From the import's side that is correct: it cannot find the column either.
- An optional column that disappears is skipped. The report shows it as absent, and the file can still be READY. If its absence should stop the file, mark it required.
- A new column the schema has never heard of passes without comment. The gate checks the columns you listed. It does not complain about extras.
So a schema catches what goes missing and stays quiet about what gets added. Someone has to own the file and update it when the source changes on purpose. A schema nobody maintains ends one of two ways: it blocks good files until people stop trusting it, or it gets loosened until it passes everything.
There is no setting that removes this cost. A strict schema is more work and catches more. A loose one is less work and tells you less each time it passes.
A schema you can read, and a verdict you can act on
The CSV / Data-Export Schema & Quality Gate checks a file against an editable JSON schema: seven structural checks that each force BLOCK, a 0 to 100 quality score per column, and one file verdict, READY, FIX or BLOCK. It ships a runnable Python engine, a workbook that reproduces the scoring, a Schema Authoring Playbook and a Fix-It Runbook. Deterministic and offline. It grades the file and never changes it.
Get the CSV / Data-Export Schema & Quality Gate — $69Pairs well with
The record-level layer is the Document Field Validator ($79), which runs each record against a rule pack and returns PASS, REVIEW or REJECT; a critical-rule failure rejects the record however many soft rules pass. The agreement layer is the Multi-Source Data Reconciliation Engine ($89), which reconciles three or more sources on one match key and rolls them up to RECONCILED, FIX or NOT RECONCILED. If the export feeds a spreadsheet model, the Spreadsheet Formula & Model Integrity Auditor ($69) reads the .xlsx and grades the formulas, not the values.
More in this guide
What is data schema validation?
It is checking a file against a written description of its expected shape: which columns it has, what type each holds, which are required, and how many blanks each may contain. It runs before any check on the values themselves.
What goes in a schema?
One entry per column: a name, a type, whether it is required, and the largest share of blanks you accept. For a column with a fixed set of values, such as an order status, the entry also lists the allowed words.
Why run schema validation before record-level checks?
Record-level checks assume each value is in the right column. If a row has shifted, a later check will blame a value that is fine and miss the cause, which is the row's shape.
Is a wrong type a structural failure?
Not in the CSV / Data-Export Schema & Quality Gate. A type mismatch leaves the file aligned, so the column reads DIRTY and the file reads FIX. A ragged row, a bad header or a missing required column is structural and forces BLOCK.
Does schema validation catch a new column added at the source?
Not on its own. The gate checks the columns named in your schema and does not flag extras. It does catch a required column that was renamed or removed, because that column now reads as missing.
How strict should a schema be?
Strict enough that a pass tells you something. If every column is typed as text, nothing can fail. Start with the required columns, real types for IDs, amounts and dates, and a blank allowance per column. Tighten it as you learn what the source sends.


The gate this post refers to, drawn from the tool’s own logic. See the tool.