Thanks for suggesting this. it has also helped me!
I did the following:
Start with a column of bare identifiers, in my case for the Wikidata P3638 property
Edit column > Add column by fetching URLs
Enter "https://hub.toolforge.org/P3638:" + value + "?format=json" to construct the URL, enter a column name, run and wait
Produces a new column with json, and then extract Q-ids using the following GREL: value.parseJson()['origin']["qid"] (note that your post above made the quotes curly, which doesnât work)
Reconcile Qids via Reconcile > Use values as identifiers; choose the Wikidata reconciliation service.
If someone knows how to do this with less steps (omitting the json generating and parsing would be so awesome)?
Maybe it should be a feature request â add menu option for a column to reconciliate values to Wikidata objects that has a specific property with those valuesâŚ
As we today have option use Use values as identifiersâŚ
Maybe it should be a feature request â add menu option for a column to reconciliate values to Wikidata objects that has a specific property with those valuesâŚ
That's exactly how identifier/key-based "reconciliation" used to work with Freebase, although it's not really a reconciliation operation since it can be done with a single direct lookup. A QID is just a specific instance of a strong identifier. OpenRefine should be able to do lookups against any unique strong identifier.
It is also possible to do it with the Wikidata reconciliation service, but the feature is very hidden: you need to first create a column of names for your entities (if you do not have names, you can input some arbitrary string as a placeholder) and then reconcile that column, with the other column of identifiers configured to match the identifier property.
There are some open issues about making that easier, such as:
@antonin_d Do you think we should document that feature under the Wikidata extension docs? Seems like itâs begging for a new section heading perhaps called âReconciling objects no matter their nameâ or something more appropriate on this page Reconciling with Wikibase | OpenRefine ?
@antonin_d Great, if you could quickly just type up a paragraph, then I can review and add more to it. The reason Iâm asking you first, is that I would do it myself, but I am struggling a bit to actually understand the workflow steps you mentioned above. Perhaps itâs just me being blind still to the âno name entitiesâ problem itself. Or maybe it should be called âmissing name entitiesâ. Dunno.
One feature I have been thinking of is the ability to âAdd column by fetching destination URLâ(final URL in a redirect chain). While this type of use case might not be its primary use case I could see it being useful here too.
The main use case I imagine would be to just update redirected URLs.
One feature I have been thinking of is the ability to âAdd column by fetching destination URLâ(final URL in a redirect chain). While this type of use case might not be its primary use case I could see it being useful here too.
The main use case I imagine would be to just update redirected URLs.
So you want the resolved destination URL, not its contents? Please create a feature request in the issue tracker. It seems like perhaps this could be generalized to return all headers, not just the Location: header, maybe using the HEAD verb instead of GET to make it more lightweight.
Hereâs just one snippet I hacked up and used in Expression editor with Jython that is semi-working, but I leave it as an exercise to get it working fully