Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

named graphs #493

Open
justin2004 opened this issue Oct 2, 2021 · 2 comments
Open

named graphs #493

justin2004 opened this issue Oct 2, 2021 · 2 comments

Comments

@justin2004
Copy link

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

@hannahbast
Copy link
Member

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."

@aindlq
Copy link

aindlq commented Mar 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants