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

Add explicit reference to dbt.length() #234

Merged
merged 2 commits into from
Dec 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
strictly=False
) %}
{% set expression %}
count(distinct {{ column_name }})/count({{ column_name }})
count(distinct {{ column_name }})*1.0/count({{ column_name }})
{% endset %}
{{ dbt_expectations.expression_between(model,
expression=expression,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
strictly=False
) %}
{% set expression %}
{{ length(column_name) }}
{{ dbt.length(column_name) }}
{% endset %}

{{ dbt_expectations.expression_between(model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
row_condition=None
) %}

{% set expression = length(column_name) ~ " = " ~ value %}
{% set expression = dbt.length(column_name) ~ " = " ~ value %}

{{ dbt_expectations.expression_is_true(model,
expression=expression,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- test expect_table_column_count_to_be_between(model,
min_value=None,
max_value=None
) -%}
min_value=None,
max_value=None
) -%}
{%- if min_value is none and max_value is none -%}
{{ exceptions.raise_compiler_error(
"You have to provide either a min_value, max_value or both."
Expand Down