Sparql插入数据不起作用 [英] Sparql insert data not working
问题描述
我是Sparql的新手,但是我什至无法进行简单的插入数据查询,或者看起来如此.
I'm a newbie to Sparql, but I am unable even to make a simple insert data query, or so it seems.
我正在使用Apache Fuseki作为工作服务器;我在一个图形中,正在尝试使此查询起作用:
I'm using Apache Fuseki as working server; I'm in a graph, and I'm trying to make this query work:
PREFIX oa: <http://www.w3.org/ns/oa#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA{
[ a
oa:Annotation ;
rdfs:label "Title";
] .
}
但这与我做什么无关紧要,我不断收到此错误:
But it doesn't matter what I do, I keep getting this error:
错误400:SPARQL查询:没有"query ="参数
Error 400: SPARQL Query: No 'query=' parameter
这甚至是一个简化的代码,我尝试了许多更复杂的查询,但是结果没有改变...
This is even a semplified code, I tried many queries even more complex, but the result doesn't change...
推荐答案
在SPARQL中,查询和更新是不同的操作.在Fuseki中,它们驻留在不同的端点上(因此查询比更新更易于访问).
In SPARQL, query and update are different operations. In Fuseki, they reside on different endpoints (so query can be be more widely accessible than update).
您正在调用查询端点(通常是.../query
或.../sparql
);您需要调用更新(.../update
).
You are calling the query endpoint (.../query
or .../sparql
usually) ; you need to call the update (.../update
).
这篇关于Sparql插入数据不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!