Writing SPARQL Queries against your semantic model

After you export a mapping file to, you can write SPARQL queries against the data source that is accessible through the mapping file.

A video tutorial is available: Writing SPARQL Queries against your semantic model

NOTE: You can open the mapping file in a tool such as dw Editor.


SPAQRL is a query language for interacting with RDF and Turtle files. It is not yet possible to use conventional SQL against RDF and Turtle files.

Let's walkthough the creation of a simple SPARQL query.

1. Access your dataset in, then click Explore this dataset, and then click the +Add button in the upper-left corner. Choose SPARQL Query from the drop-down menu.


2. A PREFIX statement will appear at the top of the new query, which is the namespace for the dataset. Add another namespace for the the Grafo model by copying all but the last part of the IRI.


3. Paste the IRI path into the model namespace in the SPARQL query. Begin structuring the query with select *...where. Also, enter a service: mapped statement to indicate that you want the query to employ the mapping service.


4. Write a query, for example, to retrieve the full name of the student. The syntax is ?x model:full_name ?StudentFullName. Click the Run query button in the upper-right corner to verify that the query works as you intend.