Skip to content

Commit

Permalink
Add more columns to event aggregate table (#6715)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindau authored Dec 19, 2024
1 parent 6be3878 commit cb975a0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ owners:
- kwindau@mozilla.com
labels:
incremental: true
owner1: kwindau@mozilla.com
owner1: kwindau
table_type: aggregate
dag: bqetl_event_aggregates
scheduling:
dag_name: bqetl_event_aggregates
bigquery:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,33 @@ SELECT
event_category = 'intl.ui.browserLanguage'
AND event_object = 'language_item'
) AS browser_language_language_item_cnt,
COUNT(1) AS nbr_events
COUNT(1) AS nbr_events,
COUNTIF(
event_method = 'click'
AND event_object = 'etp_toggle_off'
AND event_category = 'security.ui.protectionspopup'
) AS disable_etp_cnt,
COUNTIF(
event_method = 'click'
AND event_object = 'etp_toggle_on'
AND event_category = 'security.ui.protectionspopup'
) AS enable_etp_cnt,
COUNTIF(
event_method = 'click'
AND event_object = 'sitenotworking_link'
AND event_category = 'security.ui.protectionspopup'
) AS click_site_not_working,
COUNTIF(
event_method = 'click'
AND event_object = 'send_report_link'
AND event_category = 'security.ui.protectionspopup'
) AS click_report_cnt,
COUNTIF(
event_method = 'click'
AND event_object = 'send_report_submit'
AND event_category = 'security.ui.protectionspopup'
) AS submit_report_cnt,
COUNTIF(event_method = 'open' AND event_category = 'security.ui.protectionspopup') AS open_panel
FROM
`moz-fx-data-shared-prod.telemetry.events`
WHERE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,27 @@ fields:
type: INTEGER
mode: NULLABLE
description: Number of Events
- name: disable_etp_cnt
type: INTEGER
mode: NULLABLE
description: Disable ETP Count; i.e. etp_toggle_off clicks
- name: enable_etp_cnt
type: INTEGER
mode: NULLABLE
description: Enable ETP Count; i.e. etp_toggle_on clicks
- name: click_site_not_working
type: INTEGER
mode: NULLABLE
description: Clicks on Site Not Working Link
- name: click_report_cnt
type: INTEGER
mode: NULLABLE
description: Clicks on Send Report Link
- name: submit_report_cnt
type: INTEGER
mode: NULLABLE
description: Clicks on Send Report Submit
- name: open_panel
type: INTEGER
mode: NULLABLE
description: Clicks on Open Panel

1 comment on commit cb975a0

@dataops-ci-bot
Copy link

Choose a reason for hiding this comment

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

Integration report for "Add more columns to event aggregate table (#6715)"

sql.diff

Click to expand!
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/apple_ads_external/ios_app_campaign_stats_v1/bigconfig.yml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/apple_ads_external/ios_app_campaign_stats_v1/bigconfig.yml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/apple_ads_external/ios_app_campaign_stats_v1/bigconfig.yml	2024-12-19 21:51:44.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/apple_ads_external/ios_app_campaign_stats_v1/bigconfig.yml	2024-12-19 21:55:38.000000000 +0000
@@ -1,7 +1,6 @@
 type: BIGCONFIG_FILE
-
 tag_deployments:
-  - collection:
+- collection:
       name: Operational Checks
       notification_channels:
         - slack: '#de-bigeye-triage'
@@ -24,10 +23,10 @@
         metrics:
           - saved_metric_id: is_not_null
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
       - column_selectors:
@@ -35,10 +34,10 @@
         metrics:
           - saved_metric_id: is_2_char_len
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
       - column_selectors:
@@ -46,17 +45,17 @@
         metrics:
           - saved_metric_id: volume
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
           - saved_metric_id: freshness
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_ads_derived/android_app_campaign_stats_v1/bigconfig.yml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_ads_derived/android_app_campaign_stats_v1/bigconfig.yml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/google_ads_derived/android_app_campaign_stats_v1/bigconfig.yml	2024-12-19 21:51:44.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/google_ads_derived/android_app_campaign_stats_v1/bigconfig.yml	2024-12-19 21:55:38.000000000 +0000
@@ -1,7 +1,6 @@
 type: BIGCONFIG_FILE
-
 tag_deployments:
-  - collection:
+- collection:
       name: Operational Checks
       notification_channels:
         - slack: '#de-bigeye-triage'
@@ -23,10 +22,10 @@
         metrics:
           - saved_metric_id: is_not_null
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
       - column_selectors:
@@ -34,10 +33,10 @@
         metrics:
           - saved_metric_id: is_2_char_len
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
       - column_selectors:
@@ -45,17 +44,17 @@
         metrics:
           - saved_metric_id: volume
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
           - saved_metric_id: freshness
             lookback:
-              lookback_type: DATA_TIME
               lookback_window:
                 interval_type: DAYS
                 interval_value: 28
+        lookback_type: DATA_TIME
             rct_overrides:
               - date
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/query.sql	2024-12-19 21:51:45.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/query.sql	2024-12-19 21:51:40.000000000 +0000
@@ -56,7 +56,33 @@
     event_category = 'intl.ui.browserLanguage'
     AND event_object = 'language_item'
   ) AS browser_language_language_item_cnt,
-  COUNT(1) AS nbr_events
+  COUNT(1) AS nbr_events,
+  COUNTIF(
+    event_method = 'click'
+    AND event_object = 'etp_toggle_off'
+    AND event_category = 'security.ui.protectionspopup'
+  ) AS disable_etp_cnt,
+  COUNTIF(
+    event_method = 'click'
+    AND event_object = 'etp_toggle_on'
+    AND event_category = 'security.ui.protectionspopup'
+  ) AS enable_etp_cnt,
+  COUNTIF(
+    event_method = 'click'
+    AND event_object = 'sitenotworking_link'
+    AND event_category = 'security.ui.protectionspopup'
+  ) AS click_site_not_working,
+  COUNTIF(
+    event_method = 'click'
+    AND event_object = 'send_report_link'
+    AND event_category = 'security.ui.protectionspopup'
+  ) AS click_report_cnt,
+  COUNTIF(
+    event_method = 'click'
+    AND event_object = 'send_report_submit'
+    AND event_category = 'security.ui.protectionspopup'
+  ) AS submit_report_cnt,
+  COUNTIF(event_method = 'open' AND event_category = 'security.ui.protectionspopup') AS open_panel
 FROM
   `moz-fx-data-shared-prod.telemetry.events`
 WHERE
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/schema.yaml	2024-12-19 21:51:45.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/event_aggregates_v1/schema.yaml	2024-12-19 21:51:40.000000000 +0000
@@ -87,3 +87,27 @@
   type: INTEGER
   mode: NULLABLE
   description: Number of Events
+- name: disable_etp_cnt
+  type: INTEGER
+  mode: NULLABLE
+  description: Disable ETP Count; i.e. etp_toggle_off clicks
+- name: enable_etp_cnt
+  type: INTEGER
+  mode: NULLABLE
+  description: Enable ETP Count; i.e. etp_toggle_on clicks
+- name: click_site_not_working
+  type: INTEGER
+  mode: NULLABLE
+  description: Clicks on Site Not Working Link
+- name: click_report_cnt
+  type: INTEGER
+  mode: NULLABLE
+  description: Clicks on Send Report Link
+- name: submit_report_cnt
+  type: INTEGER
+  mode: NULLABLE
+  description: Clicks on Send Report Submit
+- name: open_panel
+  type: INTEGER
+  mode: NULLABLE
+  description: Clicks on Open Panel

Link to full diff

Please sign in to comment.