OpenLink AJAX Toolkit (OAT) Wiki
Documentation, live demonstrations and programmers' guides for the OpenLink AJAX Toolkit (OAT)
Advanced Search
Help?
Location: / Dashboard / OATWikiWeb / InteractiveSparqlQueryBuilderQueryTutorialInsert

iSPARQL Querying Tutorial with SPARQL Query type "INSERT"

This tutorial shows how to execute a SPARQL query with type "INSERT".

Enter and execute a query

  1. Go to iSPARQL demo page.
  2. By default, user name demo and password demo should be shown in the Login form. Click OK.



  3. 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.



  4. 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.



  5. On the QBE tab, change the Type (shown below the Canvas) to INSERT.
  6. Also change the Get Remote Data when Missing Locally drop-down menu to "Get Local Data Only".



  7. Click the Generate icon on the QBE toolbar.
  8. The Advanced tab will open, with the produced SPARQL Query shown in the text-area.



  9. We are going to modify the query by adding the values which we want to be inserted in the local Named Graph, http://mytest.com. Add (cut-and-paste) the following to the query:

    <s1> <p1> <o1> . <s2> <p2> <o2> . <s3> <p3> <o3>





  10. Click the Run Query icon on the Advanced toolbar.
  11. In the Result sub-tab, you should see a message confirming successful insertion of 3 triples:



  12. Now you may want to view the produced Graph Model. Click the Load Query to QBE icon.
  13. The QBE Working Canvas will now display the produced Graph:



  14. To check what triples are now found in the http://mytest.com Named Graph, click to the Advanced tab.
  15. 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 } }





  16. Click the Run Query icon on the Advanced toolbar.
  17. You should see that the 3 triples we inserted above are now found in the http://mytest.com Named Graph.



References

Powered By Virtuoso