Description
Entities fetched from Wikidata contain statements, and many of the statements have "datatype": "external-id". These statements are relatively unlikely to be used, for the foreseeable future. Since the orchestrator has performance challenges related to fetching large Wikidata entities, we should consider omitting these statements; that is, simply not importing them as part of entity fetches. This can be easily done by extending an existing feature-flag object, which currently controls the import of qualifiers and references. In that way, when orchestrator performance characteristics are better, we can easily switch these external IDs back on.
Note: we could arrange for this proposed new flag to be ignored by calls to Z6820. In that way, even with the flag set to false, users would still have a means of getting one of these external-id statements.
Update, 26 May 2026: As suggested in one of the comments below, this could be controlled by a new argument on the relevant function(s) - most importantly, Z6821/ Fetch Wikidata item. Alternatively there could be a new function which provides several options for omitting content. (Z6820 provides options for what to include, but this new function could provide the inverse approach, and allow users to specify the omission of external-ID statements and possibly selected other types of bulky content, such as qualifiers and references. Note that these are types of content that don't fit neatly into the categories provided by Z6820, so this new function would not be redundant.)
Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)
Statements with "datatype": "external-id", and possibly other types of content, can be ignored (not imported) by orchestrator code that implements Wikidata fetch functions.
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist