Pierre De Wilde wrote: > Hi, > It seems possible to call SQL from SPARQL as referenced in doc 'Calling SQL > from SPARQL' (ยง15.2.5). > Have you some examples? Is it possible to call statements > like backup_online('backup_#', 10000); from a SPARQL endpoint? >
Well, I can give you a different example off the top of my head: create procedure db.dba.removegraphsmatching (in pattern varchar) { declare r1, r2 integer; r1:=(select count(*) from db.dba.rdf_quad where id_to_iri (G) like pattern); delete from db.dba.rdf_quad where id_to_iri (G) like pattern; r2:=(select count(*) from db.dba.rdf_quad where id_to_iri (G) like pattern); return r1-r2; }; sparql select ?g ?s ?p ?o WHERE { GRAPH ?g { ?s ?p ?o . } filter sql:removegraphsmatching ( 'pattern%' ) }; The important thing to note is that the stored procedure in question must be in the db.dba schema/space. Shouldn't be hard to make the sp do something less destructive :) HTH, ~Tim -- Tim Haynes OpenLink Software <http://www.openlinksw.com/>