A PipelineResult is what Pipeline.run() returns. It collects everything a run produced: the interrogated validation for each boundary, the transformed data, and pass/fail properties for a quick go/no-go decision. Keeping all of it in one object means the code that runs a pipeline can decide what to do next (publish the output, stop the job, or alert someone) and still have the full reports at hand to explain the decision.
The interrogated Validate object for the source boundary, or None if the pipeline has no source contract. Display it to see the validation report, or use any of its methods (e.g., get_step_report() or get_data_extracts()) to dig into failures.
target_validation:Validate | None
The interrogated Validate object for the target boundary. It’s None if the pipeline has no target contract, or if the run stopped after a failing source validation (with short_circuit=True).
transform_output:Any
The table returned by the transformation function, or None if the run stopped before the transformation was called. This is the data to publish when the result passes.
Passing And Failing
The passed, source_passed, and target_passed properties give a boolean verdict. A boundary passes when every test unit in every step passes (the same test as Validate.all_passed()), so thresholds don’t affect it. A boundary that wasn’t validated counts as passing. That covers a pipeline without that contract, and also a target that was skipped because the source failed: in that case target_passed is True, but passed is still False because of the source. For a verdict based on threshold levels instead, use the validations directly, for example with above_threshold().
Examples
Let’s run a small pipeline that turns raw temperature readings in Fahrenheit into Celsius. The source contract requires a station for every reading, and the target contract requires temperatures in a plausible range.
For a plain-text summary of both boundaries, suitable for a log or a notification, use get_report():
print(result.get_report())
Pipeline Boundary Validation Results
========================================
Source Boundary: PASSED
------------------------------
Steps: 1
Test units passed: 3
Test units failed: 0
Target Boundary: PASSED
------------------------------
Steps: 1
Test units passed: 3
Test units failed: 0
Overall: PASSED
The full validation report for either boundary is in source_validation or target_validation:
result.target_validation
Pointblank Validation
Pipeline: readings [target]
Polarsreadings
STEP
COLUMNS
VALUES
TBL
EVAL
UNITS
PASS
FAIL
W
E
C
EXT
#4CA64C
1
col_vals_between()
temp_c
[-60, 60]
✓
3
3 1.00
0 0.00
—
—
—
—
All three converted readings pass the target’s single step, which is why passed is True. When a run fails, these reports show which steps failed and on which rows, and get_data_extracts() pulls out the failing rows themselves.
This is True only when both source_passed and target_passed are True, meaning that every test unit at each validated boundary passed. A run that stopped early because the source failed is False. Thresholds don’t affect it, so a single failing test unit is enough to make it False.
source_passed
Whether the source boundary validation passed.
source_passed:bool
This is True when every test unit in the source validation passed, or when the pipeline has no source contract. Thresholds don’t affect it.
target_passed
Whether the target boundary validation passed.
target_passed:bool
This is True when every test unit in the target validation passed. It’s also True when the target wasn’t validated, either because the pipeline has no target contract or because the run stopped after a failing source validation. Check passed for the overall outcome.
This method returns a short text summary of the run: for each boundary that was validated, whether it passed, the number of validation steps, and the total numbers of passing and failing test units, followed by the overall outcome. A boundary that wasn’t validated is left out. Text works well where an HTML report doesn’t, such as a log file, a terminal, a chat notification, or the description of a failed job. For the full report of a boundary, display the result’s source_validation or target_validation attribute instead.
Returns
str
A multi-line summary. Use print() to display it.
Examples
Let’s run a pipeline whose target contract catches a mistake in the transformation: it should keep only active accounts, but the filter was left out.
Contract 'active_accounts' (target) violated: validation has failing steps.
Pipeline Boundary Validation Results
========================================
Source Boundary: PASSED
------------------------------
Steps: 1
Test units passed: 4
Test units failed: 0
Target Boundary: FAILED
------------------------------
Steps: 1
Test units passed: 2
Test units failed: 2
Overall: FAILED
The source boundary passed with all four test units. The target boundary failed with two failing test units, one for each closed account, so the run failed overall.