Wolfram Language

SPARQL Update

SPARQL Update is an update language for RDF (Resource Description Framework) datasets. Version 12 introduces support for updating an in-memory RDFStore object or a remote SPARQL endpoint. The update request can be given either as an update string or as a symbolic update specification.

Update an in-memory RDFStore object about planets, first using an update string, then using a symbolic update specification. To begin, load GraphStore and store an RDFStore object containing example data about planets in a variable.

Find all planets using SPARQLQuery.

Change the type of "Pluto" using SPARQLUpdate.

Add a "volume" property by computing its value from the "radius" using a symbolic update specification: First, define a pattern to find the "radius" of objects in the store, then create a triple template which isafter substituting variablesto be inserted. Then apply the SPARQLInsert operator to the store.

Finally, create a Dataset from data in the store.

Related Examples

de es fr ja ko pt-br zh