Adding new column test: latest_date_is_yesterday

This commit is contained in:
uri 2024-09-06 09:13:27 +02:00
parent 1e89966153
commit 0f73b70942
2 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,13 @@
{% test latest_date_is_yesterday(model, column_name) %}
with
model_max_date as (
select max({{ column_name }}) as max_date
from {{ model }}
)
select *
from model_max_date
where max_date <> current_date - 1
{% endtest %}