Page MenuHomePhabricator

[CLIENT][SW] Wikidata qid of articles is not present in export/dump
Closed, ResolvedPublic

Description

When exporting articles from a Wikipedia (through [[Special:Export]]), or in the XML dump, there is no mention of the Wikidata qid corresponding to each article.

It would be great to have it added, to save further API queries to get it or to avoid having to download a full dump of Wikidata on top of the Wikipedia(s) one.

Details

Event Timeline

TTO subscribed.

I suppose the WikibaseClient would need to attach to one of the hooks in XmlDumpWriter or something similar, like XmlDumpWriterOpenPage.

Vvjjkkii renamed this task from Wikidata qid of articles is not present in export/dump to l4aaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
ArielGlenn renamed this task from l4aaaaaaaa to Wikidata qid of articles is not present in export/dump.Jul 2 2018, 12:30 PM
ArielGlenn raised the priority of this task from High to Needs Triage.
ArielGlenn updated the task description. (Show Details)

I worry that this will make the dumps that much slower. Thre ought to be some sort of entity dump for Wikidata that could be used in tandem with the regular dumps. Adding @hoo for comments.

ArthurTaylor renamed this task from Wikidata qid of articles is not present in export/dump to [CLIENT][SW] Wikidata qid of articles is not present in export/dump.Apr 2 2024, 2:57 PM
ArthurTaylor moved this task from Incoming to [DOT] By Project on the wmde-wikidata-tech board.
Lydia_Pintscher subscribed.

Removing it from WD dev team board as this will need to be handled by WIT.

This page about the wikibase dump format says that we follow the Stable Interface Policy, which mentions about XML specifically that “For data formats that allow namespacing, like XML does, names (attribute names, element names) that belong to a namespace not explicitly mentioned by the specification of the data format can be ignored by consumers. Addition and changes to data structures from other namespaces are not considered breaking changes.”

Hi @Sylvain_WMFr, my team is investigating this ticket. We're curious about what types of editors create XML exports. Could you tell us what you would require the Wikidata QID for in your exports? Thank you.

SuzanneWood-WMDE changed the task status from Open to In Progress.Nov 27 2024, 11:20 AM

Size of impact on big dump:
I realise my estimate before was wrong of 100 million rows, it will actually be around 7 million rows added

(I was looking at wikidata items before but not all of them have a corresponding site-linked wikipedia page)

Hi @Sylvain_WMFr, my team is investigating this ticket. We're curious about what types of editors create XML exports. Could you tell us what you would require the Wikidata QID for in your exports? Thank you.

Hi! (answering from my personal account as I don't work at Wikimédia France anymore since 2020)

Sorry, I don't remember the details as this ticket is so old... I guess this had to do with the Ma Commune project, which is now offline, so I don't think there is still a need for it.

Change #1100115 had a related patch set uploaded (by Suzanne Wood; author: Suzanne Wood):

[mediawiki/extensions/Wikibase@master] Add wikibase QID to XML export/dump

https://gerrit.wikimedia.org/r/1100115

Current status of this ticket:

We are currently not planning to deploy this since:

  • the original reason for this ticket’s creation no longer applies
  • from consulting the community there isn’t currently a need

However, should a need arise in the future, a commit is ready here

Additional context:

We’ve contacted the WMF and they said that XML exports are on maintenance only mode and are being replaced by the new event-driven Dumps 2.0 system - we have mentioned considering incorporating QIDs here. It may also be worth coordinating with this ticket which mentioned potential XML dump changes: T365693

@SuzanneWood-WMDE thanks for the update, please reach out to the DPE / myself regarding anything Dumps 2 (and 1) related going forward.