Skip to content

Commit a4d4a52

Browse files
authored
Merge pull request #13 from simllgnjt/fix-update-macro-athena__regexp_instr-add-flags-argument
fix: add flags arg to athena__regexp_instr macro in order to match dbt_expectations dispatch
2 parents 2c1cf73 + 5fb3976 commit a4d4a52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

macros/dbt_expectations/regexp_instr.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{# Parameters `position`, `occurrence`, and `is_raw` are therefore ignored #}
33
{# To match behavior of regexp_instr(), we need to return >0 when pattern is found and 0 when pattern is not found #}
44

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

0 commit comments

Comments
 (0)