-
-
Notifications
You must be signed in to change notification settings - Fork 117
/
expect_table_row_count_to_be_between.sql
36 lines (35 loc) · 1.57 KB
/
expect_table_row_count_to_be_between.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{%- test expect_table_row_count_to_be_between(model,
min_value=None,
max_value=None,
group_by=None,
row_condition=None,
strictly=False
) -%}
{{ adapter.dispatch('test_expect_table_row_count_to_be_between',
'dbt_expectations') (model,
min_value,
max_value,
group_by,
row_condition,
strictly
) }}
{% endtest %}
{%- macro default__test_expect_table_row_count_to_be_between(model,
min_value,
max_value,
group_by,
row_condition,
strictly
) -%}
{% set expression %}
count(*)
{% endset %}
{{ dbt_expectations.expression_between(model,
expression=expression,
min_value=min_value,
max_value=max_value,
group_by_columns=group_by,
row_condition=row_condition,
strictly=strictly
) }}
{%- endmacro -%}