-
Notifications
You must be signed in to change notification settings - Fork 580
Closed
Labels
Description
While performing the following script with SPARQL query:
# INFO:rdflib:RDFLib Version: 4.2.1-dev
from rdflib import Graph
from rdflib import Namespace
from rdflib import URIRef
OWL = Namespace("http://www.w3.org/2002/07/owl#")
g = Graph()
g.namespace_manager.bind('owl', URIRef("http://www.w3.org/2002/07/owl#"))
g.namespace_manager.bind('xsd', URIRef("http://www.w3.org/2001/XMLSchema#"))
qres = g.query("""
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpprop: <http://dbpedia.org/property/>
SELECT ?place (AVG(?rain) as ?avgRain)
WHERE{
VALUES ?rainPred {
dbpprop:janRainMm dbpprop:febRainMm dbpprop:marRainMm dbpprop:aprRainMm
dbpprop:mayRainMm dbpprop:junRainMm dbpprop:julRainMm dbpprop:augRainMm
dbpprop:sepRainMm dbpprop:octRainMm dbpprop:novRainMm dbpprop:decRainMm
}
SERVICE <http://dbpedia.org/sparql> {
?place ?rainPred ?rain .
}
}
GROUP BY ?place
HAVING (COUNT(?rain) = 12)
ORDER BY ?avgRain
""" )
for row in qres:
print row( thanks to http://answers.semanticweb.com/questions/22080/whats-your-favorite-recent-public-sparql-endpoint for an example idea)
I am getting: Exception: ServiceGraphPattern not implemented
The same query is executed fine in, for example, Sesame workbench.