Hi,
I¹ve just spotted that for every SPARQL UPDATE query in the form:
DELETE ..
INSERT ..
WHERE ..
where in the where clause we¹re asking for blank nodes and combine the
triples¹ templates with UNION,
Fuseki produces a lot of warning messages about unbound quads.
For instance, for the query:
DELETE {
graph <http://test.com/graphs/graphs> { ?b0 void:triples ?triples0 . }
graph <http://test.com/graphs/graphs> { ?b1 void:triples ?triples1 . }
} INSERT {
graph <http://test.com/graphs/graphs> { ?b0 void:triples 5 . }
graph <http://test.com/graphs/graphs> { ?b1 void:triples 2 . }
} WHERE {
{ graph <http://test.com/graphs/graphs> { <http://test.com/graphs/someterms>
void:propertyPartition ?b0 .
?b0 void:property <http://xmlns.com/foaf/0.1/familyName> .
?b0 void:triples ?triples0 . }
} union
{ graph <http://test.com/graphs/graphs> { <http://test.com/graphs/someterms>
void:propertyPartition ?b1 .
?b1 void:property <http://xmlns.com/foaf/0.1/name> .
?b1 void:triples ?triples1 . }
} }
the following warnings are being generated:
WARN TemplateLib :: Unbound quad: <http://test.com/graphs/graphs>
?b1 <http://rdfs.org/ns/void#triples> ?triples1
WARN TemplateLib :: Unbound quad: <http://test.com/graphs/graphs>
?b0 <http://rdfs.org/ns/void#triples> ?triples0
WARN TemplateLib :: Unbound quad: <http://test.com/graphs/graphs>
?b1 <http://rdfs.org/ns/void#triples> 2
WARN TemplateLib :: Unbound quad: <http://test.com/graphs/graphs>
?b0 <http://rdfs.org/ns/void#triples> 5
Interestingly enough, despite the warnings, query is being executed
correctly.
So, shall I bother ? Or just leave with it ?
It seems that if we split the query into multiple ones (so that UNION is no
longer necessary in WHERE clause) then the warnings disappear.
But then, can I be sure that those multiple queries, if sent in one POST
request to Fuseki, are being executed in a single transaction, i.e. that
either all of them fail or success ?
Kind regards,
Rafal Ozga
********************************************************************************
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and
attachments (if any). No contracts may be concluded on behalf of Macmillan
Publishers Limited or its agents by means of e-mail communication. Macmillan
Publishers Limited Registered in England and Wales with registered number
785998
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
********************************************************************************