1

I accidentally created a graph with a name that begins with < and ends with >.

If I try to clear the graph from the Virtuoso server by --

clear graph <graph_name>

-- or --

clear graph <<graph_name>>

-- or --

clear graph <\<graph_name\>>

-- it does not work. They all give similar errors:

*** Error 37000: [Virtuoso Driver][Virtuoso Server]SQ074: Line 1: SPARQL compiler, line 1: syntax error at '<' before '<graph_name>

TallTed
  • 9,069
  • 2
  • 22
  • 37
vds
  • 349
  • 1
  • 10

1 Answers1

3

< and > are illegal in URIs so the parser is going to get upset if used directly.

CLEAR can be thought of as a short form of DELETE so you can try:

DELETE { GRAPH ?g { ?s ?p ?o } }
WHERE { GRAPH ?g { ?s ?p ?o } 
        FILTER (str(?g) = '<graph_name>')
      }
AndyS
  • 16,345
  • 17
  • 21