Matches Pattern Anomaly Reporting
How the Matches Pattern check reports violations: the anomaly messages it produces, what the numbers mean, how the offending value appears in Source Records, and how to replace the default message with a value from your own data.
Anomaly Messages
On a scalar text field, Matches Pattern reports violating rows as Record Anomalies at 100% coverage; below 100% coverage, a failed coverage assertion produces one Shape Anomaly for the dataset. On an array field the check is evaluated column-level, so it always produces a Shape Anomaly and never Record Anomalies, whatever the coverage. The two templates are:
Record Anomaly
Shape Anomaly
When a filter is set, both Record and Shape Anomaly messages end with [filter: <expression>].
Scan settings can group a large number of Record Anomalies into one rolled-up Shape Anomaly. This behavior applies across rule types and is documented under Maximum Record Anomalies per Check.
What the Numbers Mean
- X.XXX%: the fraction of filtered rows that do not match the expression.
- N: the total number of rows the check evaluated (after the filter, if any). Rows with NULL values count in this total because they pass.
- K: the number of rows that do not match.
Source Records Behavior
The offending cell is highlighted with an orange outline and an orange-tinted background in the Source Records view, mirroring the platform's standard violation rendering. Only the cell carrying the non-matching value is highlighted; the rest of the row renders normally.
Custom Anomaly Description
Matches Pattern supports Custom Anomaly Description on scalar text fields, because those emit Record Anomalies. When anomaly_message_field (or the Custom Anomaly Description toggle in the UI) is set to another column on the same row, the Record Anomaly message becomes the value of that column for the violating row. When the referenced column is null, missing, or empty, the standard template is used instead.
Because the option only applies to Record Anomalies, it does not affect Shape Anomalies, which always use the fixed template, and it has no effect at all on a check targeting an array field.
See Also
-
How It Works
The complete reference: definition, field scope, the pattern property, matching semantics, NULL handling, arrays, filter behavior, and coverage.
-
Examples
Three production scenarios with sample data, anomaly messages, and the SQL equivalent of what the check evaluates.
-
Best Practices
Guidelines for writing the expression, anchoring it, pairing rules, and keeping the signal clean.
-
Permissions
The team permission each action needs: view, create, edit, archive, restore, and delete.