qlever
qlever copied to clipboard
named graphs
at https://qlever.cs.uni-freiburg.de/olympics/1a2iEY
when i run
PREFIX athlete: <http://wallscope.co.uk/resource/olympics/athlete/>
SELECT ?g ?p ?o WHERE {
graph ?g {
athlete:AadamIsmaeelKhamis ?p ?o
}
}
i get
Error:
Unknown error
Your query was:
PREFIX athlete:
SELECT ?g ?p ?o WHERE {
graph ?g {
athlete:AadamIsmaeelKhamis ?p ?o
}
}
Exception: ParseException, cause: Unexpected input: graph ?g { athlete:AadamIsmaeelKhamis ?p ?o } }
are named graphs not supported in qlever? i'm pretty sure they are in sparql 1.1
Named graphs are also not supported yet. As I wrote on https://phabricator.wikimedia.org/T290839#7354220 about two weeks ago:
"QLever does not yet have full SPARQL 1.1 support, but we are approaching that and will be there soon. The basic features are all there and what's missing are mostly small things."
One important use of named graphs, that is quite impossible to achieve without them, is an ability to transparently query multiple datasets with FROM
and FROM NAMED
SELECT ?artwork
WHERE
FROM <dataset/A>
FROM <dataset/B> {
?artwork crm:P108i_was_produced_by/crm:P33_used_specific_technique/owl:sameAs/skos:broader* <http://vocab.getty.edu/aat/300053271> .
}
Imagine that you have 10 datasets that use the same data model but are coming from different institutions and you want to be able to query the whole data, individual datasets or different combinations of them.
It is possible to have one instance of qlever per datastet to query them one by one, but then it is hard to join them together in an arbitrary way.
Or even more extreme scenario, where you have 100 different users and every user can have it's own "private" graph. With FROM
one can make sure that the data is kind of isolated from other graphs. In this case it is simply impractical to have so many instances of qlever.
With FROM
clause one can simply reuse the same query, and change only datasets.