Querying with SPARQL
Query the vocabulary you converted in Module 3, directly in the browser.
What is SPARQL?
SPARQL is the standard query language for RDF data — think SQL for linked data. It uses the same triple pattern (subject predicate object) as RDF itself, but you replace known values with variables (prefixed with ?) that the engine binds by searching the graph.
Anatomy of a SELECT Query
# 1. Declare prefixes (same as Turtle) PREFIX skos: <http://www.w3.org/2004/02/skos/core#> # 2. List the variables you want back SELECT ?concept ?label # 3. Triple patterns — ?var matches anything WHERE { ?concept a skos:Concept ; skos:prefLabel ?label . } ORDER BY ?label
The Live Graph
Query and browse the vocabulary you last converted in Module 3, including your changed labels, definitions, and relationships. Try a query template below, then edit it and run it again.
| ?concept | ?label |
|---|---|
| <https://example.org/risk/Extreme> | "Extreme Risk"@en |
| <https://example.org/risk/High> | "High Risk"@en |
| <https://example.org/risk/Low> | "Low Risk"@en |
| <https://example.org/risk/Medium> | "Medium Risk"@en |
Common Query Patterns
OPTIONAL — handle missing values
Use OPTIONAL when a property might not exist on every concept:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT ?concept ?label ?scopeNote WHERE { ?concept a skos:Concept ; skos:prefLabel ?label . # scopeNote is optional — rows without it still appear OPTIONAL { ?concept skos:scopeNote ?scopeNote } } ORDER BY ?label
/sparql. The Kurrawong demo endpoint is at data.kurrawong.ai/sparql. For local RDF files, the Kurra Python package lets you run SPARQL without a server. Browsing the Same Data with Prez
SPARQL is great for ad-hoc questions, but most users won't write queries — they'll click around. Prez is Kurrawong's web front-end for RDF: it reads the same vocabulary you'd query with SPARQL and renders it as browsable concept pages with proper labels, hierarchies, and provenance.

