Skip to main content

Schema-inference workflow

Generate a CSV Schema Without Misclassifying Columns

Infer a useful schema from CSV values while protecting identifiers, rare exceptions and nullable fields.

Use the matching tool

CSV Schema Generator

Open CSV Schema Generator

What the error actually means

Schema inference samples text and proposes types. A column of numeric-looking identifiers may be classified as integer, while a rare later value can contradict the inferred type. The generated schema is a draft contract that needs review.

Likely causes

  • The sample is not representative.
  • Identifiers contain only digits.
  • Null markers distort inference.
  • Dates and booleans use several conventions.

Reviewed inference

Problem

postal_code inferred as integer

Correct pattern

postal_code retained as string with expected length and null policy

A safe repair workflow

  1. 1Profile the complete file or a representative sample.
  2. 2Review every inferred identifier and date.
  3. 3Add nullability and constraints deliberately.
  4. 4Validate the schema against later files.

How to verify the result

A file that downloads successfully is not automatically a correct file. Check the result at both the structural and business-data levels:

  • Rare valid values pass.
  • Identifiers retain formatting.
  • Nullability matches reality.
  • Schema changes are versioned.

Read the deeper guides