MaRDI4NFDI / portal-compose

docker-composer repo for mardi
https://portal.mardi4nfdi.de
GNU General Public License v3.0
3 stars 1 forks source link

Create person profiles #390

Closed physikerwelt closed 8 months ago

physikerwelt commented 10 months ago

Describe the issue

SELECT (COUNT(*) as ?Triples) WHERE { ?item wdt:P31 wd:Q57162}

- [x] Create list with Person, Person name
```SPARQL
PREFIX wdt: <https://portal.mardi4nfdi.de/prop/direct/>
PREFIX wd: <https://portal.mardi4nfdi.de/entity/>
SELECT ?item ?itemLabel
WHERE { ?item wdt:P31 wd:Q57162 .
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
} 
LIMIT 5 OFFSET 1000

done via subquery. This was actually a novel idea documented nowhere.

PREFIX wdt: <https://portal.mardi4nfdi.de/prop/direct/>
PREFIX wd: <https://portal.mardi4nfdi.de/entity/>

SELECT ?item ?itemLabel
WHERE
{
  {
  SELECT ?item
  WHERE { ?item wdt:P31 wd:Q57162 .}
  ORDER by ?item
  LIMIT 5 offset 100000
  }
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}

subtask of https://github.com/MaRDI4NFDI/MaRDIRoadmap/issues/19

physikerwelt commented 10 months ago

@Daniel-Mietchen do you know by chance how to work around the timeout in SPARQL, I tried limit and offset, but the larger the offset gets the slower the query is.

Daniel-Mietchen commented 10 months ago

@physikerwelt

SPARQL optimization is generally query specific but here are some general ways to address the problem:

physikerwelt commented 10 months ago

All pages have been created, however, some pages have errors.