Skip to content

Conversation

@wwyc
Copy link
Contributor

@wwyc wwyc commented Oct 14, 2025

Description

As mentioned in #8223, managed backfill is used to initialize the table.

Currently this managed backfill will fail since a previous partition is expected:

if previous_partition_id is None:

Related Tickets & Documents

Reviewer, please follow this checklist

@wwyc wwyc requested a review from a team as a code owner October 14, 2025 18:30
@wwyc wwyc changed the title DO NOT MERGE - DO-2075 Added backfill template DO NOT MERGE - DO-2075 Added baseline city seen backfill template Oct 14, 2025
@dataops-ci-bot
Copy link

Integration report for "Added backfill template"

sql.diff

Click to expand!
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1: backfill_query_do2075.sql
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1: backfill.yaml
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/baseline_clients_city_seen_v1: backfill_query_do2075.sql
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/baseline_clients_city_seen_v1: backfill.yaml
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_backend_derived/event_monitoring_live_v1/materialized_view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_backend_derived/event_monitoring_live_v1/materialized_view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_backend_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_backend_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:31:07.000000000 +0000
@@ -53,7 +53,7 @@
 FROM
   combined
 WHERE
-  DATE(submission_timestamp) >= "2025-10-08"
+  DATE(submission_timestamp) >= "2025-10-14"
 GROUP BY
   submission_date,
   window_start,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_daily_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_daily_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_daily_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_daily_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -39,7 +39,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -49,7 +49,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -48,7 +48,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/event_monitoring_live_v1/materialized_view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/event_monitoring_live_v1/materialized_view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:31:07.000000000 +0000
@@ -53,7 +53,7 @@
 FROM
   combined
 WHERE
-  DATE(submission_timestamp) >= "2025-10-08"
+  DATE(submission_timestamp) >= "2025-10-14"
 GROUP BY
   submission_date,
   window_start,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/metrics_clients_daily_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/metrics_clients_daily_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/metrics_clients_daily_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_cirrus_derived/metrics_clients_daily_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -34,7 +34,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_frontend_derived/event_monitoring_live_v1/materialized_view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_frontend_derived/event_monitoring_live_v1/materialized_view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/accounts_frontend_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/accounts_frontend_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:31:07.000000000 +0000
@@ -53,7 +53,7 @@
 FROM
   combined
 WHERE
-  DATE(submission_timestamp) >= "2025-10-08"
+  DATE(submission_timestamp) >= "2025-10-14"
 GROUP BY
   submission_date,
   window_start,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/bedrock_derived/event_monitoring_live_v1/materialized_view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/bedrock_derived/event_monitoring_live_v1/materialized_view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/bedrock_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/bedrock_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:31:07.000000000 +0000
@@ -119,7 +119,7 @@
 FROM
   combined
 WHERE
-  DATE(submission_timestamp) >= "2025-10-08"
+  DATE(submission_timestamp) >= "2025-10-14"
 GROUP BY
   submission_date,
   window_start,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_daily_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_daily_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_daily_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_daily_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -39,7 +39,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_first_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_first_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_first_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_first_seen_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -49,7 +49,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_last_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_last_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_last_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/baseline_clients_last_seen_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -48,7 +48,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_daily_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_daily_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_daily_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_daily_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -34,7 +34,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_last_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_last_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_last_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/burnham_derived/metrics_clients_last_seen_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -48,7 +48,7 @@
   enabled: false
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates/schema.yaml	2025-10-14 18:27:22.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates/schema.yaml	2025-10-14 18:33:07.000000000 +0000
@@ -1,49 +1,49 @@
 fields:
-- mode: NULLABLE
-  name: submission_date
+- name: submission_date
   type: DATE
-- mode: NULLABLE
-  name: source
+  mode: NULLABLE
+- name: source
   type: STRING
-- mode: NULLABLE
-  name: event_type
+  mode: NULLABLE
+- name: event_type
   type: STRING
-- mode: NULLABLE
-  name: form_factor
+  mode: NULLABLE
+- name: form_factor
   type: STRING
-- mode: NULLABLE
-  name: country
+  mode: NULLABLE
+- name: country
   type: STRING
-- mode: NULLABLE
-  name: subdivision1
+  mode: NULLABLE
+- name: subdivision1
   type: STRING
-- mode: NULLABLE
-  name: advertiser
+  mode: NULLABLE
+- name: advertiser
   type: STRING
-- mode: NULLABLE
-  name: release_channel
+  mode: NULLABLE
+- name: release_channel
   type: STRING
-- mode: NULLABLE
-  name: position
+  mode: NULLABLE
+- name: position
   type: INTEGER
-- mode: NULLABLE
-  name: provider
+  mode: NULLABLE
+- name: provider
   type: STRING
-- mode: NULLABLE
-  name: match_type
+  mode: NULLABLE
+- name: match_type
   type: STRING
-- mode: NULLABLE
-  name: normalized_os
+  mode: NULLABLE
+- name: normalized_os
   type: STRING
-- mode: NULLABLE
-  name: suggest_data_sharing_enabled
+  mode: NULLABLE
+- name: suggest_data_sharing_enabled
   type: BOOLEAN
-- mode: NULLABLE
-  name: event_count
+  mode: NULLABLE
+- name: event_count
   type: INTEGER
-- mode: NULLABLE
-  name: user_count
+  mode: NULLABLE
+- name: user_count
   type: INTEGER
-- mode: NULLABLE
-  name: query_type
+  mode: NULLABLE
+- name: query_type
   type: STRING
+  mode: NULLABLE
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates_suggest/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates_suggest/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates_suggest/schema.yaml	2025-10-14 18:27:22.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates_suggest/schema.yaml	2025-10-14 18:33:14.000000000 +0000
@@ -1,40 +1,40 @@
 fields:
-- mode: NULLABLE
-  name: submission_date
+- name: submission_date
   type: DATE
-- mode: NULLABLE
-  name: form_factor
+  mode: NULLABLE
+- name: form_factor
   type: STRING
-- mode: NULLABLE
-  name: country
+  mode: NULLABLE
+- name: country
   type: STRING
-- mode: NULLABLE
-  name: advertiser
+  mode: NULLABLE
+- name: advertiser
   type: STRING
-- mode: NULLABLE
-  name: normalized_os
+  mode: NULLABLE
+- name: normalized_os
   type: STRING
-- mode: NULLABLE
-  name: release_channel
+  mode: NULLABLE
+- name: release_channel
   type: STRING
-- mode: NULLABLE
-  name: position
+  mode: NULLABLE
+- name: position
   type: INTEGER
-- mode: NULLABLE
-  name: provider
+  mode: NULLABLE
+- name: provider
   type: STRING
-- mode: NULLABLE
-  name: match_type
+  mode: NULLABLE
+- name: match_type
   type: STRING
-- mode: NULLABLE
-  name: suggest_data_sharing_enabled
+  mode: NULLABLE
+- name: suggest_data_sharing_enabled
   type: BOOLEAN
-- mode: NULLABLE
-  name: impression_count
+  mode: NULLABLE
+- name: impression_count
   type: INTEGER
-- mode: NULLABLE
-  name: click_count
+  mode: NULLABLE
+- name: click_count
   type: INTEGER
-- mode: NULLABLE
-  name: query_type
+  mode: NULLABLE
+- name: query_type
   type: STRING
+  mode: NULLABLE
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/debug_ping_view_derived/event_monitoring_live_v1/materialized_view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/debug_ping_view_derived/event_monitoring_live_v1/materialized_view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/debug_ping_view_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/debug_ping_view_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:31:07.000000000 +0000
@@ -53,7 +53,7 @@
 FROM
   combined
 WHERE
-  DATE(submission_timestamp) >= "2025-10-08"
+  DATE(submission_timestamp) >= "2025-10-14"
 GROUP BY
   submission_date,
   window_start,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_daily_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_daily_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_daily_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_daily_v1/metadata.yaml	2025-10-14 18:42:07.000000000 +0000
@@ -39,7 +39,7 @@
   enabled: true
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_first_seen_v1/metadata.yaml	2025-10-14 18:42:07.000000000 +0000
@@ -49,7 +49,7 @@
   enabled: true
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/baseline_clients_last_seen_v1/metadata.yaml	2025-10-14 18:42:07.000000000 +0000
@@ -51,7 +51,7 @@
   enabled: true
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/event_monitoring_live_v1/materialized_view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/event_monitoring_live_v1/materialized_view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/event_monitoring_live_v1/materialized_view.sql	2025-10-14 18:31:07.000000000 +0000
@@ -53,7 +53,7 @@
 FROM
   combined
 WHERE
-  DATE(submission_timestamp) >= "2025-10-08"
+  DATE(submission_timestamp) >= "2025-10-14"
 GROUP BY
   submission_date,
   window_start,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/metrics_clients_daily_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/metrics_clients_daily_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/metrics_clients_daily_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/experimenter_cirrus_derived/metrics_clients_daily_v1/metadata.yaml	2025-10-14 18:42:07.000000000 +0000
@@ -34,7 +34,7 @@
   enabled: true
   collection: null
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
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	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/broken_site_report/metadata.yaml	2025-10-14 18:42:07.000000000 +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: []
 labels: {}
 bigquery: null
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	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/crash/metadata.yaml	2025-10-14 18:42:08.000000000 +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: []
 labels: {}
 bigquery: null
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_clients/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_clients/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_clients/schema.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_clients/schema.yaml	2025-10-14 18:32:25.000000000 +0000
@@ -26,6 +26,9 @@
 - name: adjust_network
   type: STRING
   mode: NULLABLE
+- name: install_source
+  type: STRING
+  mode: NULLABLE
 - name: retained_week_2
   type: BOOLEAN
   mode: NULLABLE
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_week_4/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_week_4/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_week_4/schema.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_week_4/schema.yaml	2025-10-14 18:32:38.000000000 +0000
@@ -48,6 +48,9 @@
   description: 'The type of source of a client installation.
 
     '
+- name: install_source
+  type: STRING
+  mode: NULLABLE
 - name: new_profiles
   type: INTEGER
   mode: NULLABLE
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/schema.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/schema.yaml	2025-10-14 18:39:38.000000000 +0000
@@ -1068,6 +1068,11 @@
         default: true
 
         '
+    - name: preferences_global_privacy_control_enabled
+      type: BOOLEAN
+      mode: NULLABLE
+      description: Measures user retention of the Global Privacy Control (GPC) setting
+        at start-up.
   - name: counter
     type: RECORD
     mode: NULLABLE
@@ -3105,6 +3110,14 @@
         is simply a count based on the sniffed MIME type.
 
         '
+    - name: update_state_write_failure
+      type: INTEGER
+      mode: NULLABLE
+      description: 'Update: Count of the number of times we have shown a notification
+        to the user that they need to manually update because we cannot write to the
+        update status file.
+
+        '
   - name: custom_distribution
     type: RECORD
     mode: NULLABLE
@@ -17977,6 +17990,34 @@
       description: 'Counts the number of times the user edits or deletes comments.
 
         '
+    - name: power_cpu_ms_per_thread_inference_process
+      type: RECORD
+      mode: REPEATED
+      fields:
+      - name: key
+        type: STRING
+        mode: NULLABLE
+      - name: value
+        type: INTEGER
+        mode: NULLABLE
+      description: 'How many miliseconds of CPU time were used. Broken down by thread
+        name for a given process type.
+
+        '
+    - name: power_wakeups_per_thread_inference_process
+      type: RECORD
+      mode: REPEATED
+      fields:
+      - name: key
+        type: STRING
+        mode: NULLABLE
+      - name: value
+        type: INTEGER
+        mode: NULLABLE
+      description: 'How many times threads woke up and could have woken up a CPU core.
+        Broken down by thread name for a given process type.
+
+        '
   - name: quantity
     type: RECORD
     mode: NULLABLE
@@ -19178,6 +19219,23 @@
       description: 'The mode of the toolbar. Possible values are: simple or expanded.
 
         '
+    - name: preferences_doh_protection_level
+      type: STRING
+      mode: NULLABLE
+      description: 'Measures user retention of the DNS over HTTPS (DoH) setting at
+        start-up.
+
+        Example values include: "Default", "Increased", "Max", "Off".
+
+        '
+    - name: preferences_https_only_mode
+      type: STRING
+      mode: NULLABLE
+      description: 'Measures user retention of the HTTPS-Only setting at start-up.
+
+        Example values include: "DISABLED", "ENABLED_PRIVATE_ONLY", "ENABLED".
+
+        '
   - name: string_list
     type: RECORD
     mode: NULLABLE
@@ -40219,7 +40277,8 @@
         - name: value
           type: INTEGER
           mode: NULLABLE
-      description: 'Memory used by the garbage-collected JavaScript heap (KB)
+      description: 'Memory used by the garbage-collected JavaScript heap (KB) by process
+        type
 
         This metric was generated to correspond to the Legacy Telemetry exponential
         histogram MEMORY_JS_GC_HEAP.
@@ -40247,7 +40306,7 @@
         - name: value
           type: INTEGER
           mode: NULLABLE
-      description: 'Resident memory size (KB)
+      description: 'Resident memory size (KB) by process type
 
         This metric was generated to correspond to the Legacy Telemetry exponential
         histogram MEMORY_RESIDENT_FAST.
@@ -40275,7 +40334,7 @@
         - name: value
           type: INTEGER
           mode: NULLABLE
-      description: 'Peak resident memory size (KB)
+      description: 'Peak resident memory size (KB) by process type
 
         This metric was generated to correspond to the Legacy Telemetry exponential
         histogram MEMORY_RESIDENT_PEAK.
@@ -40360,7 +40419,7 @@
         - name: value
           type: INTEGER
           mode: NULLABLE
-      description: 'Unique Set Size (KB)
+      description: 'Unique Set Size (KB) by process type
 
         This metric was generated to correspond to the Legacy Telemetry exponential
         histogram MEMORY_UNIQUE.
@@ -47157,6 +47216,147 @@
         page itself or the sum of subresources.
 
         '
+    - name: memory_js_gc_heap
+      type: RECORD
+      mode: REPEATED
+      fields:
+      - name: key
+        type: STRING
+        mode: NULLABLE
+      - name: value
+        type: RECORD
+        mode: NULLABLE
+        fields:
+        - name: count
+          type: INTEGER
+          mode: NULLABLE
+          description: This was accidentally sent in the past and is now deprecated.
+            See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5
+        - name: sum
+          type: INTEGER
+          mode: NULLABLE
+        - name: values
+          type: RECORD
+          mode: REPEATED
+          fields:
+          - name: key
+            type: STRING
+            mode: NULLABLE
+          - name: value
+            type: INTEGER
+            mode: NULLABLE
+      description: 'Memory used by the garbage-collected JavaScript heap (KB) by process
+        type
+
+        This metric was generated to correspond to the Legacy Telemetry exponential
+        histogram MEMORY_JS_GC_HEAP.
+
+        '
+    - name: memory_resident_fast
+      type: RECORD
+      mode: REPEATED
+      fields:
+      - name: key
+        type: STRING
+        mode: NULLABLE
+      - name: value
+        type: RECORD
+        mode: NULLABLE
+        fields:
+        - name: count
+          type: INTEGER
+          mode: NULLABLE
+          description: This was accidentally sent in the past and is now deprecated.
+            See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5
+        - name: sum
+          type: INTEGER
+          mode: NULLABLE
+        - name: values
+          type: RECORD
+          mode: REPEATED
+          fields:
+          - name: key
+            type: STRING
+            mode: NULLABLE
+          - name: value
+            type: INTEGER
+            mode: NULLABLE
+      description: 'Resident memory size (KB) by process type
+
+        This metric was generated to correspond to the Legacy Telemetry exponential
+        histogram MEMORY_RESIDENT_FAST.
+
+        '
+    - name: memory_resident_peak
+      type: RECORD
+      mode: REPEATED
+      fields:
+      - name: key
+        type: STRING
+        mode: NULLABLE
+      - name: value
+        type: RECORD
+        mode: NULLABLE
+        fields:
+        - name: count
+          type: INTEGER
+          mode: NULLABLE
+          description: This was accidentally sent in the past and is now deprecated.
+            See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5
+        - name: sum
+          type: INTEGER
+          mode: NULLABLE
+        - name: values
+          type: RECORD
+          mode: REPEATED
+          fields:
+          - name: key
+            type: STRING
+            mode: NULLABLE
+          - name: value
+            type: INTEGER
+            mode: NULLABLE
+      description: 'Peak resident memory size (KB) by process type
+
+        This metric was generated to correspond to the Legacy Telemetry exponential
+        histogram MEMORY_RESIDENT_PEAK.
+
+        '
+    - name: memory_unique
+      type: RECORD
+      mode: REPEATED
+      fields:
+      - name: key
+        type: STRING
+        mode: NULLABLE
+      - name: value
+        type: RECORD
+        mode: NULLABLE
+        fields:
+        - name: count
+          type: INTEGER
+          mode: NULLABLE
+          description: This was accidentally sent in the past and is now deprecated.
+            See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5
+        - name: sum
+          type: INTEGER
+          mode: NULLABLE
+        - name: values
+          type: RECORD
+          mode: REPEATED
+          fields:
+          - name: key
+            type: STRING
+            mode: NULLABLE
+          - name: value
+            type: INTEGER
+            mode: NULLABLE
+      description: 'Unique Set Size (KB) by process type
+
+        This metric was generated to correspond to the Legacy Telemetry exponential
+        histogram MEMORY_UNIQUE.
+
+        '
   - name: dual_labeled_counter
     type: RECORD
     mode: NULLABLE
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/view.sql	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/metrics/view.sql	2025-10-14 18:31:43.000000000 +0000
@@ -121,7 +121,8 @@
       metrics.boolean.contentblocking_tp_allowlist_convenience_enabled,
       metrics.boolean.preferences_isolated_content_processes_enabled,
       metrics.boolean.preferences_show_non_sponsor_suggestions_enabled,
-      metrics.boolean.preferences_show_sponsor_suggestions_enabled
+      metrics.boolean.preferences_show_sponsor_suggestions_enabled,
+      metrics.boolean.preferences_global_privacy_control_enabled
     ) AS `boolean`,
     STRUCT(
       metrics.counter.events_total_uri_count,
@@ -365,7 +366,8 @@
       metrics.counter.terms_of_use_dismiss_count,
       metrics.counter.terms_of_use_impression_count,
       metrics.counter.terms_of_use_remind_me_later_count,
-      metrics.counter.media_mkv_content_count
+      metrics.counter.media_mkv_content_count,
+      metrics.counter.update_state_write_failure
     ) AS `counter`,
     STRUCT(
       metrics.custom_distribution.geckoview_document_site_origins,
@@ -1067,7 +1069,9 @@
       metrics.labeled_counter.urlclassifier_lookup_miss,
       metrics.labeled_counter.profiles_creation_place,
       metrics.labeled_counter.media_recorder_mime_type_query,
-      metrics.labeled_counter.pdfjs_comment_edit
+      metrics.labeled_counter.pdfjs_comment_edit,
+      metrics.labeled_counter.power_cpu_ms_per_thread_inference_process,
+      metrics.labeled_counter.power_wakeups_per_thread_inference_process
     ) AS `labeled_counter`,
     STRUCT(
       metrics.quantity.gfx_adapter_primary_ram,
@@ -1213,7 +1217,9 @@
       metrics.string.system_win_package_family_name,
       metrics.string.update_settings_channel,
       metrics.string.xpi_database_startup_error,
-      metrics.string.preferences_toolbar_mode_setting
+      metrics.string.preferences_toolbar_mode_setting,
+      metrics.string.preferences_doh_protection_level,
+      metrics.string.preferences_https_only_mode
     ) AS `string`,
     STRUCT(
       metrics.string_list.metrics_mozilla_products,
@@ -1973,7 +1979,11 @@
       metrics.labeled_memory_distribution.network_cache_size,
       metrics.labeled_memory_distribution.networking_trr_request_size,
       metrics.labeled_memory_distribution.networking_trr_response_size,
-      metrics.labeled_memory_distribution.network_page_load_size
+      metrics.labeled_memory_distribution.network_page_load_size,
+      metrics.labeled_memory_distribution.memory_js_gc_heap,
+      metrics.labeled_memory_distribution.memory_resident_fast,
+      metrics.labeled_memory_distribution.memory_resident_peak,
+      metrics.labeled_memory_distribution.memory_unique
     ) AS `labeled_memory_distribution`,
     STRUCT(
       metrics.dual_labeled_counter.application_reputation_server_verdict_2,
@@ -2143,7 +2153,8 @@
       metrics.boolean.contentblocking_tp_allowlist_convenience_enabled,
       metrics.boolean.preferences_isolated_content_processes_enabled,
       metrics.boolean.preferences_show_non_sponsor_suggestions_enabled,
-      metrics.boolean.preferences_show_sponsor_suggestions_enabled
+      metrics.boolean.preferences_show_sponsor_suggestions_enabled,
+      metrics.boolean.preferences_global_privacy_control_enabled
     ) AS `boolean`,
     STRUCT(
       metrics.counter.events_total_uri_count,
@@ -2387,7 +2398,8 @@
       metrics.counter.terms_of_use_dismiss_count,
       metrics.counter.terms_of_use_impression_count,
       metrics.counter.terms_of_use_remind_me_later_count,
-      metrics.counter.media_mkv_content_count
+      metrics.counter.media_mkv_content_count,
+      metrics.counter.update_state_write_failure
     ) AS `counter`,
     STRUCT(
       metrics.custom_distribution.geckoview_document_site_origins,
@@ -3089,7 +3101,9 @@
       metrics.labeled_counter.urlclassifier_lookup_miss,
       metrics.labeled_counter.profiles_creation_place,
       metrics.labeled_counter.media_recorder_mime_type_query,
-      metrics.labeled_counter.pdfjs_comment_edit
+      metrics.labeled_counter.pdfjs_comment_edit,
+      metrics.labeled_counter.power_cpu_ms_per_thread_inference_process,
+      metrics.labeled_counter.power_wakeups_per_thread_inference_process
     ) AS `labeled_counter`,
     STRUCT(
       metrics.quantity.gfx_adapter_primary_ram,
@@ -3235,7 +3249,9 @@
       metrics.string.system_win_package_family_name,
       metrics.string.update_settings_channel,
       metrics.string.xpi_database_startup_error,
-      metrics.string.preferences_toolbar_mode_setting
+      metrics.string.preferences_toolbar_mode_setting,
+      metrics.string.preferences_doh_protection_level,
+      metrics.string.preferences_https_only_mode
     ) AS `string`,
     STRUCT(
       metrics.string_list.metrics_mozilla_products,
@@ -3995,7 +4011,11 @@
       metrics.labeled_memory_distribution.network_cache_size,
       metrics.labeled_memory_distribution.networking_trr_request_size,
       metrics.labeled_memory_distribution.networking_trr_response_size,
-      metrics.labeled_memory_distribution.network_page_load_size
+      metrics.labeled_memory_distribution.network_page_load_size,
+      metrics.labeled_memory_distribution.memory_js_gc_heap,
+      metrics.labeled_memory_distribution.memory_resident_fast,
+      metrics.labeled_memory_distribution.memory_resident_peak,
+      metrics.labeled_memory_distribution.memory_unique
     ) AS `labeled_memory_distribution`,
     STRUCT(
       metrics.dual_labeled_counter.application_reputation_server_verdict_2,
@@ -4185,7 +4205,8 @@
       metrics.boolean.contentblocking_tp_allowlist_convenience_enabled,
       metrics.boolean.preferences_isolated_content_processes_enabled,
       metrics.boolean.preferences_show_non_sponsor_suggestions_enabled,
-      metrics.boolean.preferences_show_sponsor_suggestions_enabled
+      metrics.boolean.preferences_show_sponsor_suggestions_enabled,
+      metrics.boolean.preferences_global_privacy_control_enabled
     ) AS `boolean`,
     STRUCT(
       metrics.counter.events_total_uri_count,
@@ -4429,7 +4450,8 @@
       metrics.counter.terms_of_use_dismiss_count,
       metrics.counter.terms_of_use_impression_count,
       metrics.counter.terms_of_use_remind_me_later_count,
-      metrics.counter.media_mkv_content_count
+      metrics.counter.media_mkv_content_count,
+      metrics.counter.update_state_write_failure
     ) AS `counter`,
     STRUCT(
       metrics.custom_distribution.geckoview_document_site_origins,
@@ -5131,7 +5153,9 @@
       metrics.labeled_counter.urlclassifier_lookup_miss,
       metrics.labeled_counter.profiles_creation_place,
       metrics.labeled_counter.media_recorder_mime_type_query,
-      metrics.labeled_counter.pdfjs_comment_edit
+      metrics.labeled_counter.pdfjs_comment_edit,
+      metrics.labeled_counter.power_cpu_ms_per_thread_inference_process,
+      metrics.labeled_counter.power_wakeups_per_thread_inference_process
     ) AS `labeled_counter`,
     STRUCT(
       metrics.quantity.gfx_adapter_primary_ram,
@@ -5277,7 +5301,9 @@
       metrics.string.system_win_package_family_name,
       metrics.string.update_settings_channel,
       metrics.string.xpi_database_startup_error,
-      metrics.string.preferences_toolbar_mode_setting
+      metrics.string.preferences_toolbar_mode_setting,
+      metrics.string.preferences_doh_protection_level,
+      metrics.string.preferences_https_only_mode
     ) AS `string`,
     STRUCT(
       metrics.string_list.metrics_mozilla_products,
@@ -6037,7 +6063,11 @@
       metrics.labeled_memory_distribution.network_cache_size,
       metrics.labeled_memory_distribution.networking_trr_request_size,
       metrics.labeled_memory_distribution.networking_trr_response_size,
-      metrics.labeled_memory_distribution.network_page_load_size
+      metrics.labeled_memory_distribution.network_page_load_size,
+      metrics.labeled_memory_distribution.memory_js_gc_heap,
+      metrics.labeled_memory_distribution.memory_resident_fast,
+      metrics.labeled_memory_distribution.memory_resident_peak,
+      metrics.labeled_memory_distribution.memory_unique
     ) AS `labeled_memory_distribution`,
     STRUCT(
       metrics.dual_labeled_counter.application_reputation_server_verdict_2,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/attribution_clients_v1/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/attribution_clients_v1/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/attribution_clients_v1/metadata.yaml	2025-10-14 18:27:23.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/attribution_clients_v1/metadata.yaml	2025-10-14 18:42:09.000000000 +0000
@@ -41,7 +41,7 @@
   enabled: true
   collection: Operational Checks
   partition_column: null
-  partition_column_set: true
+  partition_column_set: false
   freshness:
     blocking: false
   volume:
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill_query_do2075.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill_query_do2075.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill_query_do2075.sql	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill_query_do2075.sql	2025-10-14 18:31:56.000000000 +0000
@@ -0,0 +1,706 @@
+ -- Query generated via sql_generators.baseline_clients_city_seen.
+ -- Custom backfill query is used to initialize the tables using stable tables
+WITH base_org_mozilla_firefox AS (
+  SELECT
+    submission_timestamp,
+    DATE(submission_timestamp) AS submission_date,
+    LOWER(client_info.client_id) AS client_id,
+    sample_id,
+    metadata.geo.city AS city,
+    metadata.geo.subdivision1 AS subdivision1,
+    metadata.geo.subdivision2 AS subdivision2,
+    metadata.geo.country AS country
+  FROM
+    `moz-fx-data-shared-prod.org_mozilla_firefox_stable.baseline_v1`
+  WHERE
+    client_info.client_id IS NOT NULL
+    AND sample_id = 0
+    AND DATE(submission_timestamp) = @submission_date
+),
+overactive_org_mozilla_firefox AS (
+  -- Find client_ids with over 150 000 pings in a day,
+  -- which could cause errors in the next step due to aggregation overflows.
+  SELECT
+    submission_date,
+    client_id
+  FROM
+    base_org_mozilla_firefox
+  GROUP BY
+    submission_date,
+    client_id
+  HAVING
+    COUNT(*) > 150000
+),
+clients_daily_org_mozilla_firefox AS (
+  SELECT
+    "org_mozilla_firefox" AS app_id,
+    submission_date,
+    client_id,
+    sample_id,
+    `moz-fx-data-shared-prod.udf.mode_last`(
+      ARRAY_AGG(STRUCT(city, subdivision1, subdivision2, country) ORDER BY submission_timestamp)
+    ) AS geo
+  FROM
+    base_org_mozilla_firefox
+  LEFT JOIN
+    overactive_org_mozilla_firefox
+    USING (submission_date, client_id)
+  WHERE
+    overactive_org_mozilla_firefox.client_id IS NULL
+    -- `mode_last` can result in struct with all null values if it’s most frequent (or latest among ties).
+    -- This exclude structs with all null values so there will always be one non-NULL field.
+    AND COALESCE(city, subdivision1, subdivision2, country) IS NOT NULL
+  GROUP BY
+    submission_date,
+    client_id,
+    sample_id
+),
+_previous_org_mozilla_firefox AS (
+  SELECT
+    *
+  FROM
+    `moz-fx-data-shared-prod.fenix_derived.baseline_clients_city_seen_v1`
+  WHERE
+    app_id = "org_mozilla_firefox"
+),
+_current_org_mozilla_firefox AS (
+  SELECT
+    app_id,
+    client_id,
+    sample_id,
+    submission_date AS first_seen_city_date,
+    geo.city AS first_seen_city,
+    geo.subdivision1 AS first_seen_subdivision1,
+    geo.subdivision2 AS first_seen_subdivision2,
+    geo.country AS first_seen_country,
+    submission_date AS last_seen_city_date,
+    geo.city AS last_seen_city,
+    geo.subdivision1 AS last_seen_subdivision1,
+    geo.subdivision2 AS last_seen_subdivision2,
+    geo.country AS last_seen_country
+  FROM
+    clients_daily_org_mozilla_firefox
+  WHERE
+    geo.city IS NOT NULL
+),
+base_org_mozilla_firefox_beta AS (
+  SELECT
+    submission_timestamp,
+    DATE(submission_timestamp) AS submission_date,
+    LOWER(client_info.client_id) AS client_id,
+    sample_id,
+    metadata.geo.city AS city,
+    metadata.geo.subdivision1 AS subdivision1,
+    metadata.geo.subdivision2 AS subdivision2,
+    metadata.geo.country AS country
+  FROM
+    `moz-fx-data-shared-prod.org_mozilla_firefox_beta_stable.baseline_v1`
+  WHERE
+    client_info.client_id IS NOT NULL
+    AND sample_id = 0
+    AND DATE(submission_timestamp) = @submission_date
+),
+overactive_org_mozilla_firefox_beta AS (
+  -- Find client_ids with over 150 000 pings in a day,
+  -- which could cause errors in the next step due to aggregation overflows.
+  SELECT
+    submission_date,
+    client_id
+  FROM
+    base_org_mozilla_firefox_beta
+  GROUP BY
+    submission_date,
+    client_id
+  HAVING
+    COUNT(*) > 150000
+),
+clients_daily_org_mozilla_firefox_beta AS (
+  SELECT
+    "org_mozilla_firefox_beta" AS app_id,
+    submission_date,
+    client_id,
+    sample_id,
+    `moz-fx-data-shared-prod.udf.mode_last`(
+      ARRAY_AGG(STRUCT(city, subdivision1, subdivision2, country) ORDER BY submission_timestamp)
+    ) AS geo
+  FROM
+    base_org_mozilla_firefox_beta
+  LEFT JOIN
+    overactive_org_mozilla_firefox_beta
+    USING (submission_date, client_id)
+  WHERE
+    overactive_org_mozilla_firefox_beta.client_id IS NULL
+    -- `mode_last` can result in struct with all null values if it’s most frequent (or latest among ties).
+    -- This exclude structs with all null values so there will always be one non-NULL field.
+    AND COALESCE(city, subdivision1, subdivision2, country) IS NOT NULL
+  GROUP BY
+    submission_date,
+    client_id,
+    sample_id
+),
+_previous_org_mozilla_firefox_beta AS (
+  SELECT
+    *
+  FROM
+    `moz-fx-data-shared-prod.fenix_derived.baseline_clients_city_seen_v1`
+  WHERE
+    app_id = "org_mozilla_firefox_beta"
+),
+_current_org_mozilla_firefox_beta AS (
+  SELECT
+    app_id,
+    client_id,
+    sample_id,
+    submission_date AS first_seen_city_date,
+    geo.city AS first_seen_city,
+    geo.subdivision1 AS first_seen_subdivision1,
+    geo.subdivision2 AS first_seen_subdivision2,
+    geo.country AS first_seen_country,
+    submission_date AS last_seen_city_date,
+    geo.city AS last_seen_city,
+    geo.subdivision1 AS last_seen_subdivision1,
+    geo.subdivision2 AS last_seen_subdivision2,
+    geo.country AS last_seen_country
+  FROM
+    clients_daily_org_mozilla_firefox_beta
+  WHERE
+    geo.city IS NOT NULL
+),
+base_org_mozilla_fenix AS (
+  SELECT
+    submission_timestamp,
+    DATE(submission_timestamp) AS submission_date,
+    LOWER(client_info.client_id) AS client_id,
+    sample_id,
+    metadata.geo.city AS city,
+    metadata.geo.subdivision1 AS subdivision1,
+    metadata.geo.subdivision2 AS subdivision2,
+    metadata.geo.country AS country
+  FROM
+    `moz-fx-data-shared-prod.org_mozilla_fenix_stable.baseline_v1`
+  WHERE
+    client_info.client_id IS NOT NULL
+    AND sample_id = 0
+    AND DATE(submission_timestamp) = @submission_date
+),
+overactive_org_mozilla_fenix AS (
+  -- Find client_ids with over 150 000 pings in a day,
+  -- which could cause errors in the next step due to aggregation overflows.
+  SELECT
+    submission_date,
+    client_id
+  FROM
+    base_org_mozilla_fenix
+  GROUP BY
+    submission_date,
+    client_id
+  HAVING
+    COUNT(*) > 150000
+),
+clients_daily_org_mozilla_fenix AS (
+  SELECT
+    "org_mozilla_fenix" AS app_id,
+    submission_date,
+    client_id,
+    sample_id,
+    `moz-fx-data-shared-prod.udf.mode_last`(
+      ARRAY_AGG(STRUCT(city, subdivision1, subdivision2, country) ORDER BY submission_timestamp)
+    ) AS geo
+  FROM
+    base_org_mozilla_fenix
+  LEFT JOIN
+    overactive_org_mozilla_fenix
+    USING (submission_date, client_id)
+  WHERE
+    overactive_org_mozilla_fenix.client_id IS NULL
+    -- `mode_last` can result in struct with all null values if it’s most frequent (or latest among ties).
+    -- This exclude structs with all null values so there will always be one non-NULL field.
+    AND COALESCE(city, subdivision1, subdivision2, country) IS NOT NULL
+  GROUP BY
+    submission_date,
+    client_id,
+    sample_id
+),
+_previous_org_mozilla_fenix AS (
+  SELECT
+    *
+  FROM
+    `moz-fx-data-shared-prod.fenix_derived.baseline_clients_city_seen_v1`
+  WHERE
+    app_id = "org_mozilla_fenix"
+),
+_current_org_mozilla_fenix AS (
+  SELECT
+    app_id,
+    client_id,
+    sample_id,
+    submission_date AS first_seen_city_date,
+    geo.city AS first_seen_city,
+    geo.subdivision1 AS first_seen_subdivision1,
+    geo.subdivision2 AS first_seen_subdivision2,
+    geo.country AS first_seen_country,
+    submission_date AS last_seen_city_date,
+    geo.city AS last_seen_city,
+    geo.subdivision1 AS last_seen_subdivision1,
+    geo.subdivision2 AS last_seen_subdivision2,
+    geo.country AS last_seen_country
+  FROM
+    clients_daily_org_mozilla_fenix
+  WHERE
+    geo.city IS NOT NULL
+),
+base_org_mozilla_fenix_nightly AS (
+  SELECT
+    submission_timestamp,
+    DATE(submission_timestamp) AS submission_date,
+    LOWER(client_info.client_id) AS client_id,
+    sample_id,
+    metadata.geo.city AS city,
+    metadata.geo.subdivision1 AS subdivision1,
+    metadata.geo.subdivision2 AS subdivision2,
+    metadata.geo.country AS country
+  FROM
+    `moz-fx-data-shared-prod.org_mozilla_fenix_nightly_stable.baseline_v1`
+  WHERE
+    client_info.client_id IS NOT NULL
+    AND sample_id = 0
+    AND DATE(submission_timestamp) = @submission_date
+),
+overactive_org_mozilla_fenix_nightly AS (
+  -- Find client_ids with over 150 000 pings in a day,
+  -- which could cause errors in the next step due to aggregation overflows.
+  SELECT
+    submission_date,
+    client_id
+  FROM
+    base_org_mozilla_fenix_nightly
+  GROUP BY
+    submission_date,
+    client_id
+  HAVING
+    COUNT(*) > 150000
+),
+clients_daily_org_mozilla_fenix_nightly AS (
+  SELECT
+    "org_mozilla_fenix_nightly" AS app_id,
+    submission_date,
+    client_id,
+    sample_id,
+    `moz-fx-data-shared-prod.udf.mode_last`(
+      ARRAY_AGG(STRUCT(city, subdivision1, subdivision2, country) ORDER BY submission_timestamp)
+    ) AS geo
+  FROM
+    base_org_mozilla_fenix_nightly
+  LEFT JOIN
+    overactive_org_mozilla_fenix_nightly
+    USING (submission_date, client_id)
+  WHERE
+    overactive_org_mozilla_fenix_nightly.client_id IS NULL
+    -- `mode_last` can result in struct with all null values if it’s most frequent (or latest among ties).
+    -- This exclude structs with all null values so there will always be one non-NULL field.
+    AND COALESCE(city, subdivision1, subdivision2, country) IS NOT NULL
+  GROUP BY
+    submission_date,
+    client_id,
+    sample_id
+),
+_previous_org_mozilla_fenix_nightly AS (
+  SELECT
+    *
+  FROM
+    `moz-fx-data-shared-prod.fenix_derived.baseline_clients_city_seen_v1`
+  WHERE
+    app_id = "org_mozilla_fenix_nightly"
+),
+_current_org_mozilla_fenix_nightly AS (
+  SELECT
+    app_id,
+    client_id,
+    sample_id,
+    submission_date AS first_seen_city_date,
+    geo.city AS first_seen_city,
+    geo.subdivision1 AS first_seen_subdivision1,
+    geo.subdivision2 AS first_seen_subdivision2,
+    geo.country AS first_seen_country,
+    submission_date AS last_seen_city_date,
+    geo.city AS last_seen_city,
+    geo.subdivision1 AS last_seen_subdivision1,
+    geo.subdivision2 AS last_seen_subdivision2,
+    geo.country AS last_seen_country
+  FROM
+    clients_daily_org_mozilla_fenix_nightly
+  WHERE
+    geo.city IS NOT NULL
+),
+base_org_mozilla_fennec_aurora AS (
+  SELECT
+    submission_timestamp,
+    DATE(submission_timestamp) AS submission_date,
+    LOWER(client_info.client_id) AS client_id,
+    sample_id,
+    metadata.geo.city AS city,
+    metadata.geo.subdivision1 AS subdivision1,
+    metadata.geo.subdivision2 AS subdivision2,
+    metadata.geo.country AS country
+  FROM
+    `moz-fx-data-shared-prod.org_mozilla_fennec_aurora_stable.baseline_v1`
+  WHERE
+    client_info.client_id IS NOT NULL
+    AND sample_id = 0
+    AND DATE(submission_timestamp) = @submission_date
+),
+overactive_org_mozilla_fennec_aurora AS (
+  -- Find client_ids with over 150 000 pings in a day,
+  -- which could cause errors in the next step due to aggregation overflows.
+  SELECT
+    submission_date,
+    client_id
+  FROM
+    base_org_mozilla_fennec_aurora
+  GROUP BY
+    submission_date,
+    client_id
+  HAVING
+    COUNT(*) > 150000
+),
+clients_daily_org_mozilla_fennec_aurora AS (
+  SELECT
+    "org_mozilla_fennec_aurora" AS app_id,
+    submission_date,
+    client_id,
+    sample_id,
+    `moz-fx-data-shared-prod.udf.mode_last`(
+      ARRAY_AGG(STRUCT(city, subdivision1, subdivision2, country) ORDER BY submission_timestamp)
+    ) AS geo
+  FROM
+    base_org_mozilla_fennec_aurora
+  LEFT JOIN
+    overactive_org_mozilla_fennec_aurora
+    USING (submission_date, client_id)
+  WHERE
+    overactive_org_mozilla_fennec_aurora.client_id IS NULL
+    -- `mode_last` can result in struct with all null values if it’s most frequent (or latest among ties).
+    -- This exclude structs with all null values so there will always be one non-NULL field.
+    AND COALESCE(city, subdivision1, subdivision2, country) IS NOT NULL
+  GROUP BY
+    submission_date,
+    client_id,
+    sample_id
+),
+_previous_org_mozilla_fennec_aurora AS (
+  SELECT
+    *
+  FROM
+    `moz-fx-data-shared-prod.fenix_derived.baseline_clients_city_seen_v1`
+  WHERE
+    app_id = "org_mozilla_fennec_aurora"
+),
+_current_org_mozilla_fennec_aurora AS (
+  SELECT
+    app_id,
+    client_id,
+    sample_id,
+    submission_date AS first_seen_city_date,
+    geo.city AS first_seen_city,
+    geo.subdivision1 AS first_seen_subdivision1,
+    geo.subdivision2 AS first_seen_subdivision2,
+    geo.country AS first_seen_country,
+    submission_date AS last_seen_city_date,
+    geo.city AS last_seen_city,
+    geo.subdivision1 AS last_seen_subdivision1,
+    geo.subdivision2 AS last_seen_subdivision2,
+    geo.country AS last_seen_country
+  FROM
+    clients_daily_org_mozilla_fennec_aurora
+  WHERE
+    geo.city IS NOT NULL
+)
+SELECT
+-- _p.* fields are NULL for clients that are not yet captured in the baseline_city_seen derived table.
+  IF(_p.app_id IS NULL, _c.app_id, _p.app_id) AS app_id,
+  IF(_p.client_id IS NULL, _c.client_id, _p.client_id) AS client_id,
+  IF(_p.sample_id IS NULL, _c.sample_id, _p.sample_id) AS sample_id,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_city_date,
+    _p.first_seen_city_date
+  ) AS first_seen_city_date,
+  IF(_p.client_id IS NULL, _c.first_seen_city, _p.first_seen_city) AS first_seen_city,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision1,
+    _p.first_seen_subdivision1
+  ) AS first_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision2,
+    _p.first_seen_subdivision2
+  ) AS first_seen_subdivision2,
+  IF(_p.client_id IS NULL, _c.first_seen_country, _p.first_seen_country) AS first_seen_country,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city_date,
+    _p.last_seen_city_date
+  ) AS last_seen_city_date,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city,
+    _p.last_seen_city
+  ) AS last_seen_city,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision1,
+    _p.last_seen_subdivision1
+  ) AS last_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision2,
+    _p.last_seen_subdivision2
+  ) AS last_seen_subdivision2,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_country,
+    _p.last_seen_country
+  ) AS last_seen_country
+FROM
+  _current_org_mozilla_firefox AS _c
+FULL JOIN
+  _previous_org_mozilla_firefox AS _p
+  USING (client_id, sample_id, app_id)
+UNION ALL
+SELECT
+-- _p.* fields are NULL for clients that are not yet captured in the baseline_city_seen derived table.
+  IF(_p.app_id IS NULL, _c.app_id, _p.app_id) AS app_id,
+  IF(_p.client_id IS NULL, _c.client_id, _p.client_id) AS client_id,
+  IF(_p.sample_id IS NULL, _c.sample_id, _p.sample_id) AS sample_id,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_city_date,
+    _p.first_seen_city_date
+  ) AS first_seen_city_date,
+  IF(_p.client_id IS NULL, _c.first_seen_city, _p.first_seen_city) AS first_seen_city,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision1,
+    _p.first_seen_subdivision1
+  ) AS first_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision2,
+    _p.first_seen_subdivision2
+  ) AS first_seen_subdivision2,
+  IF(_p.client_id IS NULL, _c.first_seen_country, _p.first_seen_country) AS first_seen_country,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city_date,
+    _p.last_seen_city_date
+  ) AS last_seen_city_date,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city,
+    _p.last_seen_city
+  ) AS last_seen_city,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision1,
+    _p.last_seen_subdivision1
+  ) AS last_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision2,
+    _p.last_seen_subdivision2
+  ) AS last_seen_subdivision2,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_country,
+    _p.last_seen_country
+  ) AS last_seen_country
+FROM
+  _current_org_mozilla_firefox_beta AS _c
+FULL JOIN
+  _previous_org_mozilla_firefox_beta AS _p
+  USING (client_id, sample_id, app_id)
+UNION ALL
+SELECT
+-- _p.* fields are NULL for clients that are not yet captured in the baseline_city_seen derived table.
+  IF(_p.app_id IS NULL, _c.app_id, _p.app_id) AS app_id,
+  IF(_p.client_id IS NULL, _c.client_id, _p.client_id) AS client_id,
+  IF(_p.sample_id IS NULL, _c.sample_id, _p.sample_id) AS sample_id,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_city_date,
+    _p.first_seen_city_date
+  ) AS first_seen_city_date,
+  IF(_p.client_id IS NULL, _c.first_seen_city, _p.first_seen_city) AS first_seen_city,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision1,
+    _p.first_seen_subdivision1
+  ) AS first_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision2,
+    _p.first_seen_subdivision2
+  ) AS first_seen_subdivision2,
+  IF(_p.client_id IS NULL, _c.first_seen_country, _p.first_seen_country) AS first_seen_country,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city_date,
+    _p.last_seen_city_date
+  ) AS last_seen_city_date,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city,
+    _p.last_seen_city
+  ) AS last_seen_city,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision1,
+    _p.last_seen_subdivision1
+  ) AS last_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision2,
+    _p.last_seen_subdivision2
+  ) AS last_seen_subdivision2,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_country,
+    _p.last_seen_country
+  ) AS last_seen_country
+FROM
+  _current_org_mozilla_fenix AS _c
+FULL JOIN
+  _previous_org_mozilla_fenix AS _p
+  USING (client_id, sample_id, app_id)
+UNION ALL
+SELECT
+-- _p.* fields are NULL for clients that are not yet captured in the baseline_city_seen derived table.
+  IF(_p.app_id IS NULL, _c.app_id, _p.app_id) AS app_id,
+  IF(_p.client_id IS NULL, _c.client_id, _p.client_id) AS client_id,
+  IF(_p.sample_id IS NULL, _c.sample_id, _p.sample_id) AS sample_id,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_city_date,
+    _p.first_seen_city_date
+  ) AS first_seen_city_date,
+  IF(_p.client_id IS NULL, _c.first_seen_city, _p.first_seen_city) AS first_seen_city,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision1,
+    _p.first_seen_subdivision1
+  ) AS first_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision2,
+    _p.first_seen_subdivision2
+  ) AS first_seen_subdivision2,
+  IF(_p.client_id IS NULL, _c.first_seen_country, _p.first_seen_country) AS first_seen_country,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city_date,
+    _p.last_seen_city_date
+  ) AS last_seen_city_date,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city,
+    _p.last_seen_city
+  ) AS last_seen_city,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision1,
+    _p.last_seen_subdivision1
+  ) AS last_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision2,
+    _p.last_seen_subdivision2
+  ) AS last_seen_subdivision2,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_country,
+    _p.last_seen_country
+  ) AS last_seen_country
+FROM
+  _current_org_mozilla_fenix_nightly AS _c
+FULL JOIN
+  _previous_org_mozilla_fenix_nightly AS _p
+  USING (client_id, sample_id, app_id)
+UNION ALL
+SELECT
+-- _p.* fields are NULL for clients that are not yet captured in the baseline_city_seen derived table.
+  IF(_p.app_id IS NULL, _c.app_id, _p.app_id) AS app_id,
+  IF(_p.client_id IS NULL, _c.client_id, _p.client_id) AS client_id,
+  IF(_p.sample_id IS NULL, _c.sample_id, _p.sample_id) AS sample_id,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_city_date,
+    _p.first_seen_city_date
+  ) AS first_seen_city_date,
+  IF(_p.client_id IS NULL, _c.first_seen_city, _p.first_seen_city) AS first_seen_city,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision1,
+    _p.first_seen_subdivision1
+  ) AS first_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL,
+    _c.first_seen_subdivision2,
+    _p.first_seen_subdivision2
+  ) AS first_seen_subdivision2,
+  IF(_p.client_id IS NULL, _c.first_seen_country, _p.first_seen_country) AS first_seen_country,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city_date,
+    _p.last_seen_city_date
+  ) AS last_seen_city_date,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_city,
+    _p.last_seen_city
+  ) AS last_seen_city,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision1,
+    _p.last_seen_subdivision1
+  ) AS last_seen_subdivision1,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_subdivision2,
+    _p.last_seen_subdivision2
+  ) AS last_seen_subdivision2,
+  IF(
+    _p.client_id IS NULL
+    OR _p.last_seen_city_date < _c.last_seen_city_date,
+    _c.last_seen_country,
+    _p.last_seen_country
+  ) AS last_seen_country
+FROM
+  _current_org_mozilla_fennec_aurora AS _c
+FULL JOIN
+  _previous_org_mozilla_fennec_aurora AS _p
+  USING (client_id, sample_id, app_id)
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill.yaml	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix_derived/baseline_clients_city_seen_v1/backfill.yaml	2025-10-14 18:

⚠️ Only part of the diff is displayed.

Link to full diff

@wwyc wwyc closed this Oct 14, 2025
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.

3 participants