Page MenuHomePhabricator

Add wikidata ID to ClearTables
Closed, ResolvedPublic

Description

https://github.com/ClearTables/ClearTables/issues/70 documents the ClearTables side of what needs doing

One question is if we want to handle the case of an OSM object having multiple Wikidata IDs. Wikidata IRIs have a many to many relationship with OSM features, but in practice very few features have multiple IDs tagged. My inclination is to only handle the common case of one wikidata ID.

The other question is what datatype to use for an ID. I can't find any information if we need a 32-bit number, 64-bit number, or numeric type with no maximum size.

Related Objects

StatusSubtypeAssignedTask
OpenNone
InvalidNone
OpenFeatureNone
InvalidNone
OpenNone
ResolvedPnorman
DeclinedNone
DeclinedNone
DeclinedNone
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
DuplicateNone
ResolvedPnorman
ResolvedNone
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
Resolveddebt
ResolvedPnorman
ResolvedPnorman
ResolvedNone
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
DeclinedPnorman
ResolvedPnorman
DeclinedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman

Event Timeline

I'm sure 64bit would be safer. Wikidata uses autonumber

It started at 1 and increments sequentially, so 64bit should be safe

Summary of discussion today

  • Fixing bugs with other relation types is out of scope for this
  • Doing a UNION ALL of the other cleartables tables would miss objects not in ClearTables and potentially have duplicates
  • Additional tables can be added in the WMF fork that gets deployed, since it's out of scope for ClearTables, and also isn't required for rendering.
  • polygon vs line is required in the database
  • These tables will be a table for points, lines, and polygons, with osm_id, geometry, and wikidata ID. An index will be needed for wikidata ID, but the default geom index is not required. Points is not strictly required at the moment, but trivial to implement with the other work done

Done in its own branch and tagged releases, serving both as what we need and an example of how to extend ClearTables

Pnorman claimed this task.

Completed some time ago.

debt moved this task from Backlog to Done on the Maps-Sprint board.