DGT
DGT

Reputation: 2654

delete rdf graph data

I'm new to sparql. Can anyone tell me how I can delete an rdf graph data (eg: http://mylocalhost.com/owl/file.owl) in virtuoso. Following is how I created it:

db.dba.rdf_load_rdfxml_mt(file_to_string_output('/data/file.owl'), '', 'http://example.com/file.owl');

I did the sparql clear graph <uri> and sparql drop graph <uri>, but didn't work. Many thanks in advance

Upvotes: 2

Views: 2936

Answers (2)

MFARID
MFARID

Reputation: 720

Notice that clearing the graphs does not necessarily free up space. You will notice that the main virtuoso.db file size may remain the same after the deletion.

If you need to delete all the RDF triples (start a clear database), you can delete (or rename) the db folder that virtuoso operates on.

Restart virtuoso, and you will notice that it will create a clean database.

It is a hacky way, but works well!

Upvotes: 2

Steve Harris
Steve Harris

Reputation: 3660

Note that CLEAR GRAPH, and DROP GRAPH are SPARQL Update operations, so you might need to use a different method, or endpoint, I'm not familiar with how Virtuoso works.

Upvotes: 2

Related Questions