-
-
Notifications
You must be signed in to change notification settings - Fork 117
/
expect_column_stdev_to_be_between.sql
38 lines (36 loc) · 2.01 KB
/
expect_column_stdev_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
37
38
{% test expect_column_stdev_to_be_between(model, column_name,
min_value=None,
max_value=None,
group_by=None,
row_condition=None,
strictly=False
) -%}
{{ adapter.dispatch('test_expect_column_stdev_to_be_between', 'dbt_expectations') (
model, column_name,
min_value,
max_value,
group_by,
row_condition,
strictly
) }}
{%- endtest %}
{% macro default__test_expect_column_stdev_to_be_between(
model, column_name,
min_value,
max_value,
group_by,
row_condition,
strictly
) %}
{% set expression %}
stddev({{ column_name }})
{% 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 %}