Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run for every model instead of adding in each model #266

Closed
KarthikRajashekaran opened this issue Jun 8, 2023 · 1 comment
Closed

Run for every model instead of adding in each model #266

KarthikRajashekaran opened this issue Jun 8, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@KarthikRajashekaran
Copy link

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?

@owenprough-sift
Copy link

Duplicate of #209?

@clausherther clausherther added the duplicate This issue or pull request already exists label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants