这是我尝试用“创建”日期填充空白的“发布于”日期的结果。
Virtuoso 37000 Error SP031: SPARQL compiler: Variable 'entity' is not allowed in a constant clause
SPARQL query:
define sql:big-data-const 0
#output-format:text/html
define sql:signal-void-variables 1
INSERT DATA {
GRAPH <http://mysite.eu/collection/published> {
?entity <http://mysite.eu/collection/published-at> ?created
WHERE {
SELECT ?entity ?created WHERE {
GRAPH <http://mysite.eu/collection/published> {
{
?entity <http://purl.org/dc/terms/issued> ?created .
OPTIONAL { ?s <http://mysite.eu/collection/published-at> ?published . }
FILTER(!bound(?published))
}
}
}
}
}
}
这里出了什么问题? 提到的常量子句是什么意思? 如何修复它?
编辑1:
我使用更简单的查询也会出现类似的错误,如下所示:
Virtuoso 37000 Error SP031: SPARQL compiler: Variable 'o' is not allowed in a constant clause
SPARQL query:
define sql:big-data-const 0
#output-format:text/html
define sql:signal-void-variables 1
DELETE DATA {
GRAPH <http://mysite.eu/collection/published> {
<http://data.europa.eu/w21/33598e9e-2654-4639-9528-d70772837ce4> <http://mysite.eu/collection/published-at> ?o
}
}
编辑 2:DELETE 查询工作正常,如下所示:
DELETE WHERE {
GRAPH <http://mysite.eu/collection/published> {
<http://data.europa.eu/w21/33598e9e-2654-4639-9528-d70772837ce4> <http://mysite.eu/collection/published-at> ?o
}
}