Skip to content

ludovicschmetz-stack/datavow-dbt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

datavow-dbt

dbt package for DataVow — on-run-end hook with Vow Score reporting.

Install

Add to your packages.yml:

packages:
  - git: "https://github.com/ludovicschmetz-stack/datavow-dbt"
    revision: v1.0.0

Then:

dbt deps

Setup

Step 1: Sync contracts to dbt tests

pip install datavow
datavow dbt sync --contracts contracts/ --dbt-project .

This generates:

  • tests/datavow/*.sql — singular tests
  • tests/datavow/_<model>__datavow.yml — generic tests (not_null, unique, etc.)

Step 2: Add on-run-end hook

In your dbt_project.yml:

on-run-end:
  - "{{ datavow.datavow_summary(results) }}"

Step 3: Run

# Option A: dbt build (runs models + tests, including datavow tests)
dbt build

# Option B: dbt test only
dbt test --select tag:datavow

# Option C: full DataVow CI pipeline
datavow dbt ci --dbt-project .

After dbt build completes, the on-run-end hook displays:

╔══════════════════════════════════════════════════╗
║  DataVow — A solemn vow on your data            ║
╠══════════════════════════════════════════════════╣
║  ✅ Vow Kept — Score: 100/100                   ║
║  Passed: 12  Failed: 0  Warned: 0  Total: 12   ║
╚══════════════════════════════════════════════════╝

Configuration

In dbt_project.yml:

vars:
  # Block pipeline on test failures (default: "error")
  # Options: "error" (block on failures), "warn" (block on failures + warnings), "none" (never block)
  datavow_fail_on: "error"

How it works

  1. datavow dbt sync converts DataVow YAML contracts into dbt-native tests
  2. All generated tests are tagged with datavow
  3. dbt build or dbt test executes them in your warehouse (any adapter)
  4. The on-run-end macro collects results, computes a Vow Score, and gates the pipeline

Compatibility

Works with any dbt adapter: PostgreSQL, Snowflake, BigQuery, Redshift, DuckDB, SQL Server, Databricks, etc.

License

Apache 2.0

About

dbt package for DataVow — Vow Score on-run-end hook and pipeline blocking.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors