SPARQL 1.1 Federated Query (sometimes referred to by the original name, SPARQL-FED) processing permits Virtuoso to run SPARQL sub-queries (typically written using the SPARQL
SERVICE clause) to be run against remote SPARQL endpoints, as described in the standard.
Enabling SPARQL 1.1 Federated Query processing in Virtuoso is just a question of granting a role or two to the
SPARQL_SELECT_FED role is mandatory.
SPARQL_LOAD_SERVICE_DATA role is optional, and is used for “introspecting” endpoints — those which store the data acquired from external sources while processing SPARQL queries, Federated and otherwise.
SPARQL_SPONGE role, which is automatically granted to the
SPARQL user when the Sponger Cartridges VAD is installed, also enables SPARQL 1.1 Federated Query processing.
Federated SPARQL Query processing may be enabled in Virtuoso through use of either the Virtuoso Conductor (HTTP-based administration interface) or SQL commands.
In the Virtuoso Conductor’s System Admin → User Account tab, locate the
SPARQLuser account, and click the Edit button on the right:
Locate the Available list in the Account Roles section, select
SPARQL_SELECT_FED, and optionally for “introspecting” endpoints (those which store data acquired from external sources while processing locally submitted queries)
SPARQL_LOAD_SERVICE_DATA, and click the
>>button to add them to the Selected list:
With the necessary roles now in the Selected list, click the Save button to persist the settings for the
SPARQL 1.1 Federated Query processing is now enabled and ready for use.
The two commands below can be executed through any Virtuoso SQL interface (
isql, ODBC, JDBC, etc.) while logged in as a user with sufficient permissions (typically
dba or a user with DBA permissions).
The first command grants the required
SPARQL_SELECT_FED role, and the second command grants the optional
SPARQL_LOAD_SERVICE_DATA role for “introspecting” endpoints (those which store data acquired from external sources while processing locally submitted queries), each to the
GRANT "SPARQL_SELECT_FED" TO "SPARQL"; GRANT "SPARQL_LOAD_SERVICE_DATA" TO "SPARQL"; -- optional
Upon execution of the above command(s), SPARQL 1.1 Federated Query processing is enabled and ready for use.