Page MenuHomePhabricator

Federated SPARQL queries using datos.bne.es don't allow binding
Closed, DeclinedPublic

Description

While a simple federated query with http://datos.bne.es/sparql works as expected from the Query Service...

SELECT * WHERE {
  SERVICE <http://datos.bne.es/sparql> {
    <http://datos.bne.es/resource/XX1719671> ?prop ?value .
  }
}

... an equivalent one using BIND does not...

SELECT * WHERE {
  BIND(<http://datos.bne.es/resource/XX1719671> AS ?id)
  SERVICE <http://datos.bne.es/sparql> {
    ?id ?prop ?value .
  }
}

... but it does with other data sources like DBpedia...

SELECT * WHERE {
  BIND(<http://dbpedia.org/resource/Universe> AS ?id)
  SERVICE <http://dbpedia.org/sparql> {
    ?id ?prop ?value .
  }
}

I guess this is caused by the fact that http://datos.bne.es/sparql doesn't allow binding. However, if true, this would work if we replaced the corresponding variables with their content in our side.

Federated queries without binding aren't very useful.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Interesting point.

Is this different from SPARQL_federation_input#Queries_with_Federation? Though the problem mentioned there seems to be happening at several.

Looks like this endpoint just can't handle SPARQL syntax with VALUES. I'm not sure what we could do on our end here. I tried example directly from SPARQL Spec:

PREFIX dc:   <http://purl.org/dc/elements/1.1/> 
PREFIX :     <http://example.org/book/> 
PREFIX ns:   <http://example.org/ns#> 

SELECT ?book ?title ?price
{
   ?book dc:title ?title ;
         ns:price ?price .
}
VALUES (?book ?title)
{ (UNDEF "SPARQL Tutorial")
  (:book2 UNDEF)
}

And it errors out.

Judging from this: http://vos.openlinksw.com/owiki/wiki/VOS/VOSNews2013#SPARQL%20and%20RDF%20Data%20Management

Added support for SPARQL 1.1 BIND and VALUES clauses

Virtuoso only gained support for VALUES in 7.0. That endpoint runs Virtuoso 6. I guess if people need data federation to work with that endpoint properly, the best way is to ask the admins to upgrade. Given that it was released 5 years ago, I don't think it makes sense to spend time on trying to support older Virtuoso on our side.

Vvjjkkii renamed this task from Federated SPARQL queries using datos.bne.es don't allow binding to ysaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from ysaaaaaaaa to Federated SPARQL queries using datos.bne.es don't allow binding.Jul 2 2018, 4:52 AM
CommunityTechBot closed this task as Declined.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.