-
Notifications
You must be signed in to change notification settings - Fork 20
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
FROM in subqueries #22
Comments
You're assuming that
|
Given that SPARQL 1.1 Update has |
Yes - FROM/FROM NAME describe a static dataset for the whole query execution. I am wondering what the use case in mind is? I assume it's discovering a graph you want to query during a query execution. That is a dynamic notion of the dataset but there are other ways to get the same effect, such as combining Update and query in one request or a conceptual dataset of all graphs (can't ask Maybe it is best done as two separate queries and not even in a single request. |
I was just about to report this as a new issue, but then saw that this issue already exists. Why?According to the SPARQL grammar, SELECT * WHERE {
SELECT *
FROM <http://dbpedia.org>
WHERE {
?s ?p ?o
}
} Relevant grammar part:
For example, http://sparql.org/query-validator.html gives the following error:
(Discovered in RubenVerborgh/SPARQL.js#85 thanks to @kidehen) Previous workIt looks like Virtuoso accepts such queries. Proposed solutionAs far as I can see, there is no reason why subqueries with Considerations for backward compatibilityAll 1.1 queries will still work in 1.2. |
@rubensworks You do not say why that is a problem. In your example, you can just move the |
@cygri @afs It is a problem because A. I want to count implicit and explicit statements in GraphDB, with one query, so I can present a single table keyed by property. This is not allowed by the grammar: PREFIX onto: <http://www.ontotext.com/>
select ?x ?explicit ?implicit {
{select ?x (count(*) as ?explicit)
from onto:explicit where {
?s ?x ?o
} group by ?x order by ?x}
{select ?x (count(*) as ?implicit)
from onto:implicit where {
?s ?x ?o
} group by ?x order by ?x}
} If I try it with PREFIX onto: <http://www.ontotext.com/>
select ?x ?explicit ?implicit {
{select ?x (count(*) as ?explicit) {
graph onto:explicit {
?s ?x ?o
}} group by ?x order by ?x}
{select ?x (count(*) as ?implicit) {
graph onto:implicit {
?s ?x ?o
}} group by ?x order by ?x}
} B. I want to use SPARQL federation to invoke an external endpoint. And it needs |
Ignoring the desire to use the services as they exist today, is this an argument that we need some sort of
This sounds like a bug and someone should beat up the guy who wrote that grammar. |
According to current grammar FROM is not allowed in subqueries..
The distributed nature of RDF screams for that..
The text was updated successfully, but these errors were encountered: