Data Contract Generator and Validator

Make a data contract from a CSV, Excel, JSON or Parquet file, then check new files against it. Saves ODCS YAML or a dbt schema.yml. Free, in your browser.

Quick answer: Write a data contract from a file, then check new files against it.

Related: ODCS Data Contract Generator · Validate a CSV Against a Schema · Test Data Guides and Free Generators

How to use the Data Contract Generator and Validator

Write a data contract from a file, then check new files against it.

The Data Contract tool writes a data contract from a sample file and checks new files against it. A data contract is a short written promise about a dataset: which columns it has, their types, which values may be empty, which must be unique, which values are allowed and how many rows to expect. The tool profiles your CSV, Excel, JSON or Parquet file, suggests rules and lets you switch each one on or off. It saves the result as an Open Data Contract Standard (ODCS) YAML file, or as a dbt schema.yml with the same rules as dbt tests. In the Validate tab you drop a new file and a contract, and see which rules pass or fail, how many rows break each rule, and example rows. Everything runs in your browser.

  1. Load a sample file
  2. Tick the rules you want and download the contract
  3. Validate a new file against it

Tips

Example

Input: orders.csv: order_id, status, unit_price

Output: kind: DataContract schema: - name: orders properties: - name: order_id logicalType: integer required: true unique: true

Browse by topic

Who uses Data Utility

Frequently asked questions · Data format benchmark

Frequently asked questions

What is a data contract?

A written promise about what a dataset must look like, stored as a YAML file: column names and types, which values may be empty, which must be unique, which values are allowed, and how many rows to expect.

How are the rules made?

The tool profiles your sample file and suggests rules. Rules that one sample can get wrong, such as value lists and ranges, start switched off, and you can switch every rule on or off.

Is my file uploaded?

No. The file is read and checked in your browser, and the contract is made there too.

Which contract format does it use?

The Open Data Contract Standard (ODCS) version 3, published at bitol.io. Other tools that read ODCS can use the file. You can also save the same rules as a dbt schema.yml.

Can I trust the rules it suggests?

Treat them as a first draft. They describe the one file you loaded, not every future file. Review them, and keep only the rules you would defend.

Related pages

Topic guides

Guides