pipeverify

v0.3.4
io.github.akshaysharma1088/pipeverify Checked 1 hour ago Published 11 days ago

Read-only check that a pipeline change left the data right: pass, review or block.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

compare_tables

Compare one table before and after a pipeline change and say whether the change harmed the data. It looks for the damage that a green job and passing tests miss: rows lost or duplicated (a join that fans out, a dedupe that drops too much), keys that disappeared, values that changed in columns the change was not meant to touch, a jump in nulls, a shifted total (a unit or currency change), new or vanished categories, and schema or type changes. Use this after you edit a SQL query, dbt model, Spark job or load, or after an agent applies a fix, and before you report the w…

ParameterTypeDescription
after *The same table after the change (for example the pull request's build). Same forms as 'before'.
before *The table as it was before the change (for example production, or yesterday's snapshot). A file path (.csv, .parquet, .json, .xlsx; CSV and JSON may be .gz or .zst), 'duckdb:<file.db>:<table or SELECT…
expect_changeColumns this change is meant to modify. Differences in them are reported as expected instead of flagged. Omit when the change should not alter any existing value.
expect_row_changebooleanSet true when the change is meant to add or remove rows, so a row-count change alone is not flagged.
ignoreColumns to skip because they always differ, such as load timestamps or run ids.
keyColumn or columns that together identify one row, for example ["order_id"] or ["store_id", "sale_date"]. Without a key only table-level checks run (row counts, schema, null rates, totals), so give one…
nameName to show for the table in the report, for example gold.daily_sales. Defaults to 'table'.
thresholdsOptional overrides for when a difference becomes review or block, in percent of rows, for example {"row_change_block_pct": 20, "sum_shift_review_pct": 1}. Omit to use the defaults.

check_against_source

Check an output table against the raw source it was built from, when there is no "before" to compare. It catches a transformation that looks clean but decided something it had no basis for: the source sent two different amounts for one key and the output kept one without saying so, values that no longer match the source, source rows that never arrived, or output rows with no source at all. Use this for a new table, a first load, or a dedupe or repair step, where compare_tables has nothing to compare with. Use compare_tables when you do have the table from before the chang…

ParameterTypeDescription
key *arrayColumn or columns that identify one row in the output, for example ["txn_id"].
source *The raw input the output was built from (for example the bronze table or landing file). Same forms as 'table'.
table *The output table to check (for example a silver or gold table). A file path (.csv, .parquet, .json, .xlsx; CSV and JSON may be .gz or .zst), 'duckdb:<file.db>:<table or SELECT>', 'snowflake:<DB.SCHEMA…
checksWhich checks to run, from: conflict (the source has conflicting values for a key and the output silently kept one), mismatch (an output value differs from its source value), missing (a source key is a…
columnsColumns to compare, as {output column: source column}, for example {"amount": "amt"}. Needed for the conflict and mismatch checks; omit to check only keys.
nameName to show for the table in the report. Defaults to 'table'.
source_keyThe key column or columns in the source, in the same order as 'key', when they are named differently. Omit if the names match.
whereSQL filter for the source rows that should reach the output, for example "status <> 'test'". Omit when every source row should.

run_config

Check every table listed in a project's pipeverify.yml and return one overall verdict. Use this when the project already has a pipeverify config, which is the same check its CI runs, so you see what the pull request check will say before you push. Use compare_tables for a one-off comparison of two snapshots without a config file. Behavior: read-only and repeatable. Reads the config, then reads each table's snapshots (files, DuckDB, Snowflake, dbt models or SQL databases, using credentials already configured on this machine) into a temporary in-memory DuckDB. Nothing i…

ParameterTypeDescription
configstringPath to a pipeverify config file, usually pipeverify.yml in the project root. It lists each table with its before, after, key and options.
tablesOnly check the tables with these names (the 'name' entries in the config). Omit to check every table.