Skip to content

Distinct Count Anomaly Reporting

How the Distinct Count check reports a cardinality mismatch: the message it produces, what the numbers mean, and why there is nothing to report per row.

Anomaly Messages

Distinct Count emits Shape Anomalies only: one anomaly per failed evaluation, never per row. The template is:

Shape Anomaly

For the field '<field_name>', the distinct count is <actual>, which does not match the expected value of <value>

When a filter is set, the message ends with [filter: <expression>].

What the Numbers Mean

  • <actual>: the approximate distinct count the scan measured on the filtered rows.
  • <value>: the expected number configured on the check.

The message states the measured count and the expected one; the configured operator is not repeated in the text, so check the configuration when the two numbers look compatible.

Source Records Behavior

Distinct Count measures the dataset as a whole rather than individual rows, so the anomaly carries no per-row source records. To find the values behind the number, group the column and count.

Custom Anomaly Description

Custom Anomaly Description does not apply to this rule. The option replaces the message on Record Anomalies, and Distinct Count emits a Shape Anomaly only.

See Also