I've created a TripleStore and loaded several named graphs as part of an ETL job (the number of graphs can vary), but when I try to make DELETE/INSERT update operations and serialize the resulting dataset to N-Quads, then there are no changes made to the data. I want to enrich the data in the named graph(s) with additional statements that are inserted to the same named graph(s). Here follows an example procedure that should insert an extra statement for each triple matching the pattern ?s a ?o into the same named graph:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH ?g {
?s a rdfs:Resource .
}
}
WHERE {
GRAPH ?g {
?s a ?o .
}
}
I have read the SPARQL Datasets page and it appears it may be necessary to use USING NAMED to specify the graphs over which the WHERE operates, but it is unclear why the dataset from the store is not used.
Is there any way to do this without enumerating each graph name in a USING NAMED clause? Otherwise, is it possible to use a SPARQL Parameterized String to mint such an update?
I ran the update procedure and no statements in the store were modified.
The query looks perfectly good. Which repo gives you trouble?
If you need to use fixed graphs then:
USINGonly specifies where to get data from.WITHspecifies also which graph to modify. See https://www.w3.org/TR/sparql11-update/#deleteInsert