From https://wikitech.wikimedia.org/wiki/Data_Platform/Event_Sanitization:
In order to retain event data in the Data Lake beyond the standard 90-day period set out in the Privacy Policy and Data Retention Guidelines, it must be sanitized
We keep these events under the event_sanitized schema.
We have been discussing whether this mechanism is worth keeping around (slack thread questioning need, slack thread of event_sanitized users and use cases, meeting notes). However, this task is not about decommissioning the system. Rather, the biggest bang for the buck right now is to perform a one-time clean up of retained data sets, considering that these datasets account for an outsize file count that puts pressure in our HDFS namenode (34.1M files vs 124M total = ~28%).
Top offenders HDFS listing of files associated to all event_sanitized datasets (full listing at P88850):
# num-files hdfs-path
$ hdfs dfs -count /wmf/data/event_sanitized/* | awk '{print $2, $4}' | sort --numeric-sort --reverse
4792271 /wmf/data/event_sanitized/netflow
2213551 /wmf/data/event_sanitized/searchsatisfaction
1009049 /wmf/data/event_sanitized/mediawiki_revision_score
826904 /wmf/data/event_sanitized/mobilewebuiactionstracking
695296 /wmf/data/event_sanitized/editattemptstep
605828 /wmf/data/event_sanitized/referencepreviewspopups
593696 /wmf/data/event_sanitized/mediawiki_page_links_change
570475 /wmf/data/event_sanitized/mobilewikiapplinkpreview
556549 /wmf/data/event_sanitized/mediawiki_revision_create
490358 /wmf/data/event_sanitized/mobilewikiappsessions
...Top offenders HDFS listing of total size associated to all event_sanitized datasets (full listing at P88851):
# bytes gigabytes hdfs-path
$ hdfs dfs -count /wmf/data/event_sanitized/* | awk '{print $3, $3/(1024^3), $4}' | sort --numeric-sort --reverse
10653068734190 9921.44 /wmf/data/event_sanitized/netflow
6899662519641 6425.81 /wmf/data/event_sanitized/searchsatisfaction
2554462025290 2379.03 /wmf/data/event_sanitized/mobilewikiappsessions
1892463163801 1762.49 /wmf/data/event_sanitized/mobilewikiapplinkpreview
1856562350002 1729.06 /wmf/data/event_sanitized/readingdepth
1610807573809 1500.18 /wmf/data/event_sanitized/mediawiki_page_links_change
1276622759761 1188.95 /wmf/data/event_sanitized/mediawiki_revision_create
670818055482 624.748 /wmf/data/event_sanitized/mediawiki_revision_score
654801033262 609.831 /wmf/data/event_sanitized/editattemptstep
605972171689 564.356 /wmf/data/event_sanitized/mediawiki_revision_tags_change
...Cleanup tracking
Orphaned datasets (removed from allowlist, HDFS data never deleted)
| Dataset(s) | Files | Size | HDFS | Hive | Notes |
|---|---|---|---|---|---|
| mobilewikiapp* (36 schemas) | ~7.7M | ~4.4 TB | ✅ | ✅ | Done. Ref: T360579 |
| mediaviewer, multimediaviewer* (5 paths) | ~505K | ~55 GB | ✅ | ✅ | Ref: T310890 |
| externalguidance | 121,917 | 31.6 GB | ✅ | ✅ | Ref: T303508 |
| changeslistfilters, changeslistfiltergrouping | 242,240 | 26.7 GB | ✅ | ✅ | Ref: T317525 |
| echointeraction, echomail | 459,632 | 6.7 GB | ✅ | ✅ | Ref: T344167 |
| twocolconflictconflict, twocolconflictexit | 353,614 | 2.4 GB | ✅ | ✅ | Ref: T397611 |
| editoractivation | 214,360 | 1.1 GB | ✅ | ✅ | Ref: T330766 |
| mediawiki_wikistories_consumption_event, mediawiki_wikistories_contribution_event | 341,067 | 0.5 GB | ✅ | ✅ | Ref: T408178 |
| flowreplies | 101,354 | 0.3 GB | ✅ | ✅ | Ref: T309025 |
| guidedtourinternallinkactivation | 7,254 | ~0 GB | ✅ | ✅ | Ref: T288416 |
Still in allowlist — delete data + remove allowlist entry
| Dataset(s) | Files | Size | HDFS | Hive | Allowlist | Notes |
|---|---|---|---|---|---|---|
| readingdepth | ~388K | ~1,729 GB | ✅ | ✅ | ✅ | Last write year=2022. Superseded by mediawiki_reading_depth (EP, active) |
| mobilewebuiactionstracking | ~827K | ~300 GB | ✅ | ✅ | ✅ | Last write Oct 2024. Coordinated deprecation with desktop sibling |
| desktopwebuiactionstracking | ~450K | ~172 GB | ✅ | ✅ | ✅ | Same as above. |
| mediawiki_revision_score | ~1M | ~624.8 GB | ✅ | ✅ | ✅ | Main allowlist only. Last write 2023. Confirmed by @Ottomata (T273789). |
| searchsatisfaction | ~2.3M | ~6,426 GB | ✅ | ✅ | ✅ | Confirmed safe to delete by @EBernhardson, @dcausse, @MNeisler. |
Active — needs retention policy discussion
| Dataset(s) | Files | Size | Notes |
|---|---|---|---|
| netflow | ~4.8M | ~9,921 GB | Actively written. No retention limit set. ~3.5 TB pre-2023 could be trimmed. Decided to tackle this separately in T424904. |
Anomalies — investigate separately
| Dataset(s) | Notes |
|---|---|
| referencepreviewspopups | Stream appeared dead in 2026 (878 rows YTD vs ~4B in 2025). @awight confirmed: data still needed — do not delete this round. WMDE will restore or reimplement the stream. |
This task's investigation was AI assisted. Here is a summary of the work as an example of a good use case to pay technical debt: P90342