Questions about Cloud + GraphDB

2019-07-19 08:17发布

I'm working on a project and i need a triple-store database in cloud, which support SPARQL queries.

  1. 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.

    Problem: I'm trying to query my repository using REST, by curl -X GET --header 'Accept: application/sparql-results+xml'.

    Repository ID: hermesiot

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

    Results:

    Response Code: 404

    Response Body: {"message":"Database not found."}

  2. How to deploy GraphDB in cloud solutions, like Azure or another free solutions?

Many thanks :)

1条回答
放我归山
2楼-- · 2019-07-19 09:01

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'

In the queries above:

  • s472kd733007 — API key,
  • bhrfk1aa8o0qlj7— API key secret,
  • 4032537848 — user id
  • wikidata — 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.

dashboard


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.

查看更多
登录 后发表回答