首页 文章

有关Cloud GraphDB的问题

提问于
浏览
2

我正在开发一个项目,我需要一个支持SPARQL查询的 Cloud 中的三重存储数据库 .

  • GraphDB看起来不错,在我的桌面计算机(localhost)中工作正常 . 但是,当我尝试在 Cloud 中使用它时( CloudDB ),REST请求不起作用 .

问题:我正在尝试使用REST查询我的存储库,方法是 curl -X GET --header 'Accept: application/sparql-results+xml' .

存储库ID: hermesiot

Query: select * where {?s ?p ?o .} limit 100

Results:

回复代码: 404

回应机构: {"message":"Database not found."}

  • 如何在 Cloud 解决方案中使用_DB41101_ GraphDB,如Azure或其他免费解决方案?

非常感谢 :)

1 回答

  • 2

    根据official example,您的查询应该是这样的:

    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'
    

    但是,上面的查询对我不起作用,而下面的查询执行:

    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实例地址 .

    访问信息中心中的标签,以获取这些参数的适用值 .

    dashboard


    至于更新查询,请参阅e . G . this answer . 您的查询应该是:

    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'
    

    请注意,此请求中的 endpoints 地址不同 .

相关问题