关于Cloud + GraphDB的问题 [英] Questions about Cloud + GraphDB
问题描述
我正在一个项目上,我需要一个在云中的三层存储数据库,该数据库支持SPARQL查询.
I'm working on a project and i need a triple-store database in cloud, which support SPARQL queries.
-
GraphDB看起来不错,并且可以在我的台式计算机(localhost)上正常工作.但是,当我尝试在云中使用它( CloudDB )时,REST要求不起作用.
GraphDB looks good and works fine in my desktop computer (localhost). But, when I try to use it in the cloud (CloudDB), REST requisitions doesn't work.
问题:我正在尝试通过curl -X GET --header 'Accept: application/sparql-results+xml'
使用REST查询我的存储库.
Problem: I'm trying to query my repository using REST, by curl -X GET --header 'Accept: application/sparql-results+xml'
.
存储库ID:hermesiot
查询: select * where {?s ?p ?o .} limit 100
结果:
响应码:404
响应正文:{"message":"Database not found."}
如何在云解决方案(例如Azure或其他免费解决方案)中部署 GraphDB?
How to deploy GraphDB in cloud solutions, like Azure or another free solutions?
非常感谢:)
推荐答案
According to the official example, your query should be of this kind:
curl --header 'Accept: application/sparql-results+xml' \
--data "query=SELECT+*+{?s+?p+?o.}" \
--user s472kd733007:bhrfk1aa8o0qlj7 \
'https://rdf.s4.ontotext.com/4032537848/wikidata/repositories/fast'
但是,上面的查询对我不起作用,而下面的查询却对我有用:
However, the query above does not work for me, whereas the query below does:
curl --header 'Accept: application/sparql-results+xml' \
--data "query=SELECT+*+{?s+?p+?o.}" \
--user s472kd733007:bhrfk1aa8o0qlj7 \
'http://awseb-e-m-awsebloa-11laimnu18r2i-2106042490.eu-west-1.elb.amazonaws.com/4032537848/wikidata/repositories/fast'
在上面的查询中:
-
s472kd733007
-API密钥, -
bhrfk1aa8o0qlj7
-API密钥机密 -
4032537848
—用户ID -
wikidata
—数据库名称, -
fast
-存储库ID, -
http://awseb-e-m-awsebloa-...eu-west-1.elb.amazonaws.com
— AWS实例地址.
s472kd733007
— API key,bhrfk1aa8o0qlj7
— API key secret,4032537848
— user idwikidata
— database name,fast
— repository id,http://awseb-e-m-awsebloa-...eu-west-1.elb.amazonaws.com
— AWS instance address.
访问仪表板中的标签,以获得这些参数的适用值.
Visit tabs in your dashboard in order to obtain applicable values of these parameters.
关于更新查询,请参阅e. G. 此答案.您的查询应为:
As for update queries, see e. g. this answer. Your query should be:
curl --header 'Accept: application/sparql-results+xml' \
--data "update=INSERT+DATA+{owl:Nothing+owl:Nothing+owl:Nothing}" \
--user s472kd733007:bhrfk1aa8o0qlj7 \
'http://awseb-e-m-awsebloa-11laimnu18r2i-2106042490.eu-west-1.elb.amazonaws.com/4032537848/wikidata/repositories/fast/statements'
请注意,此请求中的端点地址不同.
Please note that endpoint address in this request is different.
这篇关于关于Cloud + GraphDB的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!