%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}%
---++How to handle SPARQL-FED queries for SPARQL endpoints with no OPTION() clause supported?
Suppose the following sample scenario:
1. Assume the following SPARQL-FED query:
PREFIX wp:
PREFIX atlasterms:
PREFIX efo:
SELECT DISTINCT ?wpTitle ?dbXref ?expressionValue
WHERE
{
{
GRAPH
{
?pwElement dcterms:isPartOf ?wpPathway .
?wpPathway dc:identifier .
?wpPathway dc:title ?wpTitle .
?pwElement wp:bdbEnsembl ?dbXref .
}
SERVICE
{
?value atlasterms:hasFactorValue ?factor .
?value atlasterms:isMeasurementOf ?probe .
?value atlasterms:pValue ?pvalue .
?value rdfs:label ?expressionValue .
?probe atlasterms:dbXref ?dbXref .
?disFactor rdfs:subClassOf+ efo:EFO_0000408 .
?disease rdf:type ?disFactor .
?disFactor rdfs:label ?label .
}
}
}
1. Execute the query from Virtuoso sparql endpoint
1. As result you should get the following error:
Virtuoso 37000 Error SP031: SPARQL compiler:
SERVICE at line 18 does not
support OPTION (...) clause for triples so SPARQL query can not be composed
The error message means that the https://www.ebi.ac.uk/fgpt/atlasrdf/sparql sparql endpoint does not support OPTION clause.
Basically, one should be able to use the following command to interrogate a target SPARQL endpoint (if initial SPARQL-FED fails):
SPARQL
LOAD SERVICE <{SPARQL-END-POINT-URL}> DATA
So in our example it would be:
LOAD SERVICE DATA ;
---+++Related
* [[VirtTipsAndTricksDiscoverSPARQFedCapabilities][How to discover the capabilities of a SPARQL endpoint en route to enhancing SPARQL-FED usage from Virtuoso instances?]]