Veridelta
Veridelta compares two datasets on their primary keys and reports every row that differs under the rules you declare. Nothing is forgiven unless a rule says so, and the exit code tells CI whether the datasets match. Use it to verify a migration, a pipeline change, or a model's new evaluation run, on a laptop, in CI, or inside a warehouse.
It runs on Polars. Read the documentation.
Features
- Declared rules. Tolerances, null sentinels, regular expressions, value maps, date parsing, casts, and fuzzy text matching apply in nine fixed stages. Nothing is forgiven unless a rule says so, and
strict_typesfails a column whose type drifts. - Comparison inside the warehouse. Two tables in Snowflake, Databricks, or BigQuery are compared where they are stored, as are two Postgres or DuckDB tables that set
pushdown. The rules compile to SQL, and only counts and keys come back. Pushdown lists the exceptions and the services the SQL has run in. - Many sources. CSV, Parquet, JSON, NDJSON, Arrow, Avro, and Excel files, Delta Lake and Iceberg tables, DuckDB files and MotherDuck databases, and Postgres, MySQL, SQL Server, Oracle, SQLite, and other databases. Files and tables are scanned lazily where Polars can.
- Built for CI. Exit codes, a JSON summary, a standalone HTML report, a Markdown summary for pull requests, OpenTelemetry metrics, and files of the rows that differ. A GitHub Action posts the summary on each pull request, and a GitLab CI template on each merge request when it has a token.
- Checks before a run.
veridelta validatereports what would stop a run without reading any rows, and a JSON Schema gives editors completion for configuration files. - For AI agents. An agent runs the same checks and comparisons through the command line, or through
veridelta mcp, a Model Context Protocol server that reads files only from the folders you name. AI agents gives the steps.
Install
uv add veridelta # or: pip install veridelta
uv add 'veridelta[snowflake]' # extras: snowflake, databricks, bigquery, delta, iceberg, database, duckdb, excel, fuzzy, mcp, all
Quick start
The smallest configuration names the two files and the keys that pair their rows. The suffix of each path says what format it is:
# veridelta.yaml
primary_keys: [id]
source:
path: legacy.csv
target:
path: modern.csv
The recording above runs this file on two three-row files. validate checks the file without reading any rows, and run compares the two files. It exits 0 when they match, 1 when rows differ, and 3 when the run could not finish:
veridelta validate -c veridelta.yaml
veridelta run -c veridelta.yaml
Rules say what counts as a match, column by column. This file forgives one percent on a total and compares phone numbers on their digits alone:
primary_keys: ["transaction_id"]
source:
path: "legacy.parquet"
target:
path: "modern.parquet"
rules:
- column_names: ["grand_total"]
relative_tolerance: 0.01
- column_names: ["contact_number"]
regex_replace: {"[^0-9]": ""}
In Python, DiffEngine compares two LazyFrames with the same models:
import polars as pl
from veridelta import DiffConfig, DiffEngine, DiffRule
result = DiffEngine(
DiffConfig(
primary_keys=["user_id"],
rules=[DiffRule(pattern="^AMT_.*", absolute_tolerance=0.05)],
),
pl.scan_parquet("legacy.parquet"),
pl.scan_parquet("modern.parquet"),
).run()
if not result.summary.is_match:
raise SystemExit(f"{result.summary.changed_count} rows differ")
Documentation
- Tutorials: five notebooks, from a first comparison in Python to a CI pipeline.
- User guide: configuration, sources, rules, pushdown, results, the command line, and AI agents.
- CI integrations: the GitHub Action and the GitLab CI template.
- API reference: the public Python interface.
- Roadmap: work that is not built yet.
Accessibility
ACCESSIBILITY.md states what Veridelta aims for, the barriers known today, and how to report one.
Contributing
See CONTRIBUTING.md for the development setup and the checks a change must pass.
License
Apache 2.0.
Metadata
Release files for veridelta 0.27.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| veridelta-0.27.0.tar.gz | 882.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| veridelta-0.27.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.0 MB
Release files / veridelta-0.27.0.tar.gz
| Download URL | veridelta-0.27.0.tar.gz |
|---|---|
| Size | 882.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cb38e1ffef4b93a0d3651b59e4df56dd59aff7704e37ff0336f3cd112c9141a
|
|
BLAKE2b-256 checksum How to use checksums |
01d48f05cbe9fdda89ffd173ec4ec443220d309f78f88b25e1cb00378b039151
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / veridelta-0.27.0-py3-none-any.whl
| Download URL | veridelta-0.27.0-py3-none-any.whl |
|---|---|
| Size | 148.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
955c6f6c7c5e8b2f1f214e633e9dc01aa58ff3aab8d7351e8d2815aa4293d821
|
|
BLAKE2b-256 checksum How to use checksums |
4b530987406ea2f8c736d56934d9ac8e228032ea6978ef6004f68f33e13ce161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|