v2.0 Documentation

Introduction to ContractHQ

Welcome to the official documentation for ContractHQ. Learn how to design, enforce, and govern data contracts across your entire data platform to prevent downstream breakages.


Why Data Contracts?

In modern data stacks, producers (software engineers) often modify database schemas without realizing the impact on consumers (data scientists, analysts). A data contract is a formal agreement between data producers and consumers that explicitly defines the schema, semantics, and quality bar for the data being generated.

Key Benefits

  • Prevent silent data failures in production
  • Establish clear ownership of datasets
  • Automatically block PRs that break schema contracts
  • Provide self-serve discoverability for data consumers

Basic Example

A contract is defined in a simple YAML configuration file that lives alongside your application code.

events_contract.yaml
dataset: user_signups
owner: auth-team@company.com
version: 1.0.0
schema:
  - name: user_id
    type: uuid
    constraints:
      - unique: true
      - not_null: true
  - name: email
    type: string
    pii: true