Skip to content

Single instance data quality validation

What this is

Validate one instance at a time against structural and field-level SHACL constraints.

When to use it

Use this first when you need baseline quality controls such as:

  • required fields (sh:minCount)
  • datatype checks (sh:datatype)
  • range and pattern checks

This is the fastest path for initial onboarding and rule iteration.

Industrial examples

  • A maintenance work order must include order, description, and type.
  • Completed work orders must include both actualStartTime and actualEndTime.
  • Equipment assets must include a valid serial number format and commissioning date.

Example (SHACL Core)

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <https://example.com/dm/> .

ex:WorkOrderShape
    a sh:NodeShape ;
    sh:targetClass ex:WorkOrder ;
    sh:property [
        sh:path ex:order ;
        sh:minCount 1 ;
        sh:datatype xsd:string ;
    ] ;
    sh:property [
        sh:path ex:description ;
        sh:minCount 1 ;
        sh:datatype xsd:string ;
    ] ;
    sh:property [
        sh:path ex:type ;
        sh:minCount 1 ;
        sh:datatype xsd:string ;
    ] .

Previous section

Next section