dice-group / Squirrel

Squirrel searches and collects Linked Data
Other
23 stars 19 forks source link

Check if graph exists, before sending triples to SparqlEndpoint #112

Closed gsjunior86 closed 5 years ago

gsjunior86 commented 5 years ago

In the SparqlSink, it is necessary the check if the graph exists before updating. If it is not, create a graph, according to SPARQL 1.1 especification

MichaelRoeder commented 5 years ago

https://www.w3.org/TR/2013/REC-sparql11-update-20130321/#create

gsjunior86 commented 5 years ago

This issue is related with Bland Nodes insertion with SPARQL 1.1 on virtuoso7, which allows Blank Nodes only if the graph already exists (this problem does not happen on Fuseki).

It is solved based on this comment : https://github.com/openlink/virtuoso-opensource/issues/126#issuecomment-66315349, adding the where clausule with { SELECT * {OPTIONAL {?s ?p ?o} } LIMIT 1 }