我想在Sparql中向rdf添加数据
我正在尝试使用SPARQL更新一些数据。以下是原始数据的外观:我想在Sparql中向rdf添加数据,sparql,virtuoso,Sparql,Virtuoso,我正在尝试使用SPARQL更新一些数据。以下是原始数据的外观: <http://dbpedia.org/resource/Switzerland#1 > <http://www.w3.org/2000/01/rdf-schema#label > "1"@ja ; <http://linkdata.org/property/rdf1s2307i#num > "1"@ja ; <http://learningsparql.com/ns/ad
<http://dbpedia.org/resource/Switzerland#1 >
<http://www.w3.org/2000/01/rdf-schema#label > "1"@ja ;
<http://linkdata.org/property/rdf1s2307i#num > "1"@ja ;
<http://learningsparql.com/ns/addressbook#code > "1234"@ja .
“1”@ja;
“1”@ja;
“1234”@ja。
以下是我希望数据在更新后的外观:
<http://dbpedia.org/resource/Switzerland#1 >
<http://www.w3.org/2000/01/rdf-schema#label > "1"@ja ;
<http://linkdata.org/property/rdf1s2307i#num > "1"@ja ;
<http://learningsparql.com/ns/addressbook#code > "1234"@ja ;
<http://learningsparql.com/ns/addressbook#name > "taro"@ja .
“1”@ja;
“1”@ja;
“1234”@ja;
“芋头”@ja。
我试图使用一个查询,但最终返回了一个错误。以下是我得到的查询和错误:
PREFIX schema: <http://www.w3.org/2000/01/rdf-schema# >
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos# >
PREFIX ab: <http://learningsparql.com/ns/addressbook# >
PREFIX res: <http://www.w3.org/2000/01/rdf-schema# >
INSERT DATA{
GRAPH <http://ddd.test/addressbook> { ab:name "taro" . }
}
前缀模式:
前缀geo:
前缀ab:
前缀res:
插入数据{
图{ab:name“taro.”
}
SQLState:22023消息:SR007:Function exec_元数据需要字符串
或作为参数1为NULL,而不是类型为数组\u或\u指针(193)的参数
两件事:
插入数据时
确保您的语句是三元组。您只使用了一个谓词和一个对象PREFIX schema: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX ab: <http://learningsparql.com/ns/addressbook#>
PREFIX res: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA{
GRAPH <http://ddd.test/addressbook> {
<http://dbpedia.org/resource/Switzerland#1> ab:name "taro" .
}
}
前缀模式:
前缀geo:
前缀ab:
前缀res:
插入数据{
图表{
ab:名字叫“芋头”。
}
}
两件事:
插入数据时
确保您的语句是三元组。您只使用了一个谓词和一个对象PREFIX schema: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX ab: <http://learningsparql.com/ns/addressbook#>
PREFIX res: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA{
GRAPH <http://ddd.test/addressbook> {
<http://dbpedia.org/resource/Switzerland#1> ab:name "taro" .
}
}
前缀模式:
前缀geo:
前缀ab:
前缀res:
插入数据{
图表{
ab:名字叫“芋头”。
}
}
Joshua Taylor san>我让你修复了一个肮脏的写作风格,谢谢你。Anthony Hughes san>非常感谢你的精确解释!这很容易理解。我很感激。约书亚·泰勒·桑>我让你修复了一种肮脏的写作风格,谢谢你。安东尼·休斯·桑>非常感谢你的精确解释!这很容易理解。我很感激。