Demo - ge-semtk/semtk GitHub Wiki

Welcome to the SPARQLgraph demo

You arrived here because you have no connections set up, suggesting you might be new.

You can get back here again some day by

  • using File->Load and the "Delete" button to delete all your connections
  • hitting "Submit" and powering through the warnings
  • refreshing the SPARQLgraph page

Before you start

You're connected to a virtuoso graph running on this AWS server. If you run delete queries or insert data, all users will see it. If someone else has deleted or otherwise mucked up the graph, you'll have to wait until tomorrow after the site has completed its daily refresh. If this is the case, try out the "Hello World" demo using your own graph name instead.

Connection is not saved locally. Do you want to save it?

  • Cancel - don't choose this or the demo will disappear
  • Don't Save - if you don't save it and you never save anything else, this demo will appear each time you visit
  • Save - the demo will stop popping up when you visit

Execute a query

There is a connection and a nodegroup pre-loaded. Some data has been pre-loaded too. You can execute the query by:

  • click the lucky horseshoe magnet in the upper-right to layout the nodegroup. Drag back any nodes that slip away.
  • hit "Run"
  • Look in the "> Results" pane at the bottom

View and modify the query

This sent the nodegroup for processing as a "select distinct" query. You can also look at the query by opening the "> Query" pane. You may edit the query and then use that pane's "Run" button to execute raw SPARQL.

You may want to choose "count" from the "query" dropdown in the top pane to see how the SPARQL changes. "delete" and "construct" won't on this nodegroup yet.

Modify the nodegroup

Let's just start over and create something:

  • press the "Clear" button at the top right
  • type "Test" into the search box at the top left
  • drag "Test" onto the canvas
  • click on "testNum", this is one of the properties of a Test
  • in the dialog that pops up, just make sure "return" is checked, and hit "Submit"
  • Now hit "Run", and you'll see there is only one Test loaded. It is #4242.

Now let's query for measurements:

  • type "Measurement" into the search box
  • notice there are a few classes containing this name. Drag "MeasurementValue" onto the canvas.
  • SPARQLgraph did some path-finding. Drag those boxes around until it looks nice
  • let's see what variableNames have been collected by clicking "variableName" inside "?Measurement"
  • inside the dialog, hit "Suggest Values": there are two variable names.
  • choose temperature, and a VALUES clause is generated. Now hit Submit.
  • in order to get the values and timestamps, hit "hasValue" and "timestamp" under ?MeasurementValue, and simply hit "Submit" as just opening the dialog automatically selects "return"
  • hit "Run"

The results show all 9 of the values and timestamps.

Saving

If you create a nodegroup you want to save and reuse, use "Nodegroup->download" to get the json file. This can be dragged back onto the canvas later.

You could also use "Nodegroup->Save to store..." but remember this is a public demo with no permissions, so anyone could use "Nodegroup->Delete from store..." and you'd be out of luck. However, in real life uses, nodegroups saved to the store would be available to users and applications to execute by name.

Runtime constraints

To see how runtime constraints work:

  • click on "variableName" again (inside ?Measurement)
  • remove the VALUES clause manually, or using the "Clear" button
  • check "return" and "runtime constrained" before hitting "Submit"
  • now hit "Run"
  • you'll get an extra dialog asking how to constrain "variableName"
  • keep "="
  • use the ">>" button to allow SPARQLgraph to find all valid variable names
  • choose one or both and continue running

This demonstrates how applications often use stored SELECT queries.

More

If you'd like to experiment further, consider the "Hello World" demo using your own graph name for the connection step. Then you can ingest data and try DELETE queries without disturbing this graph.