1

I am a complete new-be to Blazegraph and Wikidata, so, please forgive the potential triviality of my question.

I have installed Blazegraph (followed instructions here ) on a Google Cloud (GC) instance. The installation went through without any problems. I also have ran runBlazegraph.sh successfully followed by an equally successful running of the munge.sh and loadRestAPI.sh scripts. All went through without errors (the loading is still underway though I'm not expecting any errors). I'm loading wikidata's latest dump to my Blazegraph instance. While loading is running, I would like to do a sanity check by running a simple query to see if there's any data in the database.

What I did first was to go to the GUI using this link: http://localhost:9999/bigdata/#query and run a simple query like:

select * where { ?s ?p ?o } LIMIT 100

However, the query returns an empty result. Note that I had to tunnel to the GC machine in order to view the GUI. (query results picture)

Thinking that perhaps I'm using the wrong URI, or maybe tunnelling to the GC machine is messing things up, I tried to run things on the GC machine itself. I also changed the URI so as to use the proper namespace (wdq in my case). I executed a Curl command like:

curl -G http://localhost:9999/bigdata/namespace/wdq/sparql --data-urlencode 'query=SELECT * { ?s ?p ?o } LIMIT 100' -H 'Accept:application/sparql-results+json'

This got me another empty result set.

Using the Python pymantic library as below wouldn't help either:

from pymantic import sparql
server = sparql.SPARQLServer('http://127.0.0.1:9999/bigdata/namespace/wdq/sparql')
result = server.query("select * where { ?s ?p ?o } limit 100")

I think I'm doing something wrong here. I don't get any errors, but I'm not getting any results either. My questions is:

  1. Maybe this is happening because the load process hasn't finished loading yet?

  2. Or perhaps it is because I'm using the wrong URI (http://localhost:9999/bigdata/#query). If this is the case, what would be the right one?

  3. Being a new-be in Blazegraph and Wikidata, maybe I've got it all wrong, in which case I would appreciate a link to a complete step-by-step setup guide.

Vistas
  • 41
  • 4
  • 1
    when you ran loadRestAPI.sh what namesake did you specify? you need to make sure your query is being run against the same namespace (goto the namespaces tab and pick use on the relevant one) – superfell Apr 09 '19 at 05:44
  • It might be that all the changes are being added in a single transaction and that they aren't available to be queried until the entire transaction is committed. – J Bellamy Apr 10 '19 at 10:37
  • @superfell, the namespace is wdq which is the correct one. I did ch ck it on the GUI, it’s in use. – Vistas Apr 10 '19 at 11:31
  • 1
    @J Bellamy , it looks like a single Curl command does all the upload, so, as you suggest, this might very well be an isolation load. It will take 10+ days for this data to load. I’ll have to wait until then to be able to confirm this, in which case I’ll come back here, explain it and then close the question. – Vistas Apr 10 '19 at 11:33
  • It looks like @J Bellamy was right. The load finished and I could successfully query the DB. How do I vote your answer up? (this was my first ever question in stackoverflow, I don't know the usual way with which folks upvote correct answers, sorry). – Vistas May 02 '19 at 01:00

0 Answers0