Federated Querying

Learn about federated querying and its uses.

What is federated querying?

Something we haven’t touched on is a neat feature of SPARQL that really opens up the game—federated querying. This extension to SPARQL allows for a portion of a query to be directed to any other SPARQL endpoint.

This means that instead of making three separate queries to three separate endpoints in the example we just walked through, we could have done this within a single query.

Let’s see how.

How to do federated querying

We just need to wrap a portion of a SPARQL query with the SERVICE keyword, followed by the endpoint URI. So, we could have queried both the endpoints with a single query like this:

Get hands-on with 1400+ tech skills courses.