Skip to content

Expected Values Anomaly Reporting

How the Expected Values 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 field at 100% coverage, Expected Values reports violating rows as Record Anomalies. Below 100% coverage, a failed coverage assertion produces one Shape Anomaly for the dataset. On an Array field the rule runs element-wise as a field-level check, which always reports a Shape Anomaly (see Array Fields). The two templates are:

Record Anomaly

<field> has the value <value>, which is not among the allowed values: <allowed values>

Shape Anomaly

<field> values are not among those allowed, affecting N of M asserted records: <allowed values>

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 whose value was non-NULL and not in the list.
  • M: the number of rows evaluated (after the filter, if any).

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

When you open the source records for an Expected Values anomaly, the platform highlights only the offending cell for the field the check applies to. Other columns in the same row are rendered normally. This matches how the check semantics work: the violation is about a single field's value, not the entire row.

The Sample Data tables on the Examples page follow the same convention: one row per source record, with only the failing cell visually marked.

Custom Anomaly Description

Expected Values supports Custom Anomaly Description because it emits 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.

See Also