diff --git a/macros/sql/pivot.sql b/macros/sql/pivot.sql index 88751062..4233ba9d 100644 --- a/macros/sql/pivot.sql +++ b/macros/sql/pivot.sql @@ -69,7 +69,7 @@ Arguments: {{ agg }}( {% if distinct %} distinct {% endif %} case - when {{ column }} {{ cmp }} '{{ dbt_utils.escape_single_quotes(value) }}' + when {{ column }} {{ cmp }} '{{ escape_single_quotes(value) }}' then {{ then_value }} else {{ else_value }} end