From 5fb39766342d9b2beb6d34b873d76b233b2a1006 Mon Sep 17 00:00:00 2001 From: Simon Llagone Date: Wed, 5 Apr 2023 18:28:10 +0200 Subject: [PATCH] fix: add flags arg to athena__regexp_instr macro in order to match dbt_expectations dispatch --- macros/dbt_expectations/regexp_instr.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/dbt_expectations/regexp_instr.sql b/macros/dbt_expectations/regexp_instr.sql index f653430..9ceaf6f 100644 --- a/macros/dbt_expectations/regexp_instr.sql +++ b/macros/dbt_expectations/regexp_instr.sql @@ -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 %}