Skip to content

Distinct Record Check

The Distinct Record Check rule verifies that a column contains the expected number of unique values.
This rule is commonly used to:

  • Validate expected cardinality in categorical or lookup fields
  • Ensure proper distribution of distinct values in key columns
  • Maintain data quality standards for reporting and analysis

Example Usage:

  • Check that a Country column contains exactly 25 unique country codes
  • Verify that a Product Category column has between 5 and 10 distinct values

Configuration Fields


Success Criteria Configuration

This section defines how the rule’s outcome is measured against expected thresholds.

Field NameDescriptionRequiredOptions / Format
OperatorComparison operation for distinct value countYesGreaterThan, LessThan, EqualTo, Between
Threshold ValueValue for comparison (single value for most operators)ConditionalNumber
Threshold MinMinimum value (for Between operator)ConditionalNumber
Threshold MaxMaximum value (for Between operator)ConditionalNumber
Is PercentageWhether the threshold represents a percentage of total rowsNotrue / false (default: false)
Allow NullsWhether null values should be counted as distinct valuesNotrue / false (default: false)

Sample Input Data

ProductIDCategoryRegion
1001ElectronicsEast
1002FurnitureWest
1003ElectronicsEast
1004ApparelNorth
1005ElectronicsNULL

Sample Configurations

Example 1: Exact Distinct Count

Configuration FieldValue
ColumnCategory
OperatorEqualTo
Threshold Value3
Is Percentagefalse
Allow Nullsfalse

Explanation:
Validates that the Category column contains exactly 3 distinct values (Electronics, Furniture, Apparel).


Example 2: Range-Based Distinct Count

Configuration FieldValue
ColumnRegion
OperatorBetween
Threshold Min2
Threshold Max4
Is Percentagefalse
Allow Nullstrue

Explanation:
Validates that the Region column contains between 2 and 4 distinct values, counting NULL as a distinct value if present.


Sample Output

Column NameRule NameSuccess CountFailure CountNull CountWithin Threshold
CategoryDistinct Record Check320Yes
RegionDistinct Record Check311No