SPARQL Query Panel

The SPARQL Query Panel can be used to enter and execute SPARQL queries. SPARQL is a W3C standard specifically designed to query RDF-based graphs, and provides rich expressiveness for many use cases.

Note

While SPARQL queries of type ASK, CONSTRUCT and SELECT can be executed by everyone, the execution of SPARQL UPDATEs (e.g., INSERT/DELETE) is disabled by default. These need to first be activated for the system by an administrator using the Server Configuration Parameters Admin Page.

Toolbar Buttons

  • Execute query runs the current query and display its results when done.

  • Preview is visible when the currently entered query is an UPDATE, and can be used to preview the changes that would be made if the query got executed. Like all similar Preview buttons, this will execute the update against a sandbox only.

  • Save query to library… can be used to save the current query to the SPARQL Library Panel, either for yourself or team members.

  • Reset to empty SELECT query replaces the currently edited query with a suitable default query.

  • Display SPARQL Algebra this is an advanced feature for users who want to understand what happens in the SPARQL query engine under the hood.

Hint

Many users are surprised when their SPARQL queries have unexpectedly bad performance. Some understanding of how the SPARQL engine works is often beneficial. Always keep in mind that the engine may internally change the order in which parts of a query are executed. For example, FILTERs are often moved to the end of their block. The SPARQL Algebra can be helpful to confirm this.

  • List of SPARQL functions in TopBraid

    opens a new browser tab with a list of all (relevant) globally defined SPARQL functions in TopBraid. TopBraid has hundreds of extra functions that go beyond what the SPARQL standard offers. Not all of them are documented here, and not all of them are considered “stable”.

Settings

  • Return local results only performs the query against the base graph only, not the union of base graph and included graphs.

See Also

Further Reading on TopBraid