Page MenuHomePhabricator

SPARQL federated query SERVICE endpoint syntax (variable instead of uri)
Closed, DeclinedPublic

Description

Current samples for federated queries in SPARQL with blazegraph suggest the following format:

SERVICE <http://data.cervantesvirtual.com/openrdf-sesame/repositories/data>  { .. }

or

SERVICE SILENT <http://data.cervantesvirtual.com/openrdf-sesame/repositories/data>  { .. }

Following the discussion here, it seems that the following should be valid as well:

BIND(uri("http://data.cervantesvirtual.com/openrdf-sesame/repositories/data") as ?endpoint)
SERVICE ?endpoint  { .. }

or

?item wdt:P123456 ?endpoint .
SERVICE ?endpoint  { .. }

Obviously, provided that the endpoint is accessible from query.wikidata.org. If not:

?item wdt:P123456 ?endpoint .
SERVICE SILENT ?endpoint  { .. }

Event Timeline

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

Using a variable as the service endpoint is syntactically valid, but the semantics of it is undefined per SPARQL 1.1 Federated Query, section 4:

In the this section we do not present official evaluation semantics for the SPARQL pattern SERVICE VAR. We only provide indications about how the evaluation of the SPARQL pattern SERVICE VAR can be evaluated.

Using a variable as the service endpoint is syntactically invalid,

Shouldn't that read valid instead of invalid ?

Coming to the second part:

the semantics of it is undefined per SPARQL 1.1 Federated Query, section 4:

Would this have an actual impact?

It seems that even when using URI, the same service can be called just once.

Smalyshev triaged this task as Medium priority.Jun 21 2018, 10:42 PM
Vvjjkkii renamed this task from SPARQL federated query SERVICE endpoint syntax (variable instead of uri) to pcbaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from pcbaaaaaaa to SPARQL federated query SERVICE endpoint syntax (variable instead of uri).Jul 2 2018, 3:02 PM
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Gehel subscribed.

Changing the syntax of SERVICE calls would require changing the Blazegraph implementation, which should be done upstream. I'm closing this, feel free to reopen if you feel strongly about it.