sparna-git / Sparnatural

Sparnatural : Typescript visual SPARQL query builder for knowledge graphs, configurable with SHACL
http://sparnatural.eu
GNU Lesser General Public License v3.0
205 stars 34 forks source link

Help needed: shacl config for federated queries #604

Open CFGrote opened 2 weeks ago

CFGrote commented 2 weeks ago

I need help configuring federated queries with shacl. I got it to work in owl, following the documented examples. Copying over the relevant parts from owl to shacl does not work. Is it not (yet?) supported or can someone list the required steps?

Thanks in advance!

tfrancart commented 1 week ago

Theoretically, it is exactly equivalent to using an OWL property, except you start with a property shape. I never really tested it recently with a SHACL config. You need to:

  1. Add a http://data.sparna.fr/ontologies/sparnatural-config-core#sparqlService annotation on a property shape that is to be executed as a SERVICE
  2. This annotation will point to an entity that itself is the subject of an http://www.w3.org/ns/sparql-service-description#endpoint predicate holding the actual SPARQL endpoint URL
  3. Optionnaly you can add http://data.sparna.fr/ontologies/sparnatural-config-core#executedAfter on the property shape to force the rest of the query to be put in subquery that will be evalued before the SERVICE clause is sent
CFGrote commented 1 week ago

thanks, that seems to do it. Should become part of the documentation.

tfrancart commented 1 week ago

Definitely needs documentation, I keep the issue open