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 realising 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

How ContractHQ Fits In

ContractHQ sits at the intersection of your data producers and consumers. It gives you a central registry to author contracts in YAML, validate them against live schemas, and surface violations directly in your CI/CD pipeline — long before bad data reaches a dashboard.

✍️

Author

Write contracts in a simple, human-readable YAML format.

🔍

Validate

Run checks against your warehouse on every pull request.

🚀

Enforce

Block merges automatically when a contract is violated.

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