ODCS Data Contract Generator

Generate an Open Data Contract Standard (ODCS) v3 YAML file from a CSV, Excel, JSON or Parquet file. Edit the rules, then download. Free, in your browser.

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

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

How to use the ODCS Data Contract Generator

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: customers.csv

Output: apiVersion: v3.1.0 kind: DataContract name: customers schema: - name: customers logicalType: object

Browse by topic

Who uses Data Utility

Frequently asked questions · Data format benchmark

Frequently asked questions

Which ODCS version does it write?

ODCS v3.1.0. It uses standard fields such as logicalType, required, unique, logicalTypeOptions and quality rules with the invalidValues, duplicateValues and rowCount metrics.

Can it read a contract I wrote by hand?

Yes, in the Validate tab. Rules it can run are checked. Rules it cannot run, such as SQL checks, are listed as warnings.

Does it replace a full data contract platform?

No. It makes and checks a contract for one file in your browser. It does not store contracts, schedule checks or watch a warehouse.

What is a data contract?

A written agreement about what a dataset must look like, stored as a YAML file. For example: customer_id is a whole number and never empty, status is one of active, inactive or pending, and the file has at least one row.

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