Skip to content

Column Uniqueness Check

The Column Uniqueness Check rule ensures that all values in a specified column are distinct within a dataset.
This rule is commonly used to:

  • Validate primary key or identifier columns
  • Ensure unique fields like email addresses, SKUs, or serial numbers are not duplicated
  • Maintain data integrity for critical business attributes

Example Usage:

  • Ensure all ProductCode values are distinct
  • Verify SerialNumber is unique for each product entry
  • Confirm Email addresses have no duplicates in a user database

Configuration Fields


Success Criteria Configuration

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

Field NameDescriptionRequiredOptions / Format
OperatorComparison operation for the unique 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 count as uniqueNotrue / false (default: false)

Sample Input Data

IDProductCodeSerialNumber
1PC-100SN-001
2PC-101SN-001
3PC-100SN-002
4PC-102NULL
5PC-103NULL
6NULLSN-003

Sample Configurations

Example 1: Strict Uniqueness Check

Configuration FieldValue
ColumnProductCode
OperatorEqualTo
Threshold Value4
Is Percentagefalse
Allow Nullsfalse

Explanation:
Validates that the ProductCode column contains exactly 4 unique values (PC-100, PC-101, PC-102, PC-103). Null values are treated as non-unique.


Example 2: Percentage-Based Uniqueness Check

Configuration FieldValue
ColumnSerialNumber
OperatorGreaterThan
Threshold Value50
Is Percentagetrue
Allow Nullstrue

Explanation:
Ensures that over 50% of SerialNumber values are unique, with null values being considered unique.


Sample Output

Column NameRule NameSuccess CountFailure CountNull CountWithin Threshold
ProductCodeColumn Uniqueness Check321No
SerialNumberColumn Uniqueness Check420Yes