Skip to content

fix(): usage reporting first seen duplicates #7455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kik-kik
Copy link
Contributor

@kik-kik kik-kik commented May 16, 2025

fix(): usage reporting first seen duplicates

Created partial backfills and stored them in temp tables:

fenix release:

  • moz-fx-data-shared-prod.analysis.org_mozilla_firefox_derived_usage_reporting_clients_first_seen_v1
  • moz-fx-data-shared-prod.analysis.org_mozilla_firefox_derived_usage_reporting_clients_last_seen_v1

desktop:

  • moz-fx-data-shared-prod.analysis.firefox_desktop_derived_usage_reporting_clients_first_seen_v1
  • moz-fx-data-shared-prod.analysis.firefox_desktop_derived_usage_reporting_clients_last_seen_v1

The limited backfill is for the following date range: 2025-03-04 - 2025-03-20

@kik-kik kik-kik self-assigned this May 16, 2025
@kik-kik kik-kik force-pushed the fix/usage_reporting_first_seen_duplicates branch from 1a3c0e6 to bb35fd9 Compare May 16, 2025 09:15
@dataops-ci-bot

This comment has been minimized.

@kik-kik kik-kik force-pushed the fix/usage_reporting_first_seen_duplicates branch from 8857f19 to a6ed302 Compare May 21, 2025 13:28
@kik-kik kik-kik force-pushed the fix/usage_reporting_first_seen_duplicates branch from a6ed302 to 0f63b30 Compare May 21, 2025 13:29
@dataops-ci-bot
Copy link

Integration report for "feat: set string value for app_channel when null prior to join"

sql.diff

Click to expand!
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-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates/schema.yaml	2025-05-21 13:45:12.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-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/contextual_services/event_aggregates_suggest/schema.yaml	2025-05-21 13:45:19.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/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-05-21 13:34:36.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/broken_site_report/metadata.yaml	2025-05-21 13:53:59.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-05-21 13:34:36.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/crash/metadata.yaml	2025-05-21 13:53:59.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-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_clients/schema.yaml	2025-05-21 13:44:42.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-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/fenix/funnel_retention_week_4/schema.yaml	2025-05-21 13:44:50.000000000 +0000
@@ -48,6 +48,10 @@
   description: 'The type of source of a client installation.
 
     '
+- name: install_source
+  type: STRING
+  mode: NULLABLE
+  description: null
 - name: new_profiles
   type: INTEGER
   mode: NULLABLE
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	2025-05-21 13:34:25.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_crashreporter/crash/metadata.yaml	2025-05-21 13:54:07.000000000 +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	2025-05-21 13:34:26.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/broken_site_report/metadata.yaml	2025-05-21 13:53:54.000000000 +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	2025-05-21 13:34:26.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/crash/metadata.yaml	2025-05-21 13:53:54.000000000 +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/ltv_states/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/ltv_states/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/ltv_states/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/ltv_states/schema.yaml	2025-05-21 13:45:01.000000000 +0000
@@ -1,64 +1,66 @@
 fields:
-- description: Unique ID for the client installation.
-  mode: NULLABLE
-  name: client_id
+- name: client_id
   type: STRING
-- description: Sample ID - A number ranging from 0 - 99 based on client ID; used to pull a small sample of data related to a subset of clients over time
   mode: NULLABLE
-  name: sample_id
-  type: INT64
-- description: Submission Date
+  description: Unique ID for the client installation.
+- name: sample_id
+  type: INTEGER
   mode: NULLABLE
-  name: submission_date
+  description: Sample ID - A number ranging from 0 - 99 based on client ID; used to
+    pull a small sample of data related to a subset of clients over time
+- name: submission_date
   type: DATE
-- description: First Seen Date - The date this client was first seen
   mode: NULLABLE
-  name: first_seen_date
+  description: Submission Date
+- name: first_seen_date
   type: DATE
-- description: Days Since First Seen - The number of days since the client was first seen
   mode: NULLABLE
-  name: days_since_first_seen
-  type: INT64
-- description: Days Since Active
+  description: First Seen Date - The date this client was first seen
+- name: days_since_first_seen
+  type: INTEGER
   mode: NULLABLE
-  name: days_since_active
-  type: INT64
-- description: First Reported Country - The country this client ID was first reported from
+  description: Days Since First Seen - The number of days since the client was first
+    seen
+- name: days_since_active
+  type: INTEGER
   mode: NULLABLE
-  name: first_reported_country
+  description: Days Since Active
+- name: first_reported_country
   type: STRING
-- description: Attribution
   mode: NULLABLE
-  name: attribution
+  description: First Reported Country - The country this client ID was first reported
+    from
+- name: attribution
   type: RECORD
+  mode: NULLABLE
   fields:
-  - mode: NULLABLE
-    name: source
+  - name: source
     type: STRING
+    mode: NULLABLE
     description: Attribution Source
-  - mode: NULLABLE
-    name: medium
+  - name: medium
     type: STRING
+    mode: NULLABLE
     description: Attribution Medium
-  - mode: NULLABLE
-    name: campaign
+  - name: campaign
     type: STRING
+    mode: NULLABLE
     description: Attribution Campaign
-  - mode: NULLABLE
-    name: content
+  - name: content
     type: STRING
+    mode: NULLABLE
     description: Attribution Content
-  - mode: NULLABLE
-    name: experiment
+  - name: experiment
     type: STRING
+    mode: NULLABLE
     description: Attribution Experiment
-  - mode: NULLABLE
-    name: variation
+  - name: variation
     type: STRING
+    mode: NULLABLE
     description: Attribution Variation
-  - mode: NULLABLE
-    name: dltoken
+  - name: dltoken
     type: STRING
+    mode: NULLABLE
     description: Attribution Download Token
   - name: dlsource
     type: STRING
@@ -68,40 +70,43 @@
     type: STRING
     mode: NULLABLE
     description: Attribution UA
-- description: Active
-  mode: NULLABLE
-  name: active
-  type: INT64
-- description: Ad Clicks - The number of ad clicks from this client on the submission date
+  description: Attribution
+- name: active
+  type: INTEGER
   mode: NULLABLE
-  name: ad_clicks
-  type: INT64
-- description: Total Historic Ad Clicks - The number of ad clicks from this client on or before the submission date
+  description: Active
+- name: ad_clicks
+  type: INTEGER
   mode: NULLABLE
-  name: total_historic_ad_clicks
-  type: INT64
-- description: Days Seen Bytes
+  description: Ad Clicks - The number of ad clicks from this client on the submission
+    date
+- name: total_historic_ad_clicks
+  type: INTEGER
   mode: NULLABLE
-  name: days_seen_bytes
+  description: Total Historic Ad Clicks - The number of ad clicks from this client
+    on or before the submission date
+- name: days_seen_bytes
   type: BYTES
-- description: Pattern
   mode: NULLABLE
-  name: pattern
+  description: Days Seen Bytes
+- name: pattern
   type: INTEGER
-- description: Death Time
   mode: NULLABLE
-  name: death_time
+  description: Pattern
+- name: death_time
   type: INTEGER
-- description: Max Days
   mode: NULLABLE
-  name: max_days
+  description: Death Time
+- name: max_days
   type: INTEGER
-- description: Markov States
   mode: NULLABLE
-  name: markov_states
+  description: Max Days
+- name: markov_states
   type: RECORD
-  fields:
-  - description: Desktop States V1
     mode: NULLABLE
-    name: desktop_states_v1
+  fields:
+  - name: desktop_states_v1
     type: STRING
+    mode: NULLABLE
+    description: Desktop States V1
+  description: Markov States
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	2025-05-21 13:34:25.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab/metadata.yaml	2025-05-21 13:53:54.000000000 +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: []
 labels: {}
 bigquery: null
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab_live/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab_live/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab_live/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/newtab_live/schema.yaml	2025-05-21 13:44:47.000000000 +0000
@@ -1,48 +1,47 @@
 fields:
-- description: Submission Timestamp
-  mode: NULLABLE
-  name: submission_timestamp
+- name: submission_timestamp
   type: TIMESTAMP
-- description: Normalized Country Code, Examples - US, AR, BR, etc.
   mode: NULLABLE
-  name: normalized_country_code
+  description: Submission Timestamp
+- name: normalized_country_code
   type: STRING
-- description: Normalized Channel, Examples - release, nightly, aurora, esr, beta
   mode: NULLABLE
-  name: normalized_channel
+  description: Normalized Country Code, Examples - US, AR, BR, etc.
+- name: normalized_channel
   type: STRING
-- description: Document ID
   mode: NULLABLE
-  name: document_id
+  description: Normalized Channel, Examples - release, nightly, aurora, esr, beta
+- name: document_id
   type: STRING
-- description: Pocket Enabled
   mode: NULLABLE
-  name: pocket_enabled
+  description: Document ID
+- name: pocket_enabled
   type: BOOLEAN
-- description: Pocket Sponsored Stories Enabled
   mode: NULLABLE
-  name: pocket_sponsored_stories_enabled
+  description: Pocket Enabled
+- name: pocket_sponsored_stories_enabled
   type: BOOLEAN
-- description: Newtab Locale
   mode: NULLABLE
-  name: newtab_locale
+  description: Pocket Sponsored Stories Enabled
+- name: newtab_locale
   type: STRING
-- description: App Build
   mode: NULLABLE
-  name: app_build
+  description: Newtab Locale
+- name: app_build
   type: STRING
-- description: App Display Version
   mode: NULLABLE
-  name: app_display_version
+  description: App Build
+- name: app_display_version
   type: STRING
-- description: Client ID
   mode: NULLABLE
-  name: client_id
+  description: App Display Version
+- name: client_id
   type: STRING
+  mode: NULLABLE
+  description: Client ID
 - name: events
   type: RECORD
   mode: REPEATED
-  description: Events
   fields:
   - name: category
     type: STRING
@@ -51,7 +50,6 @@
   - name: extra
     type: RECORD
     mode: REPEATED
-    description: Extras
     fields:
     - name: key
       type: STRING
@@ -61,6 +59,7 @@
       type: STRING
       mode: NULLABLE
       description: Value
+    description: Extras
   - name: name
     type: STRING
     mode: NULLABLE
@@ -69,3 +68,4 @@
     type: INTEGER
     mode: NULLABLE
     description: Event Timestamp
+  description: Events
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/usage_reporting_clients_first_seen/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/usage_reporting_clients_first_seen/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:44:43.000000000 +0000
@@ -21,6 +21,7 @@
 - name: app_channel
   type: STRING
   mode: NULLABLE
-  description: 'The channel the application is being distributed on.
+  description: 'The channel the application is being distributed on, on mobile this
+    is expected to be mostly null.
 
     '
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/query.sql	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/query.sql	2025-05-21 13:44:36.000000000 +0000
@@ -7,24 +7,24 @@
     {% else %}
       @submission_date AS first_seen_date,
     {% endif %}
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
   FROM
     `moz-fx-data-shared-prod.firefox_desktop.usage_reporting_clients_daily`
   WHERE
     usage_profile_id IS NOT NULL
     {% if is_init() %}
       AND submission_date > "2014-10-10"
-    {% else %}
-      AND submission_date = @submission_date
-    {% endif %}
   GROUP BY
     usage_profile_id,
     app_channel
+    {% else %}
+      AND submission_date = @submission_date
+    {% endif %}
 ),
 _previous AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
   FROM
     `moz-fx-data-shared-prod.firefox_desktop_derived.usage_reporting_clients_first_seen_v1`
   WHERE
@@ -37,7 +37,7 @@
 SELECT
   first_seen_date,
   usage_profile_id,
-  app_channel,
+  NULLIF(app_channel, "") AS app_channel,
 FROM
   _current
 LEFT JOIN
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/schema.yaml	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_first_seen_v1/schema.yaml	2025-05-21 13:44:36.000000000 +0000
@@ -16,4 +16,4 @@
   name: app_channel
   type: STRING
   description: |
-    The channel the application is being distributed on.
+    The channel the application is being distributed on, on mobile this is expected to be mostly null.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_last_seen_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_last_seen_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_last_seen_v1/query.sql	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/usage_reporting_clients_last_seen_v1/query.sql	2025-05-21 13:55:10.000000000 +0000
@@ -4,7 +4,7 @@
 WITH _current AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
     -- The rightmost bit in 'days_since_seen' represents whether the user sent a usage_reporting ping on the submission_date.
     CAST(TRUE AS INT64) AS days_seen_bits,
     -- The rightmost bit in days_active_bits represents whether the user counts as active on the submission_date.
@@ -20,7 +20,7 @@
 _previous AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
     days_seen_bits,
     days_active_bits,
     days_created_profile_bits,
@@ -45,10 +45,11 @@
     `moz-fx-data-shared-prod.udf.combine_adjacent_days_28_bits`(
       _previous.days_created_profile_bits,
       _current.days_created_profile_bits
-    ) AS days_created_profile_bits
+    ) AS days_created_profile_bits,
+    NULLIF(app_channel, "") AS app_channel
   )
 FROM
   _current
 FULL JOIN
   _previous
-  USING (usage_profile_id)
+  USING (usage_profile_id, app_channel)
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/focus_android/use_counters/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/focus_android/use_counters/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/focus_android/use_counters/schema.yaml	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/focus_android/use_counters/schema.yaml	2025-05-21 13:46:38.000000000 +0000
@@ -1,11 +1,11 @@
 fields:
 - name: normalized_app_id
-  mode: NULLABLE
   type: STRING
+  mode: NULLABLE
   description: App ID of the channel data was received from
 - name: normalized_channel
-  mode: NULLABLE
   type: STRING
+  mode: NULLABLE
   description: Normalized channel name
 - name: additional_properties
   type: STRING
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/focus_ios/usage_reporting_clients_first_seen/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/focus_ios/usage_reporting_clients_first_seen/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/focus_ios/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/focus_ios/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:46:11.000000000 +0000
@@ -21,6 +21,7 @@
 - name: app_channel
   type: STRING
   mode: NULLABLE
-  description: 'The channel the application is being distributed on.
+  description: 'The channel the application is being distributed on, on mobile this
+    is expected to be mostly null.
 
     '
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_page/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_page/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_page/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_page/schema.yaml	2025-05-21 13:45:01.000000000 +0000
@@ -6,9 +6,10 @@
 - name: site_url
   type: STRING
   mode: NULLABLE
-  description: |-
-    For domain properties, this will be `sc-domain:` followed by the domain name.
-    For URL-prefix properties, it will be the full URL of the property definition.
+  description: 'For domain properties, this will be `sc-domain:` followed by the domain
+    name.
+
+    For URL-prefix properties, it will be the full URL of the property definition.'
 - name: site_domain_name
   type: STRING
   mode: NULLABLE
@@ -28,19 +29,23 @@
 - name: localized_site_code
   type: STRING
   mode: NULLABLE
-  description: Localized site code such as `en-US` or `de` found in the first segment of the page URL path (if any).
+  description: Localized site code such as `en-US` or `de` found in the first segment
+    of the page URL path (if any).
 - name: localized_site
   type: STRING
   mode: NULLABLE
-  description: Description of the localized site language and/or country based on `localized_site_code` (if any).
+  description: Description of the localized site language and/or country based on
+    `localized_site_code` (if any).
 - name: localized_site_language_code
   type: STRING
   mode: NULLABLE
-  description: Localized site language code in ISO-639-alpha-2 format found in the first segment of the page URL path (if any).
+  description: Localized site language code in ISO-639-alpha-2 format found in the
+    first segment of the page URL path (if any).
 - name: localized_site_language
   type: STRING
   mode: NULLABLE
-  description: Localized site language based on `localized_site_language_code` (if any).
+  description: Localized site language based on `localized_site_language_code` (if
+    any).
 - name: query
   type: STRING
   mode: NULLABLE
@@ -48,20 +53,15 @@
 - name: query_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Type of search query:
-      * Brand: Query contained one or more Mozilla brand keywords.
-      * Non-Brand: Query didn't contain any Mozilla brand keywords.
-      * Unknown: Query couldn't be classified.
+  description: "Type of search query:\n  * Brand: Query contained one or more Mozilla\
+    \ brand keywords.\n  * Non-Brand: Query didn't contain any Mozilla brand keywords.\n\
+    \  * Unknown: Query couldn't be classified."
 - name: search_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Where the link was seen by the user:
-      * Web: In Google Search's default "All" tab.
-      * Image: In Google Search's "Images" tab.
-      * Video: In Google Search's "Videos" tab.
-      * News: In Google Search's "News" tab.
+  description: "Where the link was seen by the user:\n  * Web: In Google Search's\
+    \ default \"All\" tab.\n  * Image: In Google Search's \"Images\" tab.\n  * Video:\
+    \ In Google Search's \"Videos\" tab.\n  * News: In Google Search's \"News\" tab."
 - name: user_country_code
   type: STRING
   mode: NULLABLE
@@ -81,12 +81,13 @@
 - name: device_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    The type of device on which the user was searching: Desktop, Mobile, or Tablet.
+  description: 'The type of device on which the user was searching: Desktop, Mobile,
+    or Tablet.'
 - name: impressions
   type: INTEGER
   mode: NULLABLE
-  description: The number of times that search results with a link to the page were shown to a user.
+  description: The number of times that search results with a link to the page were
+    shown to a user.
 - name: clicks
   type: INTEGER
   mode: NULLABLE
@@ -94,4 +95,5 @@
 - name: average_position
   type: FLOAT
   mode: NULLABLE
-  description: The average position of the page in the search results, where `1` is the topmost position.
+  description: The average position of the page in the search results, where `1` is
+    the topmost position.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_site/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_site/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_site/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/limited_historical_search_impressions_by_site/schema.yaml	2025-05-21 13:45:02.000000000 +0000
@@ -6,9 +6,10 @@
 - name: site_url
   type: STRING
   mode: NULLABLE
-  description: |-
-    For domain properties, this will be `sc-domain:` followed by the domain name.
-    For URL-prefix properties, it will be the full URL of the property definition.
+  description: 'For domain properties, this will be `sc-domain:` followed by the domain
+    name.
+
+    For URL-prefix properties, it will be the full URL of the property definition.'
 - name: site_domain_name
   type: STRING
   mode: NULLABLE
@@ -20,20 +21,15 @@
 - name: query_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Type of search query:
-      * Brand: Query contained one or more Mozilla brand keywords.
-      * Non-Brand: Query didn't contain any Mozilla brand keywords.
-      * Unknown: Query couldn't be classified.
+  description: "Type of search query:\n  * Brand: Query contained one or more Mozilla\
+    \ brand keywords.\n  * Non-Brand: Query didn't contain any Mozilla brand keywords.\n\
+    \  * Unknown: Query couldn't be classified."
 - name: search_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Where the link was seen by the user:
-      * Web: In Google Search's default "All" tab.
-      * Image: In Google Search's "Images" tab.
-      * Video: In Google Search's "Videos" tab.
-      * News: In Google Search's "News" tab.
+  description: "Where the link was seen by the user:\n  * Web: In Google Search's\
+    \ default \"All\" tab.\n  * Image: In Google Search's \"Images\" tab.\n  * Video:\
+    \ In Google Search's \"Videos\" tab.\n  * News: In Google Search's \"News\" tab."
 - name: user_country_code
   type: STRING
   mode: NULLABLE
@@ -53,17 +49,20 @@
 - name: device_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    The type of device on which the user was searching: Desktop, Mobile, or Tablet.
+  description: 'The type of device on which the user was searching: Desktop, Mobile,
+    or Tablet.'
 - name: impressions
   type: INTEGER
   mode: NULLABLE
-  description: The number of times that search results with at least one link to the site were shown to a user.
+  description: The number of times that search results with at least one link to the
+    site were shown to a user.
 - name: clicks
   type: INTEGER
   mode: NULLABLE
-  description: The number of times a user clicked at least one search result link to the site.
+  description: The number of times a user clicked at least one search result link
+    to the site.
 - name: average_top_position
   type: FLOAT
   mode: NULLABLE
-  description: The average top position of the site in the search results, where `1` is the topmost position.
+  description: The average top position of the site in the search results, where `1`
+    is the topmost position.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_page/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_page/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_page/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_page/schema.yaml	2025-05-21 13:45:03.000000000 +0000
@@ -6,9 +6,10 @@
 - name: site_url
   type: STRING
   mode: NULLABLE
-  description: |-
-    For domain properties, this will be `sc-domain:` followed by the domain name.
-    For URL-prefix properties, it will be the full URL of the property definition.
+  description: 'For domain properties, this will be `sc-domain:` followed by the domain
+    name.
+
+    For URL-prefix properties, it will be the full URL of the property definition.'
 - name: site_domain_name
   type: STRING
   mode: NULLABLE
@@ -16,99 +17,104 @@
 - name: page_url
   type: STRING
   mode: NULLABLE
-  description: |-
-    The final page URL linked by a search result after any skip redirects.
-    This will be null for anonymized Discover impressions.
+  description: 'The final page URL linked by a search result after any skip redirects.
+
+    This will be null for anonymized Discover impressions.'
 - name: page_domain_name
   type: STRING
   mode: NULLABLE
-  description: |-
-    Domain name of the page URL.
-    This will be null for anonymized Discover impressions.
+  description: 'Domain name of the page URL.
+
+    This will be null for anonymized Discover impressions.'
 - name: page_path
   type: STRING
   mode: NULLABLE
-  description: |-
-    The path part of the page URL.
-    This will be null for anonymized Discover impressions.
+  description: 'The path part of the page URL.
+
+    This will be null for anonymized Discover impressions.'
 - name: localized_site_code
   type: STRING
   mode: NULLABLE
-  description: |-
-    Localized site code such as `en-US` or `de` found in the first segment of the page URL path (if any).
-    This will be null for anonymized Discover impressions.
+  description: 'Localized site code such as `en-US` or `de` found in the first segment
+    of the page URL path (if any).
+
+    This will be null for anonymized Discover impressions.'
 - name: localized_site
   type: STRING
   mode: NULLABLE
-  description: |-
-    Description of the localized site language and/or country based on `localized_site_code` (if any).
-    This will be null for anonymized Discover impressions.
+  description: 'Description of the localized site language and/or country based on
+    `localized_site_code` (if any).
+
+    This will be null for anonymized Discover impressions.'
 - name: localized_site_language_code
   type: STRING
   mode: NULLABLE
-  description: |-
-    Localized site language code in ISO-639-alpha-2 format found in the first segment of the page URL path (if any).
-    This will be null for anonymized Discover impressions.
+  description: 'Localized site language code in ISO-639-alpha-2 format found in the
+    first segment of the page URL path (if any).
+
+    This will be null for anonymized Discover impressions.'
 - name: localized_site_language
   type: STRING
   mode: NULLABLE
-  description: |-
-    Localized site language based on `localized_site_language_code` (if any).
-    This will be null for anonymized Discover impressions.
+  description: 'Localized site language based on `localized_site_language_code` (if
+    any).
+
+    This will be null for anonymized Discover impressions.'
 - name: query
   type: STRING
   mode: NULLABLE
-  description: |-
-    The search query.
-    This will be null for anonymized search impressions, and all Discover and Google News search impressions.
+  description: 'The search query.
+
+    This will be null for anonymized search impressions, and all Discover and Google
+    News search impressions.'
 - name: query_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Type of search query:
-      * Anonymized: Query was redacted by Google to protect the users' privacy.
-      * Brand: Query contained one or more Mozilla brand keywords.
-      * Non-Brand: Query didn't contain any Mozilla brand keywords.
-      * Unknown: Query couldn't be classified.
-    This will be null for all Discover and Google News search impressions.
+  description: "Type of search query:\n  * Anonymized: Query was redacted by Google\
+    \ to protect the users' privacy.\n  * Brand: Query contained one or more Mozilla\
+    \ brand keywords.\n  * Non-Brand: Query didn't contain any Mozilla brand keywords.\n\
+    \  * Unknown: Query couldn't be classified.\nThis will be null for all Discover\
+    \ and Google News search impressions."
 - name: is_anonymized
   type: BOOLEAN
   mode: NULLABLE
-  description: |-
-    Whether Google has anonymized the search impression to protect the users' privacy.
+  description: 'Whether Google has anonymized the search impression to protect the
+    users'' privacy.
+
     The `query` field will be null for anonymized search impressions.
-    The `country_code`, `page_url`, and related fields will be null for anonymized Discover impressions.
+
+    The `country_code`, `page_url`, and related fields will be null for anonymized
+    Discover impressions.'
 - name: has_good_page_experience
   type: BOOLEAN
   mode: NULLABLE
-  description: Whether Google Search considers the page to be providing a good page experience.
+  description: Whether Google Search considers the page to be providing a good page
+    experience.
 - name: search_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Where the link was seen by the user:
-      * Web: In Google Search's default "All" tab.
-      * Image: In Google Search's "Images" tab.
-      * Video: In Google Search's "Videos" tab.
-      * News: In Google Search's "News" tab.
-      * Discover: In Google's Discover feed.
-      * Google News: On news.google.com or in the Google News app on Android and iOS.
+  description: "Where the link was seen by the user:\n  * Web: In Google Search's\
+    \ default \"All\" tab.\n  * Image: In Google Search's \"Images\" tab.\n  * Video:\
+    \ In Google Search's \"Videos\" tab.\n  * News: In Google Search's \"News\" tab.\n\
+    \  * Discover: In Google's Discover feed.\n  * Google News: On news.google.com\
+    \ or in the Google News app on Android and iOS."
 - name: search_appearance
   type: STRING
   mode: NULLABLE
-  description: How the search result appeared (e.g. normal result, translated result, video).
+  description: How the search result appeared (e.g. normal result, translated result,
+    video).
 - name: user_country_code
   type: STRING
   mode: NULLABLE
-  description: |-
-    Country from which the user was searching, in ISO-3166-1-alpha-3 format.
-    This will be null for anonymized Discover impressions.
+  description: 'Country from which the user was searching, in ISO-3166-1-alpha-3 format.
+
+    This will be null for anonymized Discover impressions.'
 - name: user_country
   type: STRING
   mode: NULLABLE
-  description: |-
-    Country from which the user was searching.
-    This will be null for anonymized Discover impressions.
+  description: 'Country from which the user was searching.
+
+    This will be null for anonymized Discover impressions.'
 - name: user_region
   type: STRING
   mode: NULLABLE
@@ -120,13 +126,15 @@
 - name: device_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    The type of device on which the user was searching: Desktop, Mobile, or Tablet.
-    This will be null for Discover impressions.
+  description: 'The type of device on which the user was searching: Desktop, Mobile,
+    or Tablet.
+
+    This will be null for Discover impressions.'
 - name: impressions
   type: INTEGER
   mode: NULLABLE
-  description: The number of times that search results with a link to the page were shown to a user.
+  description: The number of times that search results with a link to the page were
+    shown to a user.
 - name: clicks
   type: INTEGER
   mode: NULLABLE
@@ -134,6 +142,7 @@
 - name: average_position
   type: FLOAT
   mode: NULLABLE
-  description: |-
-    The average position of the page in the search results, where `1` is the topmost position.
-    This will be null for Discover and Google News search impressions.
+  description: 'The average position of the page in the search results, where `1`
+    is the topmost position.
+
+    This will be null for Discover and Google News search impressions.'
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_site/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_site/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_site/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_search_console/search_impressions_by_site/schema.yaml	2025-05-21 13:45:00.000000000 +0000
@@ -6,9 +6,10 @@
 - name: site_url
   type: STRING
   mode: NULLABLE
-  description: |-
-    For domain properties, this will be `sc-domain:` followed by the domain name.
-    For URL-prefix properties, it will be the full URL of the property definition.
+  description: 'For domain properties, this will be `sc-domain:` followed by the domain
+    name.
+
+    For URL-prefix properties, it will be the full URL of the property definition.'
 - name: site_domain_name
   type: STRING
   mode: NULLABLE
@@ -20,27 +21,23 @@
 - name: query_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Type of search query:
-      * Anonymized: Query was redacted by Google to protect the users' privacy.
-      * Brand: Query contained one or more Mozilla brand keywords.
-      * Non-Brand: Query didn't contain any Mozilla brand keywords.
-      * Unknown: Query couldn't be classified.
+  description: "Type of search query:\n  * Anonymized: Query was redacted by Google\
+    \ to protect the users' privacy.\n  * Brand: Query contained one or more Mozilla\
+    \ brand keywords.\n  * Non-Brand: Query didn't contain any Mozilla brand keywords.\n\
+    \  * Unknown: Query couldn't be classified."
 - name: is_anonymized
   type: BOOLEAN
   mode: NULLABLE
-  description: |-
-    Whether Google has anonymized the search impression to protect the users' privacy.
-    The `query` field will be null for anonymized search impressions.
+  description: 'Whether Google has anonymized the search impression to protect the
+    users'' privacy.
+
+    The `query` field will be null for anonymized search impressions.'
 - name: search_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    Where the link was seen by the user:
-      * Web: In Google Search's default "All" tab.
-      * Image: In Google Search's "Images" tab.
-      * Video: In Google Search's "Videos" tab.
-      * News: In Google Search's "News" tab.
+  description: "Where the link was seen by the user:\n  * Web: In Google Search's\
+    \ default \"All\" tab.\n  * Image: In Google Search's \"Images\" tab.\n  * Video:\
+    \ In Google Search's \"Videos\" tab.\n  * News: In Google Search's \"News\" tab."
 - name: user_country_code
   type: STRING
   mode: NULLABLE
@@ -60,17 +57,20 @@
 - name: device_type
   type: STRING
   mode: NULLABLE
-  description: |-
-    The type of device on which the user was searching: Desktop, Mobile, or Tablet.
+  description: 'The type of device on which the user was searching: Desktop, Mobile,
+    or Tablet.'
 - name: impressions
   type: INTEGER
   mode: NULLABLE
-  description: The number of times that search results with at least one link to the site were shown to a user.
+  description: The number of times that search results with at least one link to the
+    site were shown to a user.
 - name: clicks
   type: INTEGER
   mode: NULLABLE
-  description: The number of times a user clicked at least one search result link to the site.
+  description: The number of times a user clicked at least one search result link
+    to the site.
 - name: average_top_position
   type: FLOAT
   mode: NULLABLE
-  description: The average top position of the site in the search results, where `1` is the topmost position.
+  description: The average top position of the site in the search results, where `1`
+    is the topmost position.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/klar_android/metrics/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/klar_android/metrics/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/klar_android/metrics/schema.yaml	2025-05-21 13:31:58.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/klar_android/metrics/schema.yaml	2025-05-21 13:51:40.000000000 +0000
@@ -1,11 +1,11 @@
 fields:
 - name: normalized_app_id
-  type: STRING
   mode: NULLABLE
+  type: STRING
   description: App ID of the channel data was received from
 - name: normalized_channel
-  type: STRING
   mode: NULLABLE
+  type: STRING
   description: Normalized channel name
 - name: additional_properties
   type: STRING
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/mozilla_vpn/subscriptions/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/mozilla_vpn/subscriptions/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/mozilla_vpn/subscriptions/schema.yaml	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/mozilla_vpn/subscriptions/schema.yaml	2025-05-21 13:45:30.000000000 +0000
@@ -20,3 +20,45 @@
 - name: type
   type: STRING
   mode: NULLABLE
+- name: provider
+  type: STRING
+  mode: NULLABLE
+- name: apple_receipt
+  type: RECORD
+  mode: NULLABLE
+  fields:
+  - name: environment
+    type: STRING
+    mode: NULLABLE
+  - name: active_period
+    type: RECORD
+    mode: NULLABLE
+    fields:
+    - name: start_date
+      type: DATE
+      mode: NULLABLE
+    - name: end_date
+      type: DATE
+      mode: NULLABLE
+    - name: start_time
+      type: TIMESTAMP
+      mode: NULLABLE
+    - name: end_time
+      type: TIMESTAMP
+      mode: NULLABLE
+    - name: interval
+      type: STRING
+      mode: NULLABLE
+    - name: interval_count
+      type: INTEGER
+      mode: NULLABLE
+  - name: trial_period
+    type: RECORD
+    mode: NULLABLE
+    fields:
+    - name: start_time
+      type: TIMESTAMP
+      mode: NULLABLE
+    - name: end_time
+      type: TIMESTAMP
+      mode: NULLABLE
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	2025-05-21 13:34:39.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/broken_site_report/metadata.yaml	2025-05-21 13:54:02.000000000 +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	2025-05-21 13:34:39.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/crash/metadata.yaml	2025-05-21 13:54:02.000000000 +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/geckoview_version/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/geckoview_version/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/geckoview_version/schema.yaml	2025-05-21 13:31:13.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/geckoview_version/schema.yaml	2025-05-21 13:45:00.000000000 +0000
@@ -1,7 +1,13 @@
 fields:
-- type: DATETIME
-  name: build_hour
-- type: INTEGER
-  name: geckoview_major_version
-- type: INTEGER
-  name: n_pings
+- name: build_hour
+  type: DATETIME
+  mode: NULLABLE
+  description: null
+- name: geckoview_major_version
+  type: INTEGER
+  mode: NULLABLE
+  description: null
+- name: n_pings
+  type: INTEGER
+  mode: NULLABLE
+  description: null
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/usage_reporting_clients_first_seen/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/usage_reporting_clients_first_seen/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:44:57.000000000 +0000
@@ -15,6 +15,7 @@
 - name: app_channel
   type: STRING
   mode: NULLABLE
-  description: 'The channel the application is being distributed on.
+  description: 'The channel the application is being distributed on, on mobile this
+    is expected to be mostly null.
 
     '
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/query.sql	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/query.sql	2025-05-21 13:44:36.000000000 +0000
@@ -7,24 +7,24 @@
     {% else %}
       @submission_date AS first_seen_date,
     {% endif %}
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
   FROM
     `moz-fx-data-shared-prod.org_mozilla_fenix.usage_reporting_clients_daily`
   WHERE
     usage_profile_id IS NOT NULL
     {% if is_init() %}
       AND submission_date > "2014-10-10"
-    {% else %}
-      AND submission_date = @submission_date
-    {% endif %}
   GROUP BY
     usage_profile_id,
     app_channel
+    {% else %}
+      AND submission_date = @submission_date
+    {% endif %}
 ),
 _previous AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
   FROM
     `moz-fx-data-shared-prod.org_mozilla_fenix_derived.usage_reporting_clients_first_seen_v1`
   WHERE
@@ -37,7 +37,7 @@
 SELECT
   first_seen_date,
   usage_profile_id,
-  app_channel,
+  NULLIF(app_channel, "") AS app_channel,
 FROM
   _current
 LEFT JOIN
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/schema.yaml	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_first_seen_v1/schema.yaml	2025-05-21 13:44:36.000000000 +0000
@@ -16,4 +16,4 @@
   name: app_channel
   type: STRING
   description: |
-    The channel the application is being distributed on.
+    The channel the application is being distributed on, on mobile this is expected to be mostly null.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_last_seen_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_last_seen_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_last_seen_v1/query.sql	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_derived/usage_reporting_clients_last_seen_v1/query.sql	2025-05-21 13:55:13.000000000 +0000
@@ -4,7 +4,7 @@
 WITH _current AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
     -- The rightmost bit in 'days_since_seen' represents whether the user sent a usage_reporting ping on the submission_date.
     CAST(TRUE AS INT64) AS days_seen_bits,
     -- The rightmost bit in days_active_bits represents whether the user counts as active on the submission_date.
@@ -20,7 +20,7 @@
 _previous AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
     days_seen_bits,
     days_active_bits,
     days_created_profile_bits,
@@ -45,10 +45,11 @@
     `moz-fx-data-shared-prod.udf.combine_adjacent_days_28_bits`(
       _previous.days_created_profile_bits,
       _current.days_created_profile_bits
-    ) AS days_created_profile_bits
+    ) AS days_created_profile_bits,
+    NULLIF(app_channel, "") AS app_channel
   )
 FROM
   _current
 FULL JOIN
   _previous
-  USING (usage_profile_id)
+  USING (usage_profile_id, app_channel)
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	2025-05-21 13:34:45.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/broken_site_report/metadata.yaml	2025-05-21 13:53:52.000000000 +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	2025-05-21 13:34:45.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/crash/metadata.yaml	2025-05-21 13:53:52.000000000 +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_fenix_nightly/usage_reporting_clients_first_seen/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/usage_reporting_clients_first_seen/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly/usage_reporting_clients_first_seen/schema.yaml	2025-05-21 13:44:49.000000000 +0000
@@ -15,6 +15,7 @@
 - name: app_channel
   type: STRING
   mode: NULLABLE
-  description: 'The channel the application is being distributed on.
+  description: 'The channel the application is being distributed on, on mobile this
+    is expected to be mostly null.
 
     '
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/query.sql	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/query.sql	2025-05-21 13:44:36.000000000 +0000
@@ -7,24 +7,24 @@
     {% else %}
       @submission_date AS first_seen_date,
     {% endif %}
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
   FROM
     `moz-fx-data-shared-prod.org_mozilla_fenix_nightly.usage_reporting_clients_daily`
   WHERE
     usage_profile_id IS NOT NULL
     {% if is_init() %}
       AND submission_date > "2014-10-10"
-    {% else %}
-      AND submission_date = @submission_date
-    {% endif %}
   GROUP BY
     usage_profile_id,
     app_channel
+    {% else %}
+      AND submission_date = @submission_date
+    {% endif %}
 ),
 _previous AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
   FROM
     `moz-fx-data-shared-prod.org_mozilla_fenix_nightly_derived.usage_reporting_clients_first_seen_v1`
   WHERE
@@ -37,7 +37,7 @@
 SELECT
   first_seen_date,
   usage_profile_id,
-  app_channel,
+  NULLIF(app_channel, "") AS app_channel,
 FROM
   _current
 LEFT JOIN
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/schema.yaml	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_first_seen_v1/schema.yaml	2025-05-21 13:44:36.000000000 +0000
@@ -16,4 +16,4 @@
   name: app_channel
   type: STRING
   description: |
-    The channel the application is being distributed on.
+    The channel the application is being distributed on, on mobile this is expected to be mostly null.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_last_seen_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_last_seen_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_last_seen_v1/query.sql	2025-05-21 13:31:59.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/org_mozilla_fenix_nightly_derived/usage_reporting_clients_last_seen_v1/query.sql	2025-05-21 13:55:14.000000000 +0000
@@ -4,7 +4,7 @@
 WITH _current AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
     -- The rightmost bit in 'days_since_seen' represents whether the user sent a usage_reporting ping on the submission_date.
     CAST(TRUE AS INT64) AS days_seen_bits,
     -- The rightmost bit in days_active_bits represents whether the user counts as active on the submission_date.
@@ -20,7 +20,7 @@
 _previous AS (
   SELECT
     usage_profile_id,
-    app_channel,
+    IFNULL(app_channel, "") AS app_channel,
     days_seen_bits,
     days_active_bits,
     days_created_profile_bits,
@@ -45,10 +45,11 @@
     `moz-fx-data-shared-prod.udf.combine_adjacent_days_28_bits`(
       _previous.days_created_profile_bits,
       _current.days_created_profile_bits
-    ) AS days_created_profile_bits
+    ) AS days_created_profile_bits,
+    NULLIF(app_channel, "") AS app_channel
   )
 FROM
   _current
 FULL JOIN
   _previous
-  USING (usage_profile_id)
+  USING (usage_profile_id, app_channel)
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-

⚠️ Only part of the diff is displayed.

Link to full diff

@kik-kik kik-kik marked this pull request as ready for review May 21, 2025 14:38
@kik-kik kik-kik requested a review from irrationalagent May 21, 2025 14:38
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