SPARQL Federated Queries

The SPARQL 1.1 Federation Extensions document defines the SERVICE key word which can be used to created SPARQL Federated queries, i.e. provide solutions based on information from many different sources.

A base building block is the ability to have one query be able to issue a query on another SPARQL endpoint during query execution. This is provided by the SERVICE keyword which sends part of a query to a remote SPARQL endpoint.

    Frameworks implementing the SERVICE key word include:
  • ARQ

A very simple query, using SERVICE to indicate the SPARQL Endpoint, takes the form

SELECT DISTINCT ?type
WHERE {
SERVICE <sparqlendpoint> { ?ab a ?type . }
} LIMIT 10

e.g.

SELECT DISTINCT ?person
WHERE {
SERVICE <http://dbpedia.org/sparql> { ?person a <http://xmlns.com/foaf/0.1/Person> . }
} LIMIT 10

The SPARQL by Example tutorial provides the query Federated Data from Two Endpoints which queries and combines data from both Dbpedia and the Linked Movie Database.

References