Skip to content

feat(DENG-8178): search_clients_daily_glean_v1 - #9828

Merged
kbammarito merged 57 commits into
mainfrom
DENG-8178-search-clients-daily-glean-v1
Sep 22, 2026
Merged

kbammarito merged 57 commits into
mainfrom
DENG-8178-search-clients-daily-glean-v1

Conversation

@kbammarito

@kbammarito kbammarito commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

search_derived.search_clients_daily_glean_v1

A Glean-based daily search aggregate, one row per client_id, submission_date, normalized_engine, partner_code and source. It runs alongside search_clients_daily_v8; the seven legacy_ columns carry a v8-comparable number from this table alone.

Nothing consumes it yet, so nothing in production changes when this merges.

  • The query, schema and metadata, plus the user-facing view search.search_clients_daily_glean
  • Three sides combined with full outer joins, so a row survives if SERP impressions, sap.counts events or the legacy_ counters have activity for the key
  • date_partition_offset: -1, because serp_events_v2 writes the previous day's partition — without it every SERP measure would publish as 0, silently
  • A shredder delete target on the Glean client_id
  • Two query tests — test_sides covers the four side combinations, test_legacy_labels the label shapes and partner-code attribution
  • A description on all 81 fields and 6 nested entries

Post-merge

  • The backfill, after serp_events_v2's finishes. The floor is the rolling 775-day partition expiry, so the range is computed against the run date
  • Bigeye monitoring. A monitor can't be declared before the table exists in production

Related Tickets & Documents

Reviewer, please follow this checklist

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@scholtzan

This comment has been minimized.

@kbammarito
kbammarito marked this pull request as ready for review September 22, 2026 03:51
@kbammarito
kbammarito requested a review from a team as a code owner September 22, 2026 03:51
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

⚠️ Sensitive-data flow detected — cc @mozilla/dataplatform-wg, please review.

A changed query reads restricted / workgroup-gated data and writes it to a more broadly readable destination that no team owns:

- moz-fx-data-shared-prod.revenue (unresolved (treated as sensitive)) -> moz-fx-data-shared-prod.search_derived
    grants read to workgroup:mozilla-confidential/data-viewers not authorized on the source
    needs Data Platform (@mozilla/dataplatform-wg) review

A source shown as unresolved has no dataset_metadata.yaml in this repo. It may be
defined outside bigquery-etl — in private-bigquery-etl, or in a project this repo does
not manage — in which case its access could not be read and it is flagged conservatively.

This is advisory and does not block merge.
A Data Platform reviewer should confirm the widened access is intended, or narrow the destination's workgroup_access.

@scholtzan

This comment has been minimized.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds search_derived.search_clients_daily_glean_v1 (query, schema, metadata, README), the user-facing view search.search_clients_daily_glean, a Glean client_id shredder target, and two query tests with shared source-schema fixtures. Nothing reads the table yet.

I checked the grain and the three-way full outer join for fan-out and null-key collapse and did not find a problem: join-1 output keys are unique, legacy_cte.partner_code is non-null by the 'unknown_code' sentinel, and the COALESCE(serp, sap) predicates on join-2 keep legacy-only keys one-sided rather than duplicating them. The date_partition_offset: -1 rationale matches how serp_events_v2 writes its partition, the metrics.url / metrics.url2 split is right (events_stream_v1's metrics_to_json moves url2 to $.url), NUMERIC matches mozfun.norm.browser_version_info, the shredder entry pairs with DESKTOP_GLEAN_SRC correctly, and schema.yaml field order matches final_cte's select list. Test coverage of the label shapes and the unknown_code orphan-ad path is good.

Four findings inline: two in the SERP/join logic, one convention violation on the SERP source reference, and one suggestion about the legacy tab-count aggregation. Per the reviewer checklist, the Bigeye monitor and backfill are deferred to post-merge per the PR description, and no backfill.yaml is touched here.

@scholtzan

This comment has been minimized.

@gkabbz
gkabbz requested a review from Standard8 September 22, 2026 19:22
@gkabbz
gkabbz requested review from aminomancer and removed request for Standard8 September 22, 2026 19:24
@gkabbz

gkabbz commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Sorry @Standard8 I hit the re-review button by accident.

@irrationalagent irrationalagent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes look good to me - thank you @kbammarito !

@scholtzan

Copy link
Copy Markdown
Contributor

Integration report

@kbammarito
kbammarito added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit 975a508 Sep 22, 2026
26 checks passed
@kbammarito
kbammarito deleted the DENG-8178-search-clients-daily-glean-v1 branch September 22, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants