清除 AWS Neptune 中的数据
Clear data in AWS Neptune
我正在尝试 运行 简单的 CLEAR 和 DELETE SPARQL 查询并继续返回:
Malformed query: Encountered \" \"clear\" \"CLEAR \"\" at line
1, column 1.\n Was expecting one of:\n \"base\" ...\n \"prefix\"
...\n \"select\" ...\n \"construct\" ...\n \ "describe\" ...\n \"ask\" ...\n
是否不支持 CLEAR 和 DELETE 查询?或者 Neptune 是否有另一种方法来清除实例中的图形。
谢谢
Word of Caution: The answer contains examples to DELETE all your data,
so be extra careful when you execute these queries in your database.
Neptune 支持 CLEAR 和 DELETE。 CLEAR 和 DELETE 是 UPDATE 操作,因此您可以通过两种方式进行操作:
1) 在请求参数中使用"update="
curl http://endpoint:8182/sparql -d "update=DELETE DATA { <http://x> <http://y> <http://z> }”
OR
curl http://localhost:8182/sparql -d "update=DELETE WHERE { ... }”
You can use a similar one for CLEAR.
2) 使用 Content-Type Header (application/sparql-update) 并直接在请求参数中使用查询。
curl http://endpoint:8182/sparql -H "Content-Type: application/sparql-update" -d "DELETE DATA { <http://x> <http://y> <http://z> }”
您似乎尝试了两者的组合,但可能组合不正确。 Neptune 完全符合 SPARQL 1.1 标准,所以如果您发现有什么不正常的地方,请告诉我们。在几乎所有情况下,请求都不会遵守 SPARQL HTTP 规范。
我正在尝试 运行 简单的 CLEAR 和 DELETE SPARQL 查询并继续返回:
Malformed query: Encountered \" \"clear\" \"CLEAR \"\" at line
1, column 1.\n Was expecting one of:\n \"base\" ...\n \"prefix\"
...\n \"select\" ...\n \"construct\" ...\n \ "describe\" ...\n \"ask\" ...\n
是否不支持 CLEAR 和 DELETE 查询?或者 Neptune 是否有另一种方法来清除实例中的图形。
谢谢
Word of Caution: The answer contains examples to DELETE all your data, so be extra careful when you execute these queries in your database.
Neptune 支持 CLEAR 和 DELETE。 CLEAR 和 DELETE 是 UPDATE 操作,因此您可以通过两种方式进行操作:
1) 在请求参数中使用"update="
curl http://endpoint:8182/sparql -d "update=DELETE DATA { <http://x> <http://y> <http://z> }”
OR
curl http://localhost:8182/sparql -d "update=DELETE WHERE { ... }”
You can use a similar one for CLEAR.
2) 使用 Content-Type Header (application/sparql-update) 并直接在请求参数中使用查询。
curl http://endpoint:8182/sparql -H "Content-Type: application/sparql-update" -d "DELETE DATA { <http://x> <http://y> <http://z> }”
您似乎尝试了两者的组合,但可能组合不正确。 Neptune 完全符合 SPARQL 1.1 标准,所以如果您发现有什么不正常的地方,请告诉我们。在几乎所有情况下,请求都不会遵守 SPARQL HTTP 规范。