Page MenuHomePhabricator

Audit and update data pipelines that extract thumbnail requests from webrequest_text
Closed, ResolvedPublic

Description

In the parent ticket, information about thumbnail requests is being moved from the upload cluster to text. This means queries like:

SELECT ...
FROM wmf.webrequest
WHERE webrequest_source = 'upload'
AND ... // Logic that expects to include thumbnails

needs to change, temporarily, to remove the webrequest_source line, as thumbnail information will be split across clusters during the rollout of the change.

Then, once that is done, we can reintroduce the line with webrequest_source = 'text'.

The most obvious example is the mediarequest pipeline, which is tracked in T431475.

In this ticket, we should look for the above pattern in other pipelines under analytics-refinery and migrate them, if any.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
mediacounts/mediarequest: wait on both webrequest sources for thumbnail moverepos/data-engineering/airflow-dags!2526ebysansthumbnailmain
Update media metrics models to align with cluster changesrepos/data-engineering/dbt-jobs!163kcvelagaupdate-media-models-for-thumbnailsmain
Customize query in GitLab

Event Timeline

Did the audit across analytics-refinery, dbt-jobs and airflow-dags. Apart from the mediacounts + mediarequest HQLs already handled by Joseph under {T431475: Data Lake - mediarequests - adapt HQL query to include counting mediarequests from webrequest_text}, there is no other HQL script that needs top be changed in analytics-refinery.

However I found the following:

dbt-jobs: stg_webrequest_upload_bandwidth and stg_webrequest_media_clients were both pinned to the upload cluster .
airflow-dags: the mediacounts/mediarequest HQLs now read both sources, but the DAGs were only waiting on the upload partition, I would update both to wait on both partitions.

Left MediaFileUrlParser job as-is. it just won't validate thumb URLs but I believe that's okay for since it's temporarily.

Hi @Snwachukwu - quick note, I just created a MR today for the models I maintain in dbt: dbt-jobs/163. I will link to this.

ebysans merged https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2526

mediacounts/mediarequest: wait on both webrequest sources for thumbnail move