Despite being allowed by the the SPARQL 1.1 Update language, Virtuoso doesn’t allow to insert statements containing blank nodes using the
INSERT DATA update query. Oddly enough, when using the
INSERT update query it is possible to add statements with blank nodes. Unfortunately in this case a
WHERE clause has to be specified. So what is needed is a
WHERE clause which returns a non-empty result in all circumstances to ensure insertion of the statements. Here is a rather hacky solution to accomplish this problem:
To get a non-empty result set at any price just use a nested
SELECT query with an optional triple selection limited to one result. This guarantees the execution of the
INSERT clause. Happy inserting of blank nodes.
Head over to GitHub to follow this issue.