calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros

Home Page:https://calogica.github.io/dbt-expectations/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run for every model instead of adding in each model

KarthikRajashekaran opened this issue · comments

I would like to test every model for example, I want to check every model has no empty rows
expect_table_column_count_to_be_between

I do not want to be added to each model yml file
in DBT test , below is what test every model count


{% test not_empty(model) %}

select 1
from (select COUNT(*) as cnt from {{ model }}) as t
where cnt = 0;

{% endtest %}

Is there a better approach?

commented

Duplicate of #209?