jtr*_*man 1 curl rdf sparql postman amazon-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
Run Code Online (Sandbox Code Playgroud)
是否不支持 CLEAR 和 DELETE 查询?或者海王星是否有另一种清除实例中的图形的方法。
谢谢
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 does support CLEAR and DELETE. CLEAR and DELETE are UPDATE operations, so you can do them in two ways:
1) Use "update=" in the request params
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.
Run Code Online (Sandbox Code Playgroud)
2) Use Content-Type Header (application/sparql-update) and use the query directly in request params.
curl http://endpoint:8182/sparql -H "Content-Type: application/sparql-update" -d "DELETE DATA { <http://x> <http://y> <http://z> }”
Run Code Online (Sandbox Code Playgroud)
It looks like you tried a mix of both, and possibly got the combination incorrect. Neptune is fully SPARQL 1.1 compliant, so if you see something to not be working, do let us know. In almost all cases, the request would not have adhered to the SPARQL HTTP spec.
归档时间: |
|
查看次数: |
579 次 |
最近记录: |