Skip to content

Commit

Permalink
Merge pull request #13 from simllgnjt/fix-update-macro-athena__regexp…
Browse files Browse the repository at this point in the history
…_instr-add-flags-argument

fix: add flags arg to athena__regexp_instr macro in order to match dbt_expectations dispatch
  • Loading branch information
courentin authored Apr 5, 2023
2 parents 2c1cf73 + 5fb3976 commit a4d4a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/dbt_expectations/regexp_instr.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{# Parameters `position`, `occurrence`, and `is_raw` are therefore ignored #}
{# To match behavior of regexp_instr(), we need to return >0 when pattern is found and 0 when pattern is not found #}

{% macro athena__regexp_instr(source_value, regexp, position, occurrence, is_raw) %}
{% macro athena__regexp_instr(source_value, regexp, position, occurrence, is_raw, flags) %}
cast( regexp_like( cast( {{ source_value }} as varchar ), '{{ regexp }}' ) as int )
{% endmacro %}

0 comments on commit a4d4a52

Please sign in to comment.