PipeRider Assertions are deprecated since v0.25.0. Please replace assertions with the relevant testing methods offered by dbt tests.
Assertions are the data testing solution in PipeRider. It asserts if the profiling result fulfill a certain rule. There are two types of assertions
PipeRider assertions
DBT assertions
PipeRider Assertions
PipeRider assertion asserts the profiling result for each run
Assertion files
Assertion files are located in .piperider/assertions/
File naming convention
Assertion files are YAML files and are named according to the data source table name:
<table>.yml
If you opted to generate 'recommended assertions' by piperider generate-assertions, then assertion files will be prepended with 'recommended_':
recommended_<table>.yml
Example assertion file
The following is an except of an assertions file for a movie database table:
# Auto-generated by PipeRider based on table "movies"movies:# Table Name# Test Cases for Tabletests: - metric:row_countassert:gte:8961tags: - RECOMMENDEDcolumns:title:# Column Name# Test Cases for Columntests: - name:assert_column_schema_typeassert:schema_type:VARCHARtags: - RECOMMENDED - name:assert_column_not_nulltags: - RECOMMENDED
Profile Assertions
Profile assertions are the most common way to define an assertion. You can assert if the profiling statistic fulfill certain rule.
Assertion expressions
Description: Profiling-based assertions are assert the value of a profiling field.
Basic assertions are high level assertions to check the if a column is not null,unique. And check if the column value (rather than profiling statistic) fulfill certain rule.
PipeRider can also integrate with the dbt test result. To integrate the test result, run piperider with the --dbt-run-results option then the latest run results would be integrated in the run report.
dbtbuild#or dbt testpiperiderrun--dbt-run-results
From version 0.26.0 dbt test results are included by default and it is not neccessary to use the --dbt-run-results option.