Dbt, Data Quality, Data Testing, Data Analytics, Data Governance.
first listed into the {% test %} block and then added in the query that will be executed. {% test acceptance_percentage_threshold(model, column_name, rule, failing_perc) %} with test_target as ( select count(case when {{ column_name }} {{ rule }} then {{ column_name }} end) / count(*) as percentage