diff --git a/macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql b/macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql index 09e0608..f0436a1 100644 --- a/macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql +++ b/macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql @@ -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, diff --git a/macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql b/macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql index 857cfdd..074f398 100644 --- a/macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql +++ b/macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql @@ -5,7 +5,7 @@ strictly=False ) %} {% set expression %} -{{ length(column_name) }} +{{ dbt.length(column_name) }} {% endset %} {{ dbt_expectations.expression_between(model, diff --git a/macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql b/macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql index 76106aa..1e4df08 100644 --- a/macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql +++ b/macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql @@ -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, diff --git a/macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql b/macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql index 25449ba..80fc595 100644 --- a/macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql +++ b/macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql @@ -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."