Skip to main content

Multiple Validations

A single validation checks a single table at a single moment. Data work rarely stops there: the jobs of an ETL process each validate their own table, and a nightly job validates the same table again and again. The questions then change from “did this validation pass?” to “which tables need attention today?”, “has this step been getting worse?”, and “can the pipeline go on?”.

The MultiValidate class answers those questions. It holds a set of interrogated validations (each one is a run) and reports on all of them at once. It never interrogates anything itself, so it only needs the results, not the tables.

Collecting Validations

Let’s say that two tables, orders and payments, are validated every day. Here are three days of runs, made with a function for each table:

import pointblank as pb
import polars as pl


def check_orders(day, amounts):
    return (
        pb.Validate(
            data=pl.DataFrame({"amount": amounts}),
            tbl_name="orders",
            label=day,
            thresholds=(1, 2, 3),
        )
        .col_vals_not_null(columns="amount")
        .col_vals_gt(columns="amount", value=0)
        .interrogate()
    )


def check_payments(day, fees):
    return (
        pb.Validate(
            data=pl.DataFrame({"fee": fees}),
            tbl_name="payments",
            label=day,
            thresholds=(1, 2, 3),
        )
        .col_vals_not_null(columns="fee")
        .col_vals_between(columns="fee", left=0, right=10)
        .interrogate()
    )


runs = [
    check_orders("Monday", [12, 30, 8, 21]),
    check_payments("Monday", [1.5, 2.0, 2.5]),
    check_orders("Tuesday", [15, 22, 9, 17]),
    check_payments("Tuesday", [2.0, 12.0, 2.5]),
    check_orders("Wednesday", [14, None, -3, -8]),
    check_payments("Wednesday", [2.0, 1.5, 2.5]),
]

multi = pb.MultiValidate(*runs)
len(multi)
6

The runs are ordered by the time their interrogation ended (use order="given" to keep the order they were given in), and more can be added later with add(). A PipelineResult can be given as well, and it adds the validations of its source and target tables.

Three Kinds of Reports

The get_tabular_report() method reports on all the runs, in one of three ways. Each shows the same results from another angle.

The Long Report

The long report (the default, and what displaying multi shows) puts every run’s validation report on one page:

multi.get_tabular_report()
Pointblank Validations
RUNS
6
Health Score
88.1%
2026-11-29 19:24:04 UTC
STEPS
PASS
FAIL
Health Score
1PolarsordersMonday
2026-11-29 19:24:04 UTC
2
2
0
100%
Monday
PolarsordersWARNING1ERROR2CRITICAL3
STEP COLUMNS VALUES TBL EVAL UNITS PASS FAIL W E C EXT
#4CA64C 1
col_vals_not_null
col_vals_not_null()
amount — ✓ 4 4
1.00
0
0.00
○ ○ ○ —
#4CA64C 2
col_vals_gt
col_vals_gt()
amount 0 ✓ 4 4
1.00
0
0.00
○ ○ ○ —
2PolarspaymentsMonday
2026-11-29 19:24:04 UTC
2
2
0
100%
Monday
PolarspaymentsWARNING1ERROR2CRITICAL3
STEP COLUMNS VALUES TBL EVAL UNITS PASS FAIL W E C EXT
#4CA64C 1
col_vals_not_null
col_vals_not_null()
fee — ✓ 3 3
1.00
0
0.00
○ ○ ○ —
#4CA64C 2
col_vals_between
col_vals_between()
fee [0, 10] ✓ 3 3
1.00
0
0.00
○ ○ ○ —
3PolarsordersTuesday
2026-11-29 19:24:04 UTC
2
2
0
100%
Tuesday
PolarsordersWARNING1ERROR2CRITICAL3
STEP COLUMNS VALUES TBL EVAL UNITS PASS FAIL W E C EXT
#4CA64C 1
col_vals_not_null
col_vals_not_null()
amount — ✓ 4 4
1.00
0
0.00
○ ○ ○ —
#4CA64C 2
col_vals_gt
col_vals_gt()
amount 0 ✓ 4 4
1.00
0
0.00
○ ○ ○ —
4PolarspaymentsTuesday
2026-11-29 19:24:04 UTC
2
1
1
83.33%
WARNING
Tuesday
PolarspaymentsWARNING1ERROR2CRITICAL3
STEP COLUMNS VALUES TBL EVAL UNITS PASS FAIL W E C EXT
#4CA64C 1
col_vals_not_null
col_vals_not_null()
fee — ✓ 3 3
1.00
0
0.00
○ ○ ○ —
#AAAAAA 2
col_vals_between
col_vals_between()
fee [0, 10] ✓ 3 2
0.67
1
0.33
● ○ ○
5PolarsordersWednesday
2026-11-29 19:24:04 UTC
2
0
2
50%
CRITICAL
Wednesday
PolarsordersWARNING1ERROR2CRITICAL3
STEP COLUMNS VALUES TBL EVAL UNITS PASS FAIL W E C EXT
#AAAAAA 1
col_vals_not_null
col_vals_not_null()
amount — ✓ 4 3
0.75
1
0.25
● ○ ○
#FF3300 2
col_vals_gt
col_vals_gt()
amount 0 ✓ 4 1
0.25
3
0.75
● ● ●
6PolarspaymentsWednesday
2026-11-29 19:24:04 UTC
2
2
0
100%
Wednesday
PolarspaymentsWARNING1ERROR2CRITICAL3
STEP COLUMNS VALUES TBL EVAL UNITS PASS FAIL W E C EXT
#4CA64C 1
col_vals_not_null
col_vals_not_null()
fee — ✓ 3 3
1.00
0
0.00
○ ○ ○ —
#4CA64C 2
col_vals_between
col_vals_between()
fee [0, 10] ✓ 3 3
1.00
0
0.00
○ ○ ○ —

The overview at the top gives the number of runs, the health score of all of them, and a strip with a block for each run in its status color (clicking one goes to its run). Each run is in a section that can be opened or closed, and the line at the top of each section summarizes the run: its table, the time it ended, the number of steps that passed and failed, its health score, and the highest threshold level it reached. The sections of runs with failing steps start open, so the runs to look at are the ones already showing (expand= changes that).

The Wide Report

The wide report has a row for each validation step and a column for each run, so that a step can be followed from run to run:

multi.get_tabular_report(mode="wide")
Pointblank Validations
2026-11-29 19:24:04 UTC
STEP COLUMNS VALUES RUNS TREND CHANGE
1
orders, Monday
2026-11-29
19:24:04
2
payments, Monday
2026-11-29
19:24:04
3
orders, Tuesday
2026-11-29
19:24:04
4
payments, Tuesday
2026-11-29
19:24:04
5
orders, Wednesday
2026-11-29
19:24:04
6
payments, Wednesday
2026-11-29
19:24:04
orders
col_vals_not_null
col_vals_not_null()
amount — 1.00 1.00 0.75 ▼ 0.25
col_vals_gt
col_vals_gt()
amount 0 1.00 1.00 0.25 ▼ 0.75
payments
col_vals_not_null
col_vals_not_null()
fee — 1.00 1.00 1.00 =
col_vals_between
col_vals_between()
fee [0, 10] 1.00 0.67 1.00 ▲ 0.33

Each cell has the step’s fraction of passing test units in that run, in the step’s status color. Since the runs are of two tables, the steps of each table are a group of rows (a run of orders has no cells in the payments rows). The trend column at the end charts each step over all the runs, and the change column gives its change between its last two results. Steps are matched across the runs by a key made from what they check, so a step stays in its row even when steps are added or removed from the validation between runs.

The Summary Report

The summary report has a row for each run, with the runs that most need attention first (those that reached the critical level, then the error level, then the warning level, then those with failing test units, and last those that passed):

multi.get_tabular_report(mode="summary")
Pointblank Validations
1CRITICAL1WARNING4PASS2026-11-29 19:24:04 UTC
TABLE LABEL TIME STEPS PASS FAIL HEALTH SCORE LEVEL
#FF3300 5 Polarsorders Wednesday 2026-11-29 19:24:04 UTC 2 0 2 50% CRITICAL
#AAAAAA 4 Polarspayments Tuesday 2026-11-29 19:24:04 UTC 2 1 1 83.33% WARNING
#4CA64C 1 Polarsorders Monday 2026-11-29 19:24:04 UTC 2 2 0 100%
#4CA64C 2 Polarspayments Monday 2026-11-29 19:24:04 UTC 2 2 0 100%
#4CA64C 3 Polarsorders Tuesday 2026-11-29 19:24:04 UTC 2 2 0 100%
#4CA64C 6 Polarspayments Wednesday 2026-11-29 19:24:04 UTC 2 2 0 100%

Wednesday’s run of orders is at the top, since it reached the error level. Below the title, a tally gives the number of runs with each status.

With by="tbl_name", there’s a row for each table instead, with the values of its latest run, the number of runs, and a trend of the health scores of all of its runs:

multi.get_tabular_report(mode="summary", by="tbl_name")
Pointblank Validations
1CRITICAL1PASS2026-11-29 19:24:04 UTC
TABLE LABEL RUNS TIME STEPS PASS FAIL HEALTH SCORE TREND LEVEL
#FF3300 Polarsorders Wednesday 3 2026-11-29 19:24:04 UTC 2 0 2 50% CRITICAL
#4CA64C Polarspayments Wednesday 3 2026-11-29 19:24:04 UTC 2 2 0 100%

This is the view for a status board. One look shows that orders is failing now, and its trend shows that this is new. The payments table passed its latest run, even though it had a bad day on Tuesday.

A Verdict for the Whole Set

A pipeline often needs a yes-or-no answer about all of its runs. The roll-up methods give one:

multi.all_passed(), multi.above_threshold(level="error")
(False, True)

Not every step of every run passed, and at least one run reached the error level. The get_health_score() method gives the share of passing test units over all the runs, or for each run, table, or label with by=:

multi.get_health_score(by="tbl_name")
{'orders': 83.33, 'payments': 94.44}

To stop a pipeline, use assert_below_threshold() (or assert_passing(), for the strictest check). It raises an AssertionError that names every run and step that reached the level:

multi.assert_below_threshold(level="error")

The Results as DataFrames

The get_dataframe() method gives the results as a DataFrame, for a dashboard, a log, or an analysis of your own. By default, it has a row for each step of each run:

results = multi.get_dataframe()

results.select("run", "tbl_name", "label", "step_number", "units", "failed_n", "pass_pct")
shape: (12, 7)
runtbl_namelabelstep_numberunitsfailed_npass_pct
i64strstri64i64i64f64
1"orders""Monday"1401.0
1"orders""Monday"2401.0
2"payments""Monday"1301.0
2"payments""Monday"2301.0
3"orders""Tuesday"1401.0
…………………
4"payments""Tuesday"2310.666667
5"orders""Wednesday"1410.75
5"orders""Wednesday"2430.25
6"payments""Wednesday"1301.0
6"payments""Wednesday"2301.0

Each row also has a step_key, the key that matches a step across the runs, so grouping by it follows a step over time. With shape="wide" and shape="summary", the DataFrame has the values of the wide and summary reports instead:

multi.get_dataframe(shape="summary", by="tbl_name")
shape: (2, 10)
tbl_namerunslatest_runlabeltime_endstatusstepssteps_passedsteps_failedhealth_score
stri64i64strdatetime[μs, UTC]stri64i64i64f64
"orders"35"Wednesday"2026-11-29 19:24:04.779904 UTC"critical"20250.0
"payments"36"Wednesday"2026-11-29 19:24:04.789147 UTC"passed"220100.0

All three shapes can be Polars, Pandas, or DuckDB tables (through tbl_type=).

Results from Separate Jobs

In practice, the runs are made by separate jobs, maybe on separate machines, and reported on later. Each job writes its results to a file with write_results(), which keeps the results (and none of the data) as plain JSON:

import tempfile
from pathlib import Path

results_dir = Path(tempfile.mkdtemp()) / "results"

for k, validation in enumerate(runs, start=1):
    pb.write_results(validation, filename=f"{k:02d}_{validation.tbl_name}", path=results_dir)

A later step collects the files with from_files(), from a directory, a glob pattern, or a list of paths:

collected = pb.MultiValidate.from_files(results_dir)

collected.get_tabular_report(mode="summary", by="tbl_name", title="Daily checks")

Daily checks

1CRITICAL1PASS2026-11-29 19:24:04 UTC
TABLE LABEL RUNS TIME STEPS PASS FAIL HEALTH SCORE TREND LEVEL
#FF3300 Polarsorders Wednesday 3 2026-11-29 19:24:04 UTC 2 0 2 50% CRITICAL
#4CA64C Polarspayments Wednesday 3 2026-11-29 19:24:04 UTC 2 2 0 100%

The collected runs report just like the original ones. From the terminal, the pb report command does the same with no Python code at all (see Reporting on Many Runs), which makes it a good last step for a scheduled job or a CI workflow.

A directory of results files often holds more runs than one report needs. filter() keeps the runs with a table name, a label, or metadata (given with write_results(metadata=)), and gives a new MultiValidate object with them:

collected.filter(tbl_name="orders").get_tabular_report(mode="wide", title="Orders")

Orders

Polarsorders2026-11-29 19:24:04 UTC
STEP COLUMNS VALUES RUNS TREND CHANGE
1
Monday
2026-11-29
19:24:04
2
Tuesday
2026-11-29
19:24:04
3
Wednesday
2026-11-29
19:24:04
col_vals_not_null
col_vals_not_null()
amount — 1.00 1.00 0.75 ▼ 0.25
col_vals_gt
col_vals_gt()
amount 0 1.00 1.00 0.25 ▼ 0.75

With metadata={"env": "prod"}, for instance, only the runs written with that metadata are kept, so that the runs of a test environment stay out of a report on production.

Note

from_files() also reads the .pkl files of write_file(). Those are Python pickles, and reading one can run code that’s in it, so only read pickles you trust. Results files are safe to read from any source, and they’re the better choice for keeping the history of a validation.

Wrapping Up

A MultiValidate object turns many separate validations into one view: the long report for everything that happened, the wide report for how each step changed, and the summary report for which runs and tables need attention. The roll-up methods give a verdict for a pipeline, and get_dataframe() gives the results for anything else. With results files, the jobs that validate the data and the step that reports on them can be as far apart as needed.