Home

SHACL

SHACL, short for Shapes Constraint Language, is a W3C standard for validating RDF graphs against a set of constraints called shapes. It provides a formal, machine-readable way to express data quality requirements and to check data consistency across datasets and systems.

A SHACL schema (or shapes graph) defines shapes, which are either node shapes or property shapes. Node

Constraints are expressed with constraint components (e.g., sh:datatype, sh:minCount, sh:maxCount, sh:class, sh:nodeKind, sh:minLength, sh:pattern) and can

Validation proceeds by running a SHACL processor that validates the data graph against the shapes graph and

SHACL is used for data governance, schema validation, data integration, and publishing interoperable Linked Data. It

shapes
impose
constraints
on
a
focus
node;
property
shapes
constrain
particular
properties
of
a
focus
node.
Shapes
are
associated
with
a
data
graph
via
targets,
such
as
sh:targetClass,
sh:targetNode,
sh:targetSubjectsOf,
or
sh:targetObjectsOf,
which
determine
the
set
of
focus
nodes
to
validate.
be
combined
with
logical
operators
(sh:and,
sh:or,
sh:not).
Paths
can
be
complex
RDF
property
paths,
allowing
nested
or
repeated
properties.
SHACL
also
supports
SHACL-SPARQL,
which
enables
constraint
validation
via
SPARQL
queries
for
cases
not
covered
by
built-in
components.
produces
a
validation
report.
The
report
lists
results
for
failing
focus
nodes,
including
the
shape
that
was
violated,
the
constraint
component,
a
message,
and
severity.
A
graph
is
conformant
if
the
report
contains
no
violations.
is
supported
by
multiple
RDF
data
platforms
and
tools
and
is
available
in
RDF
serializations
such
as
Turtle
and
RDF/XML.
The
W3C
SHACL
specification
evolved
from
SHACL
Core
and
SHACL-SPARQL,
with
ongoing
extensions
and
tooling.