The current SQL queries are brittle and need to be updated for new MediaWiki and PHP releases. This process can be error prone, and, if the queries are not updated before the new values start to appear in the data, the previous data must be backfilled, which can also be an error prone process. See T413349#11543337.
Description
Description
Related Objects
Related Objects
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | amastilovic | T415283 Refactor pingback analytics pipeline | |||
| Open | amastilovic | T418190 Refactor pingback reports pipelines using dbt |
Event Timeline
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2026, 4:17 PM2026-01-22 16:17:49 (UTC+0)
Ahoelzl moved this task from Incoming (new tickets) to Backlog on the Data-Engineering board.Jan 22 2026, 5:15 PM2026-01-22 17:15:16 (UTC+0)
Comment Actions
Copying the issues found on the original pipeline here, for completeness:
In T413349#11543337, @xcollazo wrote:We ran into a couple issues trying to backfill:
- The SQL UNION ALLs existing data with the newly calculated data. This means the SQL expects the shape of preivously generated TSV files to include a column for each *future* category. For example, the versions all have their own column for 1.45, 1.46, etc. This makes backfills difficult, since the TSV files themselves require manual fixes to add the missing columns.
This is error prone, but I did it anyway manually for php.tsv, version_simple.tsv, and all the versions under folder php_drilldown, and ran the following to replace the production TSV files:
kerberos-run-command hdfs hdfs dfs -rm /wmf/data/published/datasets/periodic/reports/metrics/pingback/php.tsv kerberos-run-command hdfs hdfs dfs -rm /wmf/data/published/datasets/periodic/reports/metrics/pingback/version_simple.tsv kerberos-run-command hdfs hdfs dfs -rm -r /wmf/data/published/datasets/periodic/reports/metrics/pingback/php_drilldown kerberos-run-command hdfs hdfs dfs -cp /user/xcollazo/artifacts/fix_pingback/php.tsv /wmf/data/published/datasets/periodic/reports/metrics/pingback/php.tsv kerberos-run-command hdfs hdfs dfs -cp /user/xcollazo/artifacts/fix_pingback/version_simple.tsv /wmf/data/published/datasets/periodic/reports/metrics/pingback/version_simple.tsv kerberos-run-command hdfs hdfs dfs -cp /user/xcollazo/artifacts/fix_pingback/php_drilldown /wmf/data/published/datasets/periodic/reports/metrics/pingback/php_drilldown kerberos-run-command hdfs hdfs dfs -chown -R analytics:analytics-privatedata-users /wmf/data/published/datasets/periodic/reports/metrics/pingback/php.tsv kerberos-run-command hdfs hdfs dfs -chown -R analytics:analytics-privatedata-users /wmf/data/published/datasets/periodic/reports/metrics/pingback/version_simple.tsv kerberos-run-command hdfs hdfs dfs -chown -R analytics:analytics-privatedata-users /wmf/data/published/datasets/periodic/reports/metrics/pingback/php_drilldown kerberos-run-command hdfs hdfs dfs -chmod -R 644 /wmf/data/published/datasets/periodic/reports/metrics/pingback/php.tsv kerberos-run-command hdfs hdfs dfs -chmod -R 644 /wmf/data/published/datasets/periodic/reports/metrics/pingback/version_simple.tsv kerberos-run-command hdfs hdfs dfs -chmod -R 644 /wmf/data/published/datasets/periodic/reports/metrics/pingback/php_drilldown kerberos-run-command hdfs hdfs dfs -chmod 744 /wmf/data/published/datasets/periodic/reports/metrics/pingback/php_drilldown
- Additionally, the calculation steps all want to write to central TSV files, creating race conditions when wanting to backfill multiple dates.
To go around this, we set max_active_runs=1 on the DAG.
These fixes are ok for now, but we should really fix this pipeline to be idempotent, so that we can rerun it as needed. A discussing around this can be found on Slack.
amastilovic edited projects, added: Data-Engineering (Q3 FY25/26 January 1st - March 31th); removed: Data-Engineering.
Snwachukwu moved this task from Next Up to In progress on the Data-Engineering (Q3 FY25/26 January 1st - March 31th) board.Mar 2 2026, 4:36 PM2026-03-02 16:36:52 (UTC+0)
Ahoelzl edited projects, added: Data-Engineering (Q4 FS25/26 April 1st - June 30st); removed: Data-Engineering (Q3 FY25/26 January 1st - March 31th).Apr 3 2026, 10:24 PM2026-04-03 22:24:39 (UTC+0)
Ahoelzl moved this task from Next Up to In progress on the Data-Engineering (Q4 FS25/26 April 1st - June 30st) board.
APizzata-WMF moved this task from In progress to Blocked/Paused on the Data-Engineering (Q4 FS25/26 April 1st - June 30st) board.Jun 1 2026, 3:44 PM2026-06-01 15:44:03 (UTC+0)
Ahoelzl edited projects, added: Data-Engineering (Q1 FS26/27 July 1st - September 30th); removed: Data-Engineering (Q4 FS25/26 April 1st - June 30st).Jul 8 2026, 12:49 PM2026-07-08 12:49:00 (UTC+0)
Ahoelzl moved this task from Next Up to Blocked/Paused on the Data-Engineering (Q1 FS26/27 July 1st - September 30th) board.