Skip to content

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

<field> has the value <value>, which does not match the required format. Values should follow the pattern: <pattern>

Shape Anomaly

<field> values do not match the required format, affecting N of M asserted records. Values should follow the pattern: <pattern>

When a filter is set, the message names it at the end of its first sentence, as (applied to records where <expression>). Record and Shape Anomaly messages both carry it.

Scan settings can group a large number of Record Anomalies into one rolled-up Shape Anomaly, which carries the Shape Anomaly message. This behavior applies across rule types and is documented under Maximum Record Anomalies per Check.

What the Numbers Mean

  • N: the number of rows that do not match.
  • M: the total number of rows the check evaluated (after the filter, if any). Rows with NULL values count in this total because they pass.

For a Shape Anomaly, the failing share appears in the opening line of the anomaly's description, for example 2 of 4 records (50%) in ACCOUNTS failed 1 check during full scan #4821. That line counts against every record the scan processed, so on a filtered check its denominator is no smaller than the check's own asserted count. See Anomaly Description.

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. The option is anomaly_message_field in the API and the Custom Anomaly Description toggle in the UI.

When the option points at another column on the same row, the Record Anomaly message becomes that column's value for the violating row, shown as written. When the column is null, missing, or empty, the message falls back to the rule's standard wording, and when the column is masked the message reads <masked>. Shape Anomaly messages are unaffected.

On a check targeting an array field the option has no effect at all.

See Also