iSPARQL Querying Tutorial with SPARQL Query type "DELETE"
This tutorial shows how to execute a SPARQL query with type "DELETE".
Enter and execute a query
- Go to iSPARQL demo page.
- By default, user name demo and password demo should be shown in the Login form.
Click OK.
- You will now see the iSPARQL home page, with QBE tab open and default graph elements on the Canvas.
Click the Clear Pane icon on the toolbar to empty the Canvas.
- Change the Data Source URI field value on the QBE tab to http://mytest.com as this is the Graph URL we are going to use in our tutorial.
- Before you can delete triples, you must insert some data , so please finish the iSPARQL Insert Query Tutorial before proceeding.
- On the QBE tab, change the Type (shown below the Canvas) to DELETE.
- Also change the Get Remote Data when Missing Locally drop-down menu to "Get Local Data Only".
- Click the Generate icon on the QBE toolbar.
- The Advanced tab will open, with the produced SPARQL Query shown in the text-area.
- We are going to modify the query by adding the triples which we want to be deleted from the local Named Graph, http://mytest.com.
Add (cut-and-paste) the following to the query:
<s1> <p1> <o1> . <s2> <p2> <o2>
- Click the Run Query icon on the Advanced toolbar.
- In the Result sub-tab, you should see a message confirming successful deletion of 2 triples:
- To check what triples are now found in the http://mytest.com Named Graph, click to the Advanced tab.
- Enter the following into the SPARQL Query text-area:
select ?s ?p ?o from <http://mytest.com> where { graph <http://mytest.com> { ?s ?p ?o } }
- Click the Run Query icon on the Advanced toolbar.
- You should see that only 1 triple is now found in the http://mytest.com Named Graph.
References