Custom generic tests
-- custom generic test for reasonable payment amount
{% test payment_amount_reasonable(model, column_name, min_amount=0, max_amount=200) %}
with validation as (
select
{{ column_name }} as payment_amount
from {{ model }}
where {{ column_name }} < {{ min_amount }}
or {{ column_name }} > {{ max_amount }}
)
select *
from validation
{% endtest %}Create a custom generic test

