sparqlsemanticsdbpediavirtuosofederated-queries

Federated dbpedia query timeouts with offset > 1000


At this endpoint http://spcdata.digitpa.gov.it:8899/sparql I have a list of all italian municipalities. I want to fetch the population data for every muncipality from dbpedia, and I'm using the owl:sameAs property as a pointer to dbpedia .

In this question you can find the query I'd like to use. Unfortunately, this query times out roughly over a LIMIT 1500 clause, so I guessed paginating results using an offset was the best solution. Unfortunately, this query

PREFIX pa:  <http://spcdata.digitpa.gov.it/> 
PREFIX rdf: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbp: <http://dbpedia.org/ontology/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT * WHERE {
  ?s a pa:Comune .
  ?s rdf:label ?label .
  ?s owl:sameAs ?sameAs .
  SERVICE <http://dbpedia.org/sparql> { 
    ?sameAs dbp:populationTotal ?populationTotal .
   }

} LIMIT 10 offset 6000

causes the endpoint to timeout. I've tried with different OFFSET values, and below 1000 it works nicely, problems start to arrive when offsetting 1000 and beyond.

What could I do for retrieving all the results? I've tried with the dbpedia endpoint, but seems that federating requests to http://spcdata.digitpa.gov.it:8899/sparql is forbidden.

Many thanks!


Solution

  • try setting the timeout explicitly, as a query parameter.

    the request completed successfully (with timeout=600000 and should-sponge=grab-all)

    you can set both parameters also manually from the sparql mask, the should-sponge parameter is represented as retrieve all missing remote RDF data that might be useful in the html select.