Skip to content

chore: remove deprecated taskclusteretl.person_mozilla_com view#9336

Open
whd wants to merge 1 commit into
mainfrom
DENG-10894
Open

chore: remove deprecated taskclusteretl.person_mozilla_com view#9336
whd wants to merge 1 commit into
mainfrom
DENG-10894

Conversation

@whd
Copy link
Copy Markdown
Member

@whd whd commented May 8, 2026

Description

I noticed this while responding to this thread.

DE owns the user-facing data platform and relevant communications, so I have no plans to merge this. But it's probably a good idea to delete this deprecated view at some point.

There are less drastic measures you could take like setting deprecation metadata and removing access first but given the storied history of this table I'd recommend something like:

  1. checking monitoring metadata for any extant usage
  2. move any such usage e.g. STMO queries to the new table
  3. email the people specifically identified in https://mozilla-hub.atlassian.net/browse/DENG-10894 known to be using the ld table
  4. merge this PR

Related Tickets & Documents

Reviewer, please follow this checklist

@whd whd requested a review from kbammarito May 8, 2026 17:15
@whd whd requested a review from a team as a code owner May 8, 2026 17:15
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Claude finished @whd's task in 2m 15s —— View job


Claude PR Review

  • Read the changed files
  • Check for references to the deleted view in the codebase
  • Verify the unrelated bugzilla_metrics change
  • Post review

Note: I attempted to post this as a formal GitHub review with inline comments (per the repo's review instructions) but the mcp__github_inline_comment__create_inline_comment and mcp__github__create_and_submit_pull_request_review tools weren't permitted in this run, so I'm consolidating findings into this comment. To enable the formal-review path, those tools would need to be added to --allowedTools.


Summary

The mechanical deletion of taskclusteretl.person_mozilla_com is clean: view.sql and metadata.yaml are removed, the matching dry_run exclusion in bqetl_project.yaml is removed, and a grep across the repo confirms bugzilla_metrics/users/metadata.yaml is the only in-repo file that referenced the deleted view (and it's updated here). After the change, sql/moz-fx-data-shared-prod/taskclusteretl/ retains only dataset_metadata.yaml, which is fine — that dataset still hosts other syndicated views.

Findings

1. Dangling replacement reference — sql/moz-fx-data-shared-prod/bugzilla_metrics/users/metadata.yaml:1

# see workday.person_mozilla_com which relies on this view

workday.person_mozilla_com does not exist anywhere in this repo — no sql/moz-fx-data-shared-prod/workday/ directory, and no workday.person_mozilla_com references in any SQL/YAML. Possibilities:

  • If the replacement view lives outside bqetl (directly in BigQuery, or in another repo), say so explicitly, e.g. # see workday.person_mozilla_com (managed outside bqetl) which relies on this view — otherwise the next person editing this file has nothing to grep for.
  • If it's coming later, this is a forward reference that will be misleading until then.
  • The original comment in the deleted taskclusteretl/person_mozilla_com/metadata.yaml carried useful context: "this view is authorized but our authorization logic only works with one layer of references, so workgroup_access updates to bugzilla_metrics.users need to match the access here." Whatever the replacement is, that "keep workgroup_access in sync" rationale is worth preserving here so future editors understand why these grants exist.

2. platform/access-events grant rationale is lost — sql/moz-fx-data-shared-prod/bugzilla_metrics/users/metadata.yaml:5

workgroup_access:
  - role: roles/bigquery.dataViewer
    members:
      - workgroup:platform/access-events

This grant existed to mirror the workgroup_access on the deleted authorized view (per the now-removed comment). With the authorized view gone, the grant on bugzilla_metrics.users is decoupled from any in-repo justification. Either:

  • The new workday.person_mozilla_com carries the same one-layer-authorization constraint, in which case the comment above should re-state it; or
  • The grant may now be over-scoped and could be tightened.

Worth folding into step 1 of the PR description's pre-merge checklist (monitoring/usage check) — it's the same "who relies on this access path?" question.

3. Pre-merge plan acknowledged

The PR description already lays out the right sequence (monitoring check → migrate STMO usage → notify known users from DENG-10894 → merge). Non-blocking review; the deletion itself is mechanically correct.

Overall

LGTM mechanically. The only substantive ask is to either fix or contextualize the new workday.person_mozilla_com comment so the file remains self-explanatory once the deprecated view is gone, and to confirm the platform/access-events grant on bugzilla_metrics.users is still warranted by the replacement view.
• Branch: DENG-10894

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Integration report for "chore: remove deprecated taskclusteretl.person_mozilla_com view"

sql.diff

Click to expand!
Only in /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl: person_mozilla_com
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/broken_site_report/metadata.yaml	2026-05-08 17:29:21.089108118 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/broken_site_report/metadata.yaml	2026-05-08 17:29:16.679105482 +0000
@@ -1,6 +1,10 @@
-friendly_name: Broken Site Report
+friendly_name: App-specific view for Glean ping "broken-site-report"
 description: |-
-  Please provide a description for the query
+  This a view that UNIONs the stable ping tables
+  across all channels of the Glean application "Firefox for Android"
+  (org_mozilla_firefox.broken_site_report, org_mozilla_firefox_beta.broken_site_report, org_mozilla_fenix.broken_site_report, org_mozilla_fenix_nightly.broken_site_report, org_mozilla_fennec_aurora.broken_site_report).
+
+  It is used by Looker.
 owners: []
 workgroup_access:
 - role: roles/bigquery.dataViewer
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/crash/metadata.yaml	2026-05-08 17:29:21.089108118 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/crash/metadata.yaml	2026-05-08 17:29:16.679105482 +0000
@@ -1,6 +1,10 @@
-friendly_name: Crash
+friendly_name: App-specific view for Glean ping "crash"
 description: |-
-  Please provide a description for the query
+  This a view that UNIONs the stable ping tables
+  across all channels of the Glean application "Firefox for Android"
+  (org_mozilla_firefox.crash, org_mozilla_firefox_beta.crash, org_mozilla_fenix.crash, org_mozilla_fenix_nightly.crash, org_mozilla_fennec_aurora.crash).
+
+  It is used by Looker.
 owners: []
 workgroup_access:
 - role: roles/bigquery.dataViewer
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_crashreporter/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_crashreporter/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_crashreporter/crash/metadata.yaml	2026-05-08 17:29:21.278108231 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_crashreporter/crash/metadata.yaml	2026-05-08 17:29:16.818105564 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `firefox-crashreporter/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `firefox-crashreporter/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/broken_site_report/metadata.yaml	2026-05-08 17:29:21.278108231 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/broken_site_report/metadata.yaml	2026-05-08 17:29:16.821105566 +0000
@@ -1,6 +1,14 @@
-friendly_name: Broken Site Report
+friendly_name: Historical Pings for `firefox-desktop/broken-site-report`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `firefox-desktop/broken-site-report`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/crash/metadata.yaml	2026-05-08 17:29:21.278108231 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/crash/metadata.yaml	2026-05-08 17:29:16.821105566 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `firefox-desktop/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `firefox-desktop/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab/metadata.yaml	2026-05-08 17:29:21.344108271 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab/metadata.yaml	2026-05-08 17:29:16.902105615 +0000
@@ -1,6 +1,14 @@
-friendly_name: Newtab
+friendly_name: Historical Pings for `firefox-desktop/newtab`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `firefox-desktop/newtab`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 workgroup_access:
 - role: roles/bigquery.dataViewer
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/broken_site_report/metadata.yaml	2026-05-08 17:29:22.125220368 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/broken_site_report/metadata.yaml	2026-05-08 17:29:17.992106267 +0000
@@ -1,6 +1,14 @@
-friendly_name: Broken Site Report
+friendly_name: Historical Pings for `org-mozilla-fenix/broken-site-report`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-fenix/broken-site-report`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/crash/metadata.yaml	2026-05-08 17:29:22.126220576 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/crash/metadata.yaml	2026-05-08 17:29:17.992106267 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `org-mozilla-fenix/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-fenix/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/broken_site_report/metadata.yaml	2026-05-08 17:29:22.188233478 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/broken_site_report/metadata.yaml	2026-05-08 17:29:18.350106481 +0000
@@ -1,6 +1,14 @@
-friendly_name: Broken Site Report
+friendly_name: Historical Pings for `org-mozilla-fenix-nightly/broken-site-report`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-fenix-nightly/broken-site-report`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/crash/metadata.yaml	2026-05-08 17:29:22.188233478 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/crash/metadata.yaml	2026-05-08 17:29:18.350106481 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `org-mozilla-fenix-nightly/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-fenix-nightly/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/broken_site_report/metadata.yaml	2026-05-08 17:29:22.255247421 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/broken_site_report/metadata.yaml	2026-05-08 17:29:18.199106390 +0000
@@ -1,6 +1,14 @@
-friendly_name: Broken Site Report
+friendly_name: Historical Pings for `org-mozilla-fennec-aurora/broken-site-report`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-fennec-aurora/broken-site-report`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/crash/metadata.yaml	2026-05-08 17:29:22.255247421 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fennec_aurora/crash/metadata.yaml	2026-05-08 17:29:18.199106390 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `org-mozilla-fennec-aurora/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-fennec-aurora/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/broken_site_report/metadata.yaml	2026-05-08 17:29:22.275251583 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/broken_site_report/metadata.yaml	2026-05-08 17:29:18.352106482 +0000
@@ -1,6 +1,14 @@
-friendly_name: Broken Site Report
+friendly_name: Historical Pings for `org-mozilla-firefox/broken-site-report`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-firefox/broken-site-report`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/crash/metadata.yaml	2026-05-08 17:29:22.257247837 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox/crash/metadata.yaml	2026-05-08 17:29:18.204106393 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `org-mozilla-firefox/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-firefox/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/broken_site_report/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/broken_site_report/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/broken_site_report/metadata.yaml	2026-05-08 17:29:22.367270728 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/broken_site_report/metadata.yaml	2026-05-08 17:29:18.353106482 +0000
@@ -1,6 +1,14 @@
-friendly_name: Broken Site Report
+friendly_name: Historical Pings for `org-mozilla-firefox-beta/broken-site-report`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-firefox-beta/broken-site-report`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/crash/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/crash/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/crash/metadata.yaml	2026-05-08 17:29:22.333263653 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_firefox_beta/crash/metadata.yaml	2026-05-08 17:29:18.353106482 +0000
@@ -1,6 +1,14 @@
-friendly_name: Crash
+friendly_name: Historical Pings for `org-mozilla-firefox-beta/crash`
 description: |-
-  Please provide a description for the query
+  A historical view of pings sent for the
+  `org-mozilla-firefox-beta/crash`
+  document type.
+
+  This view is guaranteed to contain only complete days
+  (per `submission_timestamp`)
+  and to contain only one row per distinct `document_id` within a given date.
+
+  Clustering fields: `normalized_channel`, `sample_id`
 owners: []
 labels:
   authorized: true
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/metadata.yaml	2026-05-08 17:29:22.751316694 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/metadata.yaml	1970-01-01 00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-friendly_name: person_mozilla_com
-description: |-
-  See https://mozilla-hub.atlassian.net/browse/DENG-9313.
-owners:
-- telemetry-alerts@mozilla.com
-labels:
-  authorized: true
-  owner1: telemetry-alerts
-workgroup_access:
-- role: roles/bigquery.dataViewer
-  members:
-  - workgroup:mozilla-confidential/data-viewers
-  - workgroup:platform/access-events
-references:
-  view.sql:
-  - moz-fx-data-bq-people.composer_workday.worker
-  - moz-fx-data-shared-prod.bugzilla_metrics.users
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/view.sql	2026-05-08 17:29:22.815316756 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/taskclusteretl/person_mozilla_com/view.sql	1970-01-01 00:00:00.000000000 +0000
@@ -1,128 +0,0 @@
-CREATE OR REPLACE VIEW
-  `moz-fx-data-shared-prod.taskclusteretl.person_mozilla_com`
-AS
-WITH RECURSIVE management_path AS (
-  -- Base case
-  SELECT
-    manager_email,
-    email,
-    [manager_email] AS management_chain,
-    [manager_email, email] AS visited_chain
-  FROM
-    `moz-fx-data-bq-people.composer_workday.worker`
-  WHERE
-    currently_active = TRUE
-  UNION ALL
-  -- Recursive step
-  SELECT
-    er.manager_email,
-    mp.email,
-    ARRAY_CONCAT([er.manager_email], mp.management_chain) AS management_chain,
-    ARRAY_CONCAT(mp.visited_chain, [er.manager_email]) AS visited_chain
-  FROM
-    `moz-fx-data-bq-people.composer_workday.worker` AS er
-  JOIN
-    management_path AS mp
-    ON er.email = mp.manager_email
-  WHERE
-    er.manager_email NOT IN UNNEST(mp.visited_chain)
-    AND ARRAY_LENGTH(mp.management_chain) < 50
-),
-deduped_chain AS (
-  SELECT
-    email,
-    ARRAY_REVERSE(management_chain) AS management_chain
-  FROM
-    (
-      SELECT
-        email,
-        management_chain,
-        ROW_NUMBER() OVER (PARTITION BY email ORDER BY ARRAY_LENGTH(management_chain) DESC) AS rn
-      FROM
-        management_path
-    )
-  WHERE
-    rn = 1
-),
-manager_names AS (
-  SELECT
-    dc.email,
-    off AS manager_index,
-    CONCAT(w.first_name, ' ', w.last_name) AS manager_name
-  FROM
-    `deduped_chain` AS dc
-  CROSS JOIN
-    UNNEST(dc.management_chain) AS mgr_email
-    WITH OFFSET off
-  LEFT JOIN
-    `moz-fx-data-bq-people.composer_workday.worker` AS w
-    ON w.email = mgr_email
-),
-manager_chain_final AS (
-  SELECT
-    email,
-    ARRAY_AGG(manager_name ORDER BY manager_index) AS manager
-  FROM
-    manager_names
-  GROUP BY
-    email
-),
-final_with_name AS (
-  SELECT
-    mcf.manager,
-    CONCAT(w.first_name, ' ', w.last_name) AS name,
-    w.email
-  FROM
-    manager_chain_final AS mcf
-  JOIN
-    `moz-fx-data-bq-people.composer_workday.worker` AS w
-    ON mcf.email = w.email
-  WHERE
-    w.currently_active = TRUE
-),
-bugzilla_alternates AS (
-  SELECT
-    fwn.manager,
-    fwn.name,
-    b.email AS email
-  FROM
-    final_with_name AS fwn
-  JOIN
-    `moz-fx-data-shared-prod.bugzilla_metrics.users` AS b
-    ON fwn.email = b.ldap_email
-  WHERE
-    b.email IS NOT NULL
-    AND b.email != b.ldap_email
-),
-combined AS (
-  SELECT
-    manager,
-    name,
-    email
-  FROM
-    final_with_name
-  UNION ALL
-  SELECT
-    manager,
-    name,
-    email
-  FROM
-    bugzilla_alternates
-),
-deduplicated AS (
-  SELECT
-    manager,
-    name,
-    email,
-    ROW_NUMBER() OVER (PARTITION BY email ORDER BY name) AS rn
-  FROM
-    combined
-)
-SELECT
-  manager,
-  name,
-  email
-FROM
-  deduplicated
-WHERE
-  rn = 1;

Link to full diff

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.

1 participant