expect_column_values_to_not_match_like_pattern
Feb 24, 2026
·
5
min read
Values format
·
dbt-expectations
·
Column
How it Works
The expect_column_values_to_not_match_like_pattern test from the dbt-expectations package is the inverse of expect_column_values_to_match_like_pattern. It asserts that none of the values in a column match a given SQL LIKE pattern. This is useful for blocking known bad patterns, such as test data, placeholder strings, or deprecated identifier formats.
Steps and Conditions
Column Selection: Identify the column to validate.
Define Exclusion Pattern: Supply the SQL LIKE pattern that values must NOT match.
Optional Row Condition: Narrow the scope with
row_condition.Execution: Each value is checked; any match to the pattern causes a failure.
Outcome: Pass if no values match the pattern; fail if any do.
Example Usage: Customer Data Platform
A customer data platform wants to ensure that no real customer email addresses contain 'test' as part of the domain, which would indicate staging data leaked into production.
This prevents test email addresses from appearing in the production customer table.





