3 Define your contracts
# contracts/orders.yaml
apiVersion: datavow/v1
kind: DataContract
metadata:
name: orders
domain: sales
owner: data-team@company.com
schema:
fields:
- name: order_id
type: integer
required: true
unique: true
- name: total_amount
type: decimal
min: 0
quality:
rules:
- name: no_negative_totals
type: sql
query: "SELECT COUNT(*) FROM {table} WHERE total_amount < 0"
threshold: 0
severity: CRITICAL
4 Sync to dbt New
$ datavow dbt sync --contracts contracts/ --dbt-project . --clean
DataVow dbt sync — syncing contracts to dbt project
✓ products: 2 SQL + 7 generic test(s)
✓ customers: 1 SQL + 7 generic test(s)
✓ orders: 4 SQL + 7 generic test(s)
Done: 7 singular test(s) + 21 generic test(s) generated
Contracts become dbt tests automatically. One source of truth — write the contract, tests follow. Then run dbt test --select tag:datavow as usual.
⚡ Automate with GitHub Actions New
# .github/workflows/data-contracts.yml
name: Data Contract Validation
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ludovicschmetz-stack/datavow-action@v1
with:
contracts: contracts/
# Validates all contracts, uploads HTML reports as artifacts
# Exit code 1 if any Vow is Broken or Shattered
The GitHub Action validates every contract on push/PR, generates HTML reports, uploads them as artifacts, and blocks the merge if any contract fails.
DataVow running in GitHub Actions — reports uploaded, pipeline blocked on failures