expect_column_values_to_not_match_regex (source)
Expect column entries to be strings that do NOT match a given regular expression. The regex must not match any portion of the provided string. For example, "[at]+" would identify the following strings as expected: "fish”, "dog”, and the following as unexpected: "cat”, "hat”.
Optional (keyword) arguments:
is_raw
indicates theregex
pattern is a "raw" string and should be escaped. The default isFalse
.flags
is a string of one or more characters that are passed to the regex engine as flags (or parameters). Allowed flags are adapter-specific. A common flag isi
, for case-insensitive matching. The default is no flags.
Applies to: Column
tests:
- dbt_expectations.expect_column_values_to_not_match_regex:
regex: "[at]+"
row_condition: "id is not null" # (Optional)
is_raw: True # (Optional)
flags: i # (Optional)