A user-friendly SPARQL query editor powered by lightweight metadata
Vincent Emonet, Ana-Claudia Sima, Tarcisio Mendes de Farias · 2025
Read A user-friendly SPARQL query editor powered by lightweight metadata by Vincent Emonet, Ana-Claudia Sima, Tarcisio Mendes de Farias (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-02688.txt.
Introduction
Vincent Emonet, Ana-Claudia Sima, and Tarcisio Mendes de Farias present a friendlier editor for SPARQL, the query language of linked data stores. Their 2025 paper notes that current editors give even skilled users little help while they write queries. The new tool is open source, deploys with a single custom web element, and works with any triple store.
Three features stand out. Example queries render automatically, autocomplete draws on real triple patterns in the data, including inside service clauses, and a data-aware schema view shows the shape of the store. The editor has been tested on several public endpoints and is deployed online. Code is available in a public repository for reuse and improvement.
Catalog record
| CREATOR | Vincent Emonet, Ana-Claudia Sima, Tarcisio Mendes de Farias |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 10 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-02688
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A user-friendly SPARQL query editor powered by lightweight metadata Vincent Emonet, Ana-Claudia Sima, Tarcisio Mendes de Farias Abstract SPARQL query editors often lack intuitive interfaces to aid SPARQL-savvy users to write queries. To address this issue, we propose an easy-to-deploy, triple store-agnostic and open-source query editor that offers three main features: (i) automatic query example rendering, (ii) precise autocomplete based on existing triple patterns including within SERVICE clauses, and (iii) a data-aware schema visualization. It can be easily set up with a custom HTML element. The tool has been successfully tested on various public endpoints, and is deployed online at https://sib-swiss.github.io/sparql-editor with open-source code available at https://github.com/sib-swiss/sparql-editor . 1 Introduction The Semantic Web of data has been growing considerably in recent decades through the deployment of public query endpoints on the Web. For example, yummydata.org catalogues more than 55 SPARQL endpoints that are of interest to the biomedical community. However, SPARQL endpoints often lack an intuitive Web-based interface that effectively helps SPARQL-savvy users to write queries, notably missing autocomplete [ 3 ] . Several triple stores such as Stardog 1 1 1 https://www.stardog.com and GraphDB 2 2 2 https://graphdb.ontotext.com propose query editors but they are proprietary and triple store-dependent solutions, or they do not have an autocomplete solution based on a data-aware schema (i.e., a data schema built on the existing data). Alternatively, the Qlever UI query editor is open source 3 3 3 https://github.com/ad-freiburg/qlever-ui and provides autocomplete, but works only on the Qlever triple store. In [ 1 ] , authors describe the Qlever autocomplete methodology that requires to send an SPARQL query for each autocomplete request. As a result, if this methodology is implemented over non-Qlever endpoints, each autocomplete request can take several seconds compromising usability and increasing the endpoint server load. Other open-source query editors exist; however, they are tailored to a specific dataset (e.g., Wikidata Query Service [ 5 ] ) or lack basic relevant features, such as autocomplete (e.g., LODEstar 4 4 4 https://github.com/EBISPOT/lodestar - additionally, the latter has not been maintained since 2018). Currently, a widely used open-source SPARQL editor is YASGUI [ 4 ] that is used by platforms such as GraphDB, Oxigraph and UniProt 5 5 5 https://sparql.uniprot.org . Although YASGUI offers user-friendly features like syntax highlighting, customizable autocomplete, endpoint selection, and modular results rendering, it lacks automatic adaptation to specific SPARQL endpoints. Its autocomplete suggestions are generic and unaware of the query context, requiring manual configuration for each endpoint. To the best of our knowledge, no existing query editor supports autocomplete within SERVICE clauses (i.e., federated queries). To address these issues, we propose an SPARQL query editor based on YASGUI that is easy to deploy, open-source and triple store agnostic, dedicated to helping users write queries over Resource Description Framework (RDF) data. The editor automatically loads and renders query examples from any SPARQL endpoint, and provides a context-aware autocomplete feature. 2 Implementation To support users to write queries for a given SPARQL endpoint, we extended the Yasgui environment [ 4 ] with three main features: (i) a query examples section, automatically constructed from endpoint metadata; (ii) precise autocomplete that adapts according to the SPARQL statements written by the user; and (iii) a data-aware schema visualization. To facilitate deployment, this extension is provided as an npm package 6 6 6 https://www.npmjs.com/package/@sib-swiss/sparql-editor that can be easily set up by any SPARQL endpoint maintainer using a single custom HTML element <sparql-editor/> . 2.1 Displaying query examples Our query editor automatically pulls SPARQL query examples stored as metadata in any given triple store and displays them to the user. To enable this, the SPARQL query examples should be described using the lightweight metadata schema proposed in [ 2 ] . In this methodology, SPARQL queries and their descriptions are defined mostly by reusing existing vocabularies such as the W3C recommendation Shapes Constraint Language (SHACL) 7 7 7 https://www.w3.org/ns/shacl . By presenting the examples alongside the editor, users can easily inspect, run, or adapt the existing queries to their own information needs, or simply formulate completely new queries using the existing ones as source of inspiration. Figure 1 depicts the editor webpage. By clicking on the “Browse examples” button (bottom-right), users can inspect and search the full list of examples. Figure 1: Our query editor showing on the right side example queries stored as metadata and fetched from a SPARQL endpoint. By pressing CTRL+Space after ?species , the autocomplete suggests only predicates which are asserted to instances of up:Taxon . 2.2 A context aware autocomplete Our SPARQL editor provides a precise autocomplete based on the Vocabulary of Interlinked Datasets (VoID) 8 8 8 https://www.w3.org/TR/void descriptions of any RDF dataset. To generate VoID descriptions, SPARQL endpoint maintainers can rely on the VoID generator tool [ 2 ] that automatically produces VoID metadata that include statistics of the given dataset. The maintainers can make these metadata accessible through their respective SPARQL endpoints. The real-world applicability of this tool was demonstrated by running it in very large RDF datasets such as the UniProt SPARQL endpoint 9 9 9 https://sparql.uniprot.org , which contains more than 210 billion triples. Our editor retrieves the VoID metadata, if available, by querying directly the endpoint itself. The main information of interest processed by the editor from the VoID descriptions is represented by the classes instantiated in the endpoint and properties that relate them. This ensures that only properties that are stated and applicable according to the schema and the known type of a variable are suggested in the autocomplete drop-down menu (see Figure 1 ). If no VoID metadata are found, the editor will try to retrieve all classes and properties. Finally, our autocomplete approach is lighter, faster, and complementary when compared to the state-of-the-art approaches such as the Qlever autocomplete. In addition, it works within SPARQL 1.1 federated SERVICE calls. 2.3 Building and visualizing a data-aware schema By also considering the VoID descriptions, our query editor is able to build and visualize a simplified data schema that reflects exactly the RDF properties and classes used and accessible through a given SPARQL endpoint. Therefore, a data schema based on the actual contents of the endpoint, that is, a data-aware schema , is useful to aid users in writing SPARQL queries. To display the data-aware schema of a given endpoint, users can click on the “Classes overview” button in our graphical query editor interface (see Figure 1 , top orange buttons). 3 Demonstration The proposed SPARQL query editor is publicly available and deployed at https://sib-swiss.github.io/sparql-editor . Users can choose either a predefined endpoint shown in the SPARQL endpoint field at the top, or input their own endpoint of interest in this field. Note that the new features described in Section 2 will only be available if the corresponding metadata are accessible through the assigned SPARQL endpoint. At the time of writing, 8 out of 10 public endpoints listed in our official query editor release included all the metadata needed for our tool to be fully operational. This also demonstrates that our approach is triple store agnostic, and readily deployable over diverse RDF data sources. Finally, non-savvy SPARQL users can use our ExpasyGPT tool at https://www.expasy.org/chat that generates SPARQL queries from plain-English text and run these