Skip to content

Unique Anomaly Reporting

How the Unique check reports duplicates: the anomaly message it produces, what the counts mean, how duplicate groups appear in Source Records, and why per-row reporting does not apply.

Anomaly Messages

When the Unique check fires, it produces a single Shape Anomaly describing the dataset-level violation. The Unique check does not produce Record Anomalies: uniqueness is a property of the dataset as a whole (a duplicate group), not of any individual row's value, so the platform reports the violation at the shape level only.

Single-field check:

order_id values are repeated across N of M asserted records

Composite-key check, where the field names are joined with and:

order_id and line_number values are repeated across N of M asserted records

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

  • N: the number of rows that participate in any duplicate group, counted in full (not "extras only"). For 2 rows sharing the same tuple, N = 2, not 1.
  • M: the total number of rows the check evaluated (after the filter, if any).

Because N is the full count (and not just the extras), the anomaly's row count matches 1:1 against the rows you would find by running the equivalent SQL WHERE (a, b) IN (duplicate combinations) query.

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

Because the violation belongs to a duplicate group rather than to one row, Source Records show every row in each duplicate group, not just the extra copies. That makes the group readable end to end: you can see which record should survive and which are the duplicates to remove.

Custom Anomaly Description

Custom Anomaly Description does not apply to this rule. The option replaces the message on Record Anomalies, and Unique emits a Shape Anomaly only: the violation belongs to a duplicate group, not to a single row.

See Also