# Running specific SHACL shapes via the SPARQL SERVICE

**URL:** <https://community.stardog.com/t/running-specific-shacl-shapes-via-the-sparql-service/5537>\
**Category:** Support\
**Created:** [March 30, 2026, 3:21pm UTC](https://community.stardog.com/t/running-specific-shacl-shapes-via-the-sparql-service/5537 "2026-03-30T15:21:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![User2](https://avatars.discourse-cdn.com/v4/letter/u/ecb155/32.png) [@User2](https://community.stardog.com/u/User2)\
**Post date:** [March 30, 2026, 3:21pm UTC](https://community.stardog.com/t/running-specific-shacl-shapes-via-the-sparql-service/5537/1 "2026-03-30T15:21:20Z")

</div>

Hi,

Does anyone know if it’s possible to run specific SHACL shapes via the ‘validate SPARQL service’ (`SERVICE icv:validate` - as documented here [Data Quality Constraints | Stardog Documentation Latest](https://docs.stardog.com/data-quality-constraints#validate-sparql-service))?

The guidance online seems to indicate that the only option is to separate my shapes into different graphs and then use the `icv:shapesGraph` input (but this feels a bit like a workaround).

For more context, I’m trying to emulate the SPARQL ‘VALIDATE’ function as in: `VALIDATE ALL USING SHAPES shacl:shape_1` . My goal is to capture the validation output of a one or two shapes directly into a graph, hence the preference of using SPARQL over a CLI command.

Any help will be greatly appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![jpullmann](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jpullmann/32/1422_2.png) [@jpullmann](https://community.stardog.com/u/jpullmann)\
**Post date:** [March 30, 2026, 3:39pm UTC](https://community.stardog.com/t/running-specific-shacl-shapes-via-the-sparql-service/5537/2 "2026-03-30T15:39:33Z")

</div>

Hey Jonathan,

indeed, you may supply the shape IRI via the `icv:shape`parameter:

> select distinct \* {  
> service icv:validate {  
> []  
> icv:dataGraph data: ;  
> icv:shapesGraph shapes: ;  
> **icv:shape** shapes:shape\_1 ;  
> icv:resultSeverity ?severity ;  
> icv:resultMessage ?message ;  
> icv:focusNode ?focusNode ;  
> icv:resultPath ?path ;  
> icv:value ?valueNode ;  
> }  
> }  
> order by ?focusNode ?path

Cheers  
Jaro
