CLI tool for dbt data validation workflows
Project description
Data Validation Tool (dvt)
CLI tool for dbt data validation workflows. Born from the scripts folder of dbt-audit-helper-ext, this tool consolidates validation utilities into a proper Python package.
Table of Contents
Installation
pip install data-validation-tool
Or with uv:
uv pip install data-validation-tool
Quick Start
# Generate validation macros for your dbt models
dvt init --models-dir models/03_mart
# Run validations
dvt run --models-dir models/03_mart --type all
# Generate dbt Cloud job configurations
export DBT_CLOUD_ACCOUNT_ID=12345
export DBT_CLOUD_PROJECT_ID=67890
export DBT_CLOUD_ENVIRONMENT_ID=11111
dvt cloud --models-dir models/03_mart
Commands
dvt init
Generate validation macros for dbt models. Scans your models directory and creates validation macro files compatible with dbt-audit-helper-ext.
dvt init [OPTIONS]
Options:
-d, --models-dir PATH Directory containing dbt models (default: models/03_mart)
-m, --model TEXT Specific model name to generate macros for
-o, --output-dir PATH Output directory for generated macros (default: macros/validation)
--help Show this message and exit
dvt run
Execute validation processes. Runs dbt models and executes validation macros to compare source and target data.
dvt run [OPTIONS]
Options:
-d, --models-dir PATH Directory containing dbt models (default: models/03_mart)
-m, --model TEXT Specific model name to validate
-t, --type TYPE Validation type: all, count, schema, all_row, all_col (default: all)
-p, --audit-date TEXT Audit helper date for cloning from legacy data
-r, --skip-run Skip model runs, validate only
-v, --run-only Run models only, skip validation
--help Show this message and exit
dvt cloud
Generate dbt Cloud job configurations as YAML. Creates files compatible with dbt-jobs-as-code.
dvt cloud [OPTIONS]
Options:
-d, --models-dir PATH Directory containing dbt models (default: models/03_mart)
-m, --model TEXT Specific model name to create job for
-o, --output PATH Output path for jobs YAML (default: dataops/dbt_cloud_jobs.yml)
--account-id TEXT dbt Cloud account ID (or set DBT_CLOUD_ACCOUNT_ID) [required]
--project-id TEXT dbt Cloud project ID (or set DBT_CLOUD_PROJECT_ID) [required]
--environment-id TEXT dbt Cloud environment ID (or set DBT_CLOUD_ENVIRONMENT_ID) [required]
--help Show this message and exit
Development
Clone the repository and install development dependencies:
git clone https://github.com/infinitelambda/data-validation-tool.git
cd data-validation-tool
uv sync --all-extras
Run tests with coverage:
uv run pytest
Format and lint code:
uv run ruff format .
uv run ruff check .
License
Apache License 2.0 - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file data_validation_tool-0.1.0.tar.gz.
File metadata
- Download URL: data_validation_tool-0.1.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae62184c3ddcc694301b5fb1eab7d78ee5c02cabad8e7cd94ab68af40c97b1ce
|
|
| MD5 |
dc7fcb1e444f2052d7599db71d53b2e0
|
|
| BLAKE2b-256 |
f1ff98d0d69df4685d71cf247a78b6de52be5a9703c5942d7b2d7a929c91229c
|
Provenance
The following attestation bundles were made for data_validation_tool-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on il-dat/dvt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_validation_tool-0.1.0.tar.gz -
Subject digest:
ae62184c3ddcc694301b5fb1eab7d78ee5c02cabad8e7cd94ab68af40c97b1ce - Sigstore transparency entry: 804394147
- Sigstore integration time:
-
Permalink:
il-dat/dvt@d863a4d304a5a0fb813d46f2fb546988234daf19 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/il-dat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@d863a4d304a5a0fb813d46f2fb546988234daf19 -
Trigger Event:
push
-
Statement type:
File details
Details for the file data_validation_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: data_validation_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d15c579596c3cfd03c675cd2859771ecf54d700d2ae11ae75cfadcb5ffbd20b
|
|
| MD5 |
9904ce1c4f99f760c8dd7b45c7b854c8
|
|
| BLAKE2b-256 |
6986fab6a9f0f39eda31ad58e65322089deb05289f0cff0ff7bb6fe475d575ea
|
Provenance
The following attestation bundles were made for data_validation_tool-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on il-dat/dvt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_validation_tool-0.1.0-py3-none-any.whl -
Subject digest:
9d15c579596c3cfd03c675cd2859771ecf54d700d2ae11ae75cfadcb5ffbd20b - Sigstore transparency entry: 804394148
- Sigstore integration time:
-
Permalink:
il-dat/dvt@d863a4d304a5a0fb813d46f2fb546988234daf19 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/il-dat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@d863a4d304a5a0fb813d46f2fb546988234daf19 -
Trigger Event:
push
-
Statement type: