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

<field> holds <observed> distinct values, which is not <comparison> the expected <expected>

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

What the Numbers Mean

  • <observed>: the approximate distinct count the scan measured on the filtered rows.
  • <expected>: the expected number configured on the check.
  • <comparison>: the configured operator, written out in full, such as equal to or greater than or equal to.

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