SPARQL DELETE 查询错误:解析时出现 EOF

发布于 2025-01-03 14:57:04 字数 1100 浏览 5 评论 0原文

我正在尝试使用以下查询删除一些三元组:

deleteQuery = """DELETE { ?a ?b ?c } WHERE { mynamespace:List mynamespace:Item ?c. ?a ?b ?c }"""

我的命名空间已经定义,所以这不是问题。 我不确定我是否使用了正确的查询语法。 当我发出查询时,我收到此错误:

400 EOF while parsing。 预计终端: (前缀描述总和相关性选择平均值修改插入中位数 加载询问构造清除计数统计数据删除)。 回溯(最近一次调用最后一次): 文件“”,第 1 行,在中 文件“triple_store_methods_v2.py”,第 40 行,在查询中 myResults = myTupleQuery.evaluate() 文件“/usr/local/agraph-fse-3.3/python/franz/openrdf/query/query.py”,第 358 行,在评估中 响应= self.evaluate_generic_query() 文件“/usr/local/agraph-fse-3.3/python/franz/openrdf/query/query.py”,第239行,在evaluate_generic_query中 checkVariables=self.checkVariables,接受=接受) 文件“/usr/local/agraph-fse-3.3/python/franz/miniclient/repository.py”,第 80 行,在 evalSparqlQuery 中 接受=接受) 文件“/usr/local/agraph-fse-3.3/python/franz/miniclient/request.py”,第 114 行,在 jsonRequest 中 否则:引发RequestError(状态,正文) franz.miniclient.request.RequestError:服务器在解析时返回400:EOF。 预计终端: (前缀描述总和相关性选择平均值修改插入中位数 加载询问构造清除计数统计数据删除)。

我不明白我做错了什么。顺便说一下,我使用的是 AllegroGraph 3.3。

I'm trying to delete some triples using this query:

deleteQuery = """DELETE { ?a ?b ?c } WHERE { mynamespace:List mynamespace:Item ?c.
?a ?b ?c }"""

My namespace is already defined, so that's not an issue.
I'm not sure if I am using the correct syntax for the query though.
When I issue the query I get this error:

400 EOF while parsing.
Expected terminals:
(prefix describe sum correlation select average modify insert median
load ask construct clear count stats delete).
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "triple_store_methods_v2.py", line 40, in query
myResults = myTupleQuery.evaluate()
File "/usr/local/agraph-fse-3.3/python/franz/openrdf/query/query.py", line 358, in evaluate
response = self.evaluate_generic_query()
File "/usr/local/agraph-fse-3.3/python/franz/openrdf/query/query.py", line 239, in evaluate_generic_query
checkVariables=self.checkVariables, accept=accept)
File "/usr/local/agraph-fse-3.3/python/franz/miniclient/repository.py", line 80, in evalSparqlQuery
accept=accept)
File "/usr/local/agraph-fse-3.3/python/franz/miniclient/request.py", line 114, in jsonRequest
else: raise RequestError(status, body)
franz.miniclient.request.RequestError: Server returned 400: EOF while parsing.
Expected terminals:
(prefix describe sum correlation select average modify insert median
load ask construct clear count stats delete).

I don't understand what I'm doing wrong. By the way, I am using AllegroGraph 3.3.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

命硬 2025-01-10 14:57:04

据我猜测,Allgegrograph(至少 3.3 版)尚不支持 SPARQL 更新。

At a guess, I'd say that Allgegrograph (at least version 3.3) does not yet support SPARQL update.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文