-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix postgres__regexp_instr not validating regex #249 #250
Fix postgres__regexp_instr not validating regex #249 #250
Conversation
Thanks for the PR! |
I think this (negative) test fails on BigQuery - dbt_expectations.expect_column_values_to_not_match_regex_list:
regex_list: ["[A-Z]", "[0-9]"]
flags: i
match_on: all
config:
error_if: "=0"
warn_if: "<4" because this expression returns true for all rows select
regexp_instr(email_address, '[A-Z]', 1, 1) = 0
and
regexp_instr(email_address, '[0-9]', 1, 1) = 0
as expression
from dbt_expectations_integration_tests.data_text |
Sorry about that, I missed the This leads me to another question (out of scope of this ticket but might be nice to have): since BigQuery uses re2 and re2 supports flags by prepending the regex with |
Sounds good! I'm not super hip re: Regex options and flags, but if that'd be useful, I'd say go ahead and open an issue for it and we'll go from there. Thanks! |
…ikeitsnot/dbt-expectations into pr/lookslikeitsnot/250
What does this PR do?
Fix regex match succeeding for any pattern in Postgres (#249)
Add expected-to-fail tests for regex (#207)
Change description
Coalesce array_length and 0 to avoid null in expression when no match exists resulting in always falsy
WHERE
condition on error check in tests.Type of change
Where has this been tested?