Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Help?
Location: / Dashboard / Main / VirtTipsAndTricksGuide / VirtTipsAndTricksDeleteSpecificTriplePatternAcrossGraphs

How Can I Delete a Specific Triple Across Graphs?

Suppose the following situation:

  • There is a specific triple somewhere in a massive dataset in a Virtuoso DBMS.
  • There are too many possible named graphs associated with the pattern so SPARQL DELETE (which requires FROM i.e., Named Graph scoping) isn't adequate.
What is the solution?

Using SQL you can execute the following:

SQL> SPARQL
DELETE FROM rdf_quad 
WHERE s = iri_to_id ('http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen') 
  AND o = iri_to_id ('http://purl.org/ontology/bibo/Document') 
  AND p = iri_to_id ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type');

Related

Powered By Virtuoso