Skip to content

Uniqueness

What this is

Run global duplicate detection for indexed business keys using SHACL-native uniqueness constraints.

When to use it

Use uniqueness when duplicates must be prevented across the full class population, for example:

  • work order names or IDs
  • operation names
  • enterprise keys used by downstream analytics

Use this after single-instance and graph-consistency rules are in place.

Industrial examples

  • Work order number must be unique across all active maintenance orders.
  • Operation name must be unique within the operational domain.
  • Equipment tag identifier must be unique for all assets in a plant.

Example (SHACL uniqueness constraint)

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix dqs: <http://purl.org/cognite/dqs#> .
@prefix ex: <https://example.com/dm/> .

ex:WorkOrderUniquenessShape
    a sh:NodeShape ;
    sh:targetClass ex:WorkOrder ;
    dqs:uniquenessConstraint [
        dqs:property "workOrderNumber" ;
    ] .

Previous section

Next section