Query Mode
Query mode is where the model earns its keep. A graph canvas shows you shape, and a query answers a question. Two surfaces share the sub-mode bar: the SPARQL console and the Visual builder. Both query one version of the selected ontology at a time. The version chip at the bottom of the page shows which one: Draft or Published with its version, such as v1.5.0.Choose the Version to Query

- Draft: The working version, including unpublished changes. The number is the count of unpublished changes. Only users with edit permission can query the draft.
- Published: The active release, for example v1.5.0. Concepts you haven’t published don’t appear in these results.
Open Query Mode
- Pick the ontology you want to query in the Ontology selector. With All ontologies selected, Query first asks you to pick one ontology.
- Click the Query tab.
- Click SPARQL console or Visual builder.
POST /api/v1/ontologies/{id}/sparql, with scope=release (the default) or scope=draft. Any user with view access on every member of the active release can query the release. Querying the draft needs edit permission on the ontology.
The SPARQL Console
The SPARQL console is where you write, save, and run SPARQL queries.
The Queries Panel
The left panel is headed Queries. Click the + button to start a new query, or use Search queries to filter the list. It holds two groups:- My queries: Your private library, visible only to you. An empty library shows “No queries yet. Save a shared query or start a new one.” Hover a query to rename, duplicate, or delete it.
- Shared: Read-only queries available to everyone on this ontology. Everyone can read and run them, and only admins can create, update, or delete them with Save as sample query. The built-in starters that query glossary terms are hidden here, because an ontology doesn’t hold glossary terms.
Run a Query
-
Click New query in the header, or the + button in the panel. It opens an untitled query with a starter scaffold:
- Edit the query, or click a saved one in the panel.
-
Click Run query, or press
Cmd+Enter(Ctrl+Enteron Windows and Linux). Until you run it, the results area is empty.
Read the Results
After a run, the Results header shows the row count and run time, for example 4 rows · 1954 ms, when it ran, and the version it ran against.- Copy: Copies the results.
- CSV: Downloads the results as a CSV file.
- Table and Graph: For queries that return graph data, switch between a table and a graph view.
- If a query matches nothing, the area says “The query ran without matching any results.”
Saving Queries
The title row above the editor shows the query name, its type (for example SELECT), and where it lives. The buttons depend on what you opened.
When you edit a shared query, an Unsaved changes badge appears and a banner explains that your changes stay local until you save them as your own query. Use Discard to drop your edits, or Save as my query to keep them.
When you save a query, a dialog asks you to name it.
Limits and Read-Only Rules
- Read-only: The console rejects
INSERT,DELETE,DROP,LOAD,CLEAR, andCREATE. - No federation: The console refuses
SERVICE, includingSERVICEnested insideEXISTS. - Format:
SELECTandASKresults as JSON (default), CSV, TSV, or XML.CONSTRUCTandDESCRIBEresults as Turtle, JSON-LD, N-Triples, or RDF/XML.
The limits above apply to catalog-wide queries. Ontology queries run in a separate, isolated process with their own memory and size limits, and one query at a time is admitted across the server. If an ontology is too large to load for a query, the request fails with an error that says so. Queries that exceed capacity or the timeout fail with an explicit error rather than degrading everyone else’s latency.
The Visual Builder
Not everyone writing governance questions wants to write SPARQL. The visual builder composes a query from choices and compiles it live. It queries the version selected in the version chip.
-
Open the Visual builder tab. Under Find, choose Concepts or Properties. Limit sets the maximum number of rows, which starts at
100. -
Under where, choose a condition. The list shows each relationship in the ontology with its kind, for example isA · sub class of, contains · object assertion, broader · object assertion, disjointWith · disjoint with, and dosage · object property.

-
Choose the target concept. Type in the box to search the list.

- Optional: Click Add condition to combine another condition. Click the x beside a condition to remove it, or click Reset to start over.
-
Read the Generated SPARQL panel. It updates as you change the choices and uses the standard
rdf,rdfs,owl,skos, andxsdprefixes and the full IRI of the target concept. Click the copy icon to copy it, or the close icon to hide the panel. -
Click Run query to run it in place. The results appear in a table.

- Optional: Click Edit as SPARQL to hand the generated query to the console.
Query the Whole Catalog
Queries against the whole knowledge graph, including entities, tags, and lineage, are separate from ontology queries. They need RDF enabled, run againstPOST /api/v1/rdf/sparql, and are for admins only. For more information, see RDF Knowledge Graph Indexing.
A separate SPARQL Playground (marked Beta) is available at /governance/sparql, without the Studio chrome. It isn’t in the left navigation, so navigate to it directly. It has Saved queries and Installation queries lists, an Inject prefixes option, a Format selector, an Inference selector (None, or Custom when materialized inference is enabled), and a Download option for results. It shares the same limits and runs against the catalog-wide endpoint.
For more information, see the SPARQL cookbook, which has recipes such as PII propagation, lineage traversal, coverage gaps, and contract checks.