replace custom generic test with standard range between one
This commit is contained in:
parent
4cf74db49a
commit
6434c5c88d
2 changed files with 4 additions and 11 deletions
|
|
@ -1,10 +0,0 @@
|
|||
/*
|
||||
The opinionated definition of a valid percentage for this macro:
|
||||
- It is between 0 and 1 (including 0 and 1 as valid values).
|
||||
*/
|
||||
{% test is_valid_percentage(model, column_name) %}
|
||||
with validation as (select {{ column_name }} as value from {{ model }})
|
||||
select *
|
||||
from validation
|
||||
where value > 1 or value < -1
|
||||
{% endtest %}
|
||||
|
|
@ -979,7 +979,10 @@ models:
|
|||
country of the guest.
|
||||
tests:
|
||||
- not_null
|
||||
- is_valid_percentage
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
max_value: 0.99 # If we ever have a 100% tax rate... Let's riot working please
|
||||
strictly: false
|
||||
|
||||
- name: is_service_subject_to_vat
|
||||
data_type: boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue