-2

I set up a local instance of wikibase following this guide.

Now at http://localhost:8282 I can access a SPARQL interface which look very much like https://query.wikidata.org/ – good.

However, there seems to be no "preinstalled" data in my local instance, which is very reasonable.

To actually experiment how to add, remove and change data, I would like to copy a tiny fragment of the actual wikidata to my own instance. A particular task would be to get the cats-example to return at least some matching records.

How can I do this?

cknoll
  • 2,130
  • 4
  • 18
  • 34

1 Answers1

0

Here is a query to get RDF data:

CONSTRUCT { ?item wdt:P31 wd:Q146 ;
                  rdfs:label ?itemLabel ;
                  skos:altLabel ?itemAltLabel ;
                  schema:description ?itemDescription .
          }
WHERE 
{
  ?item wdt:P31 wd:Q146.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Wikidata UI shows it as a table of triples "subject", "predicate", "object".

If you send the query to the SPARQL endpoint, you get back RDF data directly. (e.g. see question 66968955)

AndyS
  • 16,345
  • 17
  • 21
  • This seems to be the in the right direction. However, I still do no know what exactly should I do with the result of [this query](https://query.wikidata.org/#CONSTRUCT%20%7B%20%3Fitem%20wdt%3AP31%20wd%3AQ146...). I can download it in various formats but how can I insert it in *my* local wikibase instance? – cknoll Apr 06 '21 at 18:25