-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--sparql-endpoint / -e for http://localhost:8989/bigdata/sparql (custom Wikibase instance) returns data from Wikidata #45
Comments
Answering my own question, it does indeed rely on properties, but we are given options for mapping those properties to our own instances:
And these are required if you're using a Wikibase instance. However, this still doesn't resolve my problem - I'm still getting results back from Wikidata instead of the Wikibase instance. So on my Wikibase instance, where the WD property P279 maps to P297, and WD P31 maps to P28, and WD P1709 maps to P251, the following request:
generates the following query:
And if I run that query against my instance, I get the expected results for the partial import of human/person on my instance (just the top few lines included for space):
However, if I drop the
Instead of seeing the hierarchy for Q46 ('human') from my instance, I am instead shown the taxonomy for Q46 ('Europe') drawn from Wikidata--clearly using the property mappings that break the hierarchy:
So, still trying to figure out why the |
Thanks for notification - actually I've never tested the |
Thanks, that appears to connect properly to the SPARQL endpoint, so this specific issue can be closed. However, it never returns any results, which should probably be the subject of a new issue. My suspicion is that is because the default namespace for Wikibase is http://wikibase.svc/ but lib/query.js hardcodes http://www.wikidata.org/; similarly lib/query.js has a hardcoded reference to P31, lib/serialize.js refers to http://www.wikidata.org/entity/P31 for occurrence counts, and lib/mappings.js also has a number of hardcoded relational P-ids. It seems like adapting this wonderful tool to truly support Wikibase would require a fair bit of change to support all of the required mappings dynamically (either at the command line or by passing in a file of the mappings). Perhaps that's not feasible in the short term. |
Thanks again, I should better try with a Wikibase instance of my own. Your analysis is correct, to fix this it requires:
And options should better be read from config file (#46) |
Running Wikibase locally, I can generate results via curl:
But trying to query the same endpoint with wikidata-taxonomy returns data from Wikidata instead:
I get the same result if I install wikidata-taxonomy globally with
npm install -g
It's late night so I'll toss a theory: does it implicitly depend on properties such as P279 existing in the target endpoint, and it falls back to Wikidata if the query to the specified endpoint doesn't return the expected data?
The text was updated successfully, but these errors were encountered: