From 5a626ab984992313a349b79fe766082d12c4f88f Mon Sep 17 00:00:00 2001 From: alekhyamoz Date: Mon, 23 Dec 2024 13:15:24 -0500 Subject: [PATCH] Fix CI issue --- .../metadata.yaml | 2 +- .../query.sql | 24 ++++++++----------- .../schema.yaml | 15 +++++------- .../metadata.yaml | 13 ++++------ .../query.sql | 24 ++++++++----------- .../schema.yaml | 6 ++--- .../fx_privacy_dau_agg_v1/query.sql | 24 ++++++++----------- .../fx_privacy_dau_agg_v1/schema.yaml | 18 +++++++------- 8 files changed, 54 insertions(+), 72 deletions(-) diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/metadata.yaml b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/metadata.yaml index f00048b5811..3123b4a578d 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/metadata.yaml +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/metadata.yaml @@ -9,7 +9,7 @@ labels: table_type: aggregate shredder_mitigation: true scheduling: - dag_name: bqetl_fx_cert_error_dashboard + dag_name: bqetl_fx_cert_error_privacy_dashboard bigquery: time_partitioning: type: day diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/query.sql b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/query.sql index a7bc19e25eb..cd79d21ace4 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/query.sql @@ -1,18 +1,14 @@ SELECT - DATE(submission_timestamp) AS submission_date, - normalized_country_code, - SUM(payload.processes.parent.scalars.browser_engagement_bookmarks_toolbar_bookmark_added) / COUNT( - DISTINCT client_id - ) AS bookmarks_added_per_dau, - SUM( - payload.processes.parent.scalars.browser_engagement_bookmarks_toolbar_bookmark_opened - ) / COUNT(DISTINCT client_id) AS bookmarks_opened_per_dau + submission_date, + normalized_channel, + COUNT(DISTINCT client_id) AS nbr_unique_users FROM - `moz-fx-data-shared-prod.telemetry.main_1pct` + `mozdata.telemetry.events` WHERE - DATE(submission_timestamp) = @submission_date - AND SUBSTR(application.version, 0, 2) >= '84' - AND normalized_channel = 'release' + event_category = 'security.ui.certerror' + AND event_object = 'aboutcerterror' + AND event_method = 'load' + AND submission_date = @submission_date GROUP BY - submission_date, - normalized_country_code + 1, + 2 diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/schema.yaml b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/schema.yaml index 111b9277257..d638c3295e9 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/schema.yaml +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_normalized_channel_v1/schema.yaml @@ -4,14 +4,11 @@ fields: type: DATE description: Submission Date - mode: NULLABLE - name: normalized_country_code + name: normalized_channel type: STRING - description: Normalized Country Code -- name: bookmarks_added_per_dau - type: FLOAT + description: Normalized Channel +- name: nbr_unique_users + type: INTEGER mode: NULLABLE - description: Bookmarks Added per DAU -- name: bookmarks_opened_per_dau - type: FLOAT - mode: NULLABLE - description: Bookmarks Opened per DAU + description: Number of Unique users (distinct client ids) + diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/metadata.yaml b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/metadata.yaml index a3e272d0b85..48fecc4c3d6 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/metadata.yaml +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/metadata.yaml @@ -1,15 +1,15 @@ -friendly_name: Firefox Health Indicator - Bookmarks By Country +friendly_name: Firefox Cert Error Dashboard - Unique users by os description: |- - Please provide a description for the query + Unique users experiencing cert error page per day per os owners: -- kwindau@mozilla.com +- akommasani@mozilla.com labels: incremental: true - owner1: kwindau + owner1: akommasani table_type: aggregate shredder_mitigation: true scheduling: - dag_name: bqetl_fx_health_ind_dashboard + dag_name: bqetl_fx_cert_error_privacy_dashboard bigquery: time_partitioning: type: day @@ -17,7 +17,4 @@ bigquery: require_partition_filter: false expiration_days: null range_partitioning: null - clustering: - fields: - - normalized_country_code references: {} diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/query.sql b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/query.sql index a7bc19e25eb..cd79d21ace4 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/query.sql @@ -1,18 +1,14 @@ SELECT - DATE(submission_timestamp) AS submission_date, - normalized_country_code, - SUM(payload.processes.parent.scalars.browser_engagement_bookmarks_toolbar_bookmark_added) / COUNT( - DISTINCT client_id - ) AS bookmarks_added_per_dau, - SUM( - payload.processes.parent.scalars.browser_engagement_bookmarks_toolbar_bookmark_opened - ) / COUNT(DISTINCT client_id) AS bookmarks_opened_per_dau + submission_date, + normalized_channel, + COUNT(DISTINCT client_id) AS nbr_unique_users FROM - `moz-fx-data-shared-prod.telemetry.main_1pct` + `mozdata.telemetry.events` WHERE - DATE(submission_timestamp) = @submission_date - AND SUBSTR(application.version, 0, 2) >= '84' - AND normalized_channel = 'release' + event_category = 'security.ui.certerror' + AND event_object = 'aboutcerterror' + AND event_method = 'load' + AND submission_date = @submission_date GROUP BY - submission_date, - normalized_country_code + 1, + 2 diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/schema.yaml b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/schema.yaml index b8eee62513a..051c09911bb 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/schema.yaml +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_cert_error_unique_users_os_v1/schema.yaml @@ -4,10 +4,10 @@ fields: type: DATE description: Submission Date - mode: NULLABLE - name: normalized_channel + name: os type: STRING - description: Normalized Channel + description: OS - name: nbr_unique_users type: INTEGER mode: NULLABLE - description: Unique users (distinct client ids) + description: Number of Unique users (distinct client ids) diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/query.sql b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/query.sql index a7bc19e25eb..3d1a14bc3f2 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/query.sql @@ -1,18 +1,14 @@ SELECT - DATE(submission_timestamp) AS submission_date, - normalized_country_code, - SUM(payload.processes.parent.scalars.browser_engagement_bookmarks_toolbar_bookmark_added) / COUNT( - DISTINCT client_id - ) AS bookmarks_added_per_dau, - SUM( - payload.processes.parent.scalars.browser_engagement_bookmarks_toolbar_bookmark_opened - ) / COUNT(DISTINCT client_id) AS bookmarks_opened_per_dau + event_object, + submission_date, + COUNT(*) AS nbr_events, + COUNT(DISTINCT client_id) AS nbr_distinct_users, FROM - `moz-fx-data-shared-prod.telemetry.main_1pct` + `moz-fx-data-shared-prod.telemetry.events` WHERE - DATE(submission_timestamp) = @submission_date - AND SUBSTR(application.version, 0, 2) >= '84' - AND normalized_channel = 'release' + event_category = 'security.ui.protectionspopup' + AND submission_date = @submission_date GROUP BY - submission_date, - normalized_country_code + event_object +ORDER BY + submission_date diff --git a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/schema.yaml b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/schema.yaml index 111b9277257..84808ef481c 100644 --- a/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/schema.yaml +++ b/sql/moz-fx-data-shared-prod/telemetry_derived/fx_privacy_dau_agg_v1/schema.yaml @@ -4,14 +4,14 @@ fields: type: DATE description: Submission Date - mode: NULLABLE - name: normalized_country_code + name: event_object type: STRING - description: Normalized Country Code -- name: bookmarks_added_per_dau - type: FLOAT - mode: NULLABLE - description: Bookmarks Added per DAU -- name: bookmarks_opened_per_dau - type: FLOAT + description: Submission Date +- mode: NULLABLE + name: nbr_events + type: INTEGER + description: Number of events +- name: nbr_distinct_users + type: INTEGER mode: NULLABLE - description: Bookmarks Opened per DAU + description: Number of distinct users