Page MenuHomePhabricator

SPARQL queryes for test.wikidata are not implemented
Closed, DeclinedPublic

Description

I added mylang='test' to the user-config file in pywikibot , then when I run SPARQL queries using pagegenerator:

sparql = "SELECT ?item WHERE { ?item rdfs:label '%s'@en }" % val 
entities = pagegenerators.WikidataSPARQLPageGenerator(sparql,site=pywikibot.Site())

I found out that the results are from www.wikidata and not test.wikidata
I think this better be fixed so people can develop on test.wikidata without ruing www.wikidata

Event Timeline

I don't think there is a Wikidata-Query-Service with the data from test.wikidata yet.

Is it a big thing to add wikidata-query-service to test.wikidata ?
maybe I can do that?
Anyway, I think that until it is implemented , pagegenerator should through exception if the site is test.wikidata and not return the www.wikidata items, this is buggy

To make it work for test we would need:

  1. Obviously, a separate server to serve it
  2. Dump of test wiki data

It is possible, but it does not exist currently and I'm not sure how important it is to create it. If somebody takes on themselves to do it, I will be glad to advise, though personally I'm not sure I'll have much time for actually doing anything there anytime soon, at least unless the priority of it raises drastically.

Also, you can not ruin wikidata by running SPARQL queries alone. You can of course get confusing (and potentially wrong) results if you run queries against query.wikidata.org but then run API against test.

Yes it should get that information from the key wikibase-sparql in the result of https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&siprop=general . On test.wikidata that key does not exist, then it should probably throw an exception or return an error in some way.

What are you trying to do that isn't possible with the current setup? It is quite some work to make this second setup happen for what is basically garbage data. So I am inclined to close this.

I think the problem is that if someone add 'mylang=test' in his user-config file, then he expect to either get the query results of the test site or at list get an exception telling him that it is not implemented. What happen now is that the user get the www.wikidata results but he thinks the results are from test.wikidtat. This is a misleading bug.

I don't think we have plans to implement the service for test.wikidata, so closing this one.