Page MenuHomePhabricator

Set up regular bulk data ingestion and indexing pipeline
Open, Stalled, HighPublic

Description

In WDQSv1, data preparation ETL and database indexing are disjoint processes.

The ETL runs on Hadoop (orchestrated via Airflow), and indexing is executed (independently) on each single WDQS/Blazegraph node. During indexing, the Blazegraph nodes needs to be depooled for a few days.

Long (3+ days) and unstable Blazegraph indexing run-times, and gating steps for move data from HDFS to WDQS v1 hosts (which require root privileges for tansfer) make it impraticaly to programmatically re-index the dabase on a fixed scedule.

One consequence of this is that we can't rely on weekly RDF exports for reconciliation. Blazegraph can get out of sync if MediaWiki updates never make it to the streaming updater pipeline (see T407702).

WDQS v2 architecture

Our V2 architecture should support a way of augmenting the streaming realtime updater with a periodic bulk sync so that any missed events are eventually reflected in WDQS.

The reindexing pipeline largely builds on the existing Blazegraph/WDQSv1 ETL process for normalization and graph splitting, but has been re-architected around new API boundaries for generation and ingestion of dumps, orchestration of the indexing process, and distribution of indexed data (binary qlever index files) to WDQSv2 service hosts.
Dumps, temp munged data, and index files are persisted on S3. The flow is roughly the following:

  1. We schedule an ephemeral RDF content export ("dump") POD in the dumps-legacy k8s namespace. This gives us control over the TTL export schedule and allows for gating data quality checks.
  2. Spark jobs kick in to "munge" the TTL export and generate N3 files for both wikidata_main and scholarly_articles graphs.
  3. A qlever-index process is scheduled in k8s (airflow-wikidata namespace) that builds indexes for the subgraphs and uploads them to an S3 bucket that WDQS backend hosts can reload from.
  4. Data retention (for temp data) is enforced using the drop_data_daily dag airflow pattern.

Currently this approach mixes YARN/Hadoop and k8s for compute, and S3 and HDFS for storage. Data is stored on HDFS for offline analytics, but S3 is the main API boundary for the WDQS v2 components across compute infrastructures.

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
wikidata data-reload: reenable the full wikibase dump, but truncate it after 1 batch.repos/data-engineering/airflow-dags!2514lericksonbatchmain
wikidata data-reload: reformat timestamprepos/data-engineering/airflow-dags!2513lericksontimestampmain
Revert "Merge branch 'wikidata/improved_timestamped_paths' into 'main'"repos/data-engineering/airflow-dags!2512lericksonrevert-7f2e65a9main
wikidata: Simplify dump paths by using a single timestamp for identificationrepos/data-engineering/airflow-dags!2510truegwikidata/improved_timestamped_pathsmain
wikidata data-reload: don't update latest.json yetrepos/data-engineering/airflow-dags!2493lericksonwikidata-qlever-index-3main
Remove date & timestamp overridesrepos/data-engineering/airflow-dags!2491lericksonwikidata-qlever-index-3main
wikidata: Re-enable previously disabled indexing pipeline stepsrepos/data-engineering/airflow-dags!2490truegwdqs/re-enabling-thingsmain
WDQS: Update Qlever to support zcatrepos/data-engineering/airflow-dags!2479truegwdqs/qlever-updatemain
WDQS: Qlever indexer: use zcat to pipe input files.repos/data-engineering/airflow-dags!2477truegwdqs/qlever-zcatmain
New parameter QLEVER_INDEXER_CATrepos/wikidata-platform/wdqs/wdqs-qlever!14truegzcatmain
Customize query in GitLab

Related Objects

StatusSubtypeAssignedTask
Opengmodena
Stalledgmodena
Resolvedlerickson
Resolvedlerickson
DeclinedNone
DeclinedNone
Resolvedtrueg
Resolvedtrueg
Resolvedlerickson
DeclinedNone
Resolvedbking
OpenNone
Resolvedtrueg
Resolvedlerickson
OpenNone
Resolvedgmodena
Resolvedgmodena
Resolvedgmodena
Resolvedgmodena
Resolvedgmodena
Resolvedgmodena

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change #1287411 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/deployment-charts@master] mediawiki-dumps-legacy: Allow launching dumps from airflow-wikidata

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

Change #1287426 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/deployment-charts@master] Add support for creating arbitrary PVCs to mediawiki-dumps-legacy

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

Change #1287411 merged by jenkins-bot:

[operations/deployment-charts@master] mediawiki-dumps-legacy: Allow launching dumps from airflow-wikidata

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

Change #1287426 merged by jenkins-bot:

[operations/deployment-charts@master] Add support for creating arbitrary PVCs to mediawiki-dumps-legacy

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

Change #1303984 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/deployment-charts@master] Allow trueg to run mediawiki dumps from his airflow devenv

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

Change #1303984 merged by jenkins-bot:

[operations/deployment-charts@master] Allow trueg to run mediawiki dumps from his airflow devenv

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

Keeping this "in engineering" to account for post-merge and deploy fixes for the pipeline.

gmodena changed the task status from Open to Stalled.Jul 15 2026, 11:01 AM

Change #1321554 had a related patch set uploaded (by Brouberol; author: Brouberol):

[operations/deployment-charts@master] dse-k8s-eqiad/airflow-wikidata: allow the creation of extremely large pods

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

Change #1321554 merged by Brouberol:

[operations/deployment-charts@master] dse-k8s-eqiad/airflow-wikidata: allow the creation of extremely large pods

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

Change #1321562 had a related patch set uploaded (by Brouberol; author: Brouberol):

[operations/deployment-charts@master] dse-k8s-eqiad/airflow-wikidata: increase namespace quotas

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

Change #1321562 merged by Brouberol:

[operations/deployment-charts@master] dse-k8s-eqiad/airflow-wikidata: increase namespace quotas

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

lerickson merged https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2495

wikidata: Stop looking for missing "all" export files during smaller lexemes-only test run.

lerickson opened https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2514

wikidata data-reload: reenable the full wikibase dump, but truncate it after 1 batch.

trueg merged https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2514

wikidata data-reload: reenable the full wikibase dump, but truncate it after 1 batch.