Powered by Zoomin Software. For more details please contactZoomin

Semaphore Knowledge Model Management (KMM) How-To Articles

How to use SPARQL editor to develop and run custom queries on your model

How to use SPARQL editor to develop and run custom queries on your model

  • Last Updated: May 13, 2026
  • 3 minute read
    • Semaphore
    • Documentation

Explanation

Knowledge Model Management (KMM) offers a very rich and functional view of all of your model data. Sometimes you may desire to see only data that meet certain criteria (such as concepts that belong to certain classes) or to see certain data forms (such as URIs or labels).

The reporting tool allows you to run customizable reports of your model data using the SPARQL query language. For users who know how to write SPARQL, KMM also offers a SPARQL editing interface where for building custom queries from scratch.

This article explains the features of the SPARQL Editor, as well as how to access and use. This article does not teach how to write the SPARQL language; to learn more about SPARQL, consider these resources:

In this video, you learn how SPARQL UPDATE is used in Semaphore to explore and modify an existing semantic model, using the provided Space Missions knowledge model as an example. It walks through accessing the SPARQL Editor, running queries, and updating model data to keep semantic models accurate and up to date.

Note: To see the video description, resources, and list of links on YouTube, hover over the video player and click the video title at the top.

Assumptions

  • You have some knowledge of the SPARQL query language.
  • You have an existing model.
  • You have any of these roles for the model: MANAGER, EDITOR, CONTRIBUTOR (This article does not apply to the role REVIEWER, since it is allowed view-only access.)

Method

  1. Open a model (in this example, Space Missions), and click Edit Master or open a task.
  2. At the top, click the model menu (labelled Master or by the name of your task), and then click SPARQL editor.

The SPARQL editor has a simplified interface. Queries go on the left, and responses appear on the right.

If you want to run a SPARQL Update command (such as DELETE or INSERT), you do not have to change to Update mode. The interface will recognize it for you. (You will need to have SPARQL Write Access activated for your account to perform updates.)

The steps below will help you navigate the editor, and they will highlight some key features.

  1. The editor automatically populates with a basic query. Click Submit.
  2. View the results. If Table is selected, then the results appear in table format. If Response is selected, then the results appear in JSON format.
![](img/sparql-04-jsonresults.png)
  1. Click Download csv. Save the comma-delimited file, and open it for view in a text editor or spreadsheet viewer.
  2. Click the menu icon (three lines). From this menu, you can save the query you have built (#1 in image; it will be available for reuse in the Reporting application), or you can select a predesigned query to run on your model (#2 in image).

Outcome

Results of SPARQL queries are traditionally formatted in tables for easy reading. However, the reporting tool offers multiple formats that you can use for human viewing or downstream system processing.

TitleResults for “How to create a CRG?”Also Available inAlert