Skip to content

feat(DENG-10722): add to/enhance urlbar_events_daily_v2#9247

Draft
kbammarito wants to merge 23 commits into
mainfrom
DENG-10722-urlbar-events-daily-v2-phase1
Draft

feat(DENG-10722): add to/enhance urlbar_events_daily_v2#9247
kbammarito wants to merge 23 commits into
mainfrom
DENG-10722-urlbar-events-daily-v2-phase1

Conversation

@kbammarito
Copy link
Copy Markdown
Contributor

@kbammarito kbammarito commented Apr 23, 2026

Description

This PR adds is_search, url_abandonments and window_mode to urlbar_events_daily_v2. It also includes filtering for only abandonment and engagement of event_name in urlbar_events_v2 (the first CTE).

This PR will be updated once the underlying table is done (#9246).

Related Tickets & Documents

Reviewer, please follow this checklist

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown

@florezita florezita left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@lucia-vargas-a lucia-vargas-a left a comment

Choose a reason for hiding this comment

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

A few suggestions

kbammarito and others added 5 commits April 30, 2026 12:18
…nts_daily_v2/schema.yaml

Co-authored-by: Lucia <30448600+lucia-vargas-a@users.noreply.github.com>
…nts_daily_v2/schema.yaml

Co-authored-by: Lucia <30448600+lucia-vargas-a@users.noreply.github.com>
…nts_daily_v2/schema.yaml

Co-authored-by: Lucia <30448600+lucia-vargas-a@users.noreply.github.com>
…nts_daily_v2/schema.yaml

Co-authored-by: Lucia <30448600+lucia-vargas-a@users.noreply.github.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@kbammarito kbammarito marked this pull request as draft May 6, 2026 03:15
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@kbammarito kbammarito requested a review from florezita May 8, 2026 21:41
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Integration report for "feat(DENG-10722): add to/enhance urlbar_events_daily_v2"

sql.diff

Click to expand!
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/query.sql	2026-05-08 21:45:52.609265922 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/query.sql	2026-05-08 21:45:48.502263507 +0000
@@ -33,6 +33,8 @@
       ELSE FALSE
     END AS ohttp_enabled,
     sap,
+    window_mode,
+    event_name,
     IF(res.result_type LIKE '%\\_adaptive%', TRUE, FALSE) AS is_adaptive,
     IF(res.result_type LIKE '%\\_semantic%', TRUE, FALSE) AS is_semantic,
     IF(res.result_type LIKE '%\\_serp%', TRUE, FALSE) AS is_serp,
@@ -66,13 +68,25 @@
       FALSE
     ) AS is_from_device,
     IF(res.result_group = 'top_pick', TRUE, FALSE) AS is_top_pick,
-    IF(res.result_type LIKE '%ai\\_%', TRUE, FALSE) AS is_ai
+    IF(res.result_type LIKE '%ai\\_%', TRUE, FALSE) AS is_ai,
+    IF(
+      res.result_type IN (
+        'search_engine',
+        'search_suggest',
+        'search_suggest_rich',
+        'trending_search',
+        'trending_search_rich'
+      ),
+      TRUE,
+      FALSE
+    ) AS is_search
   FROM
     `moz-fx-data-shared-prod.firefox_desktop_derived.urlbar_events_v2`
   CROSS JOIN
     UNNEST(results) AS res
   WHERE
     submission_date = @submission_date
+    AND event_name IN ('abandonment', 'engagement', 'bounce', 'disable')
 ),
 temp_session AS (
   SELECT
@@ -95,6 +109,8 @@
     ANY_VALUE(pref_ohttp_enabled) AS pref_ohttp_enabled,
     ANY_VALUE(ohttp_enabled) AS ohttp_enabled,
     ANY_VALUE(sap) AS sap,
+    ANY_VALUE(window_mode) AS window_mode,
+    ANY_VALUE(event_name) AS event_name,
     LOGICAL_OR(is_adaptive) AS is_adaptive,
     LOGICAL_OR(is_semantic) AS is_semantic,
     LOGICAL_OR(is_serp) AS is_serp,
@@ -104,7 +120,8 @@
     LOGICAL_OR(is_geo_local) AS is_geo_local,
     LOGICAL_OR(is_from_device) AS is_from_device,
     LOGICAL_OR(is_top_pick) AS is_top_pick,
-    LOGICAL_OR(is_ai) AS is_ai
+    LOGICAL_OR(is_ai) AS is_ai,
+    LOGICAL_OR(is_search) AS is_search
   FROM
     temp_unnested
   GROUP BY
@@ -128,6 +145,7 @@
     pref_ohttp_enabled,
     ohttp_enabled,
     sap,
+    window_mode,
     is_adaptive,
     is_semantic,
     is_serp,
@@ -138,6 +156,7 @@
     is_from_device,
     is_top_pick,
     is_ai,
+    is_search,
     COUNT(DISTINCT event_id) AS urlbar_sessions
   FROM
     temp_session
@@ -157,6 +176,7 @@
     pref_ohttp_enabled,
     ohttp_enabled,
     sap,
+    window_mode,
     is_adaptive,
     is_semantic,
     is_serp,
@@ -166,9 +186,10 @@
     is_geo_local,
     is_from_device,
     is_top_pick,
-    is_ai
+    is_ai,
+    is_search
 ),
-daily_counts AS (
+daily_bounce_disable_counts AS (
   SELECT
     submission_date,
     normalized_country_code,
@@ -184,6 +205,7 @@
     pref_ohttp_enabled,
     ohttp_enabled,
     sap,
+    window_mode,
     is_adaptive,
     is_semantic,
     is_serp,
@@ -194,9 +216,13 @@
     is_from_device,
     is_top_pick,
     is_ai,
+    is_search,
     COUNTIF(is_impression) AS urlbar_impressions,
     COUNTIF(is_clicked) AS urlbar_clicks,
     COUNTIF(is_annoyed) AS urlbar_annoyances,
+    COUNTIF(event_name = 'abandonment') AS urlbar_abandonments,
+    COUNTIF(event_name = 'bounce') AS urlbar_bounces,
+    COUNTIF(event_name = 'disable') AS urlbar_disables
   FROM
     temp_session
   GROUP BY
@@ -214,6 +240,7 @@
     pref_ohttp_enabled,
     ohttp_enabled,
     sap,
+    window_mode,
     is_adaptive,
     is_semantic,
     is_serp,
@@ -223,7 +250,8 @@
     is_geo_local,
     is_from_device,
     is_top_pick,
-    is_ai
+    is_ai,
+    is_search
 ),
 join_counts_sessions AS (
   SELECT
@@ -254,9 +282,14 @@
     is_geo_local,
     is_from_device,
     is_top_pick,
-    is_ai
+    is_ai,
+    is_search,
+    window_mode,
+    urlbar_abandonments,
+    urlbar_bounces,
+    urlbar_disables
   FROM
-    daily_counts
+    daily_bounce_disable_counts
   LEFT JOIN
     total_urlbar_sessions
     USING (
@@ -273,6 +306,7 @@
       pref_ohttp_enabled,
       ohttp_enabled,
       sap,
+      window_mode,
       is_adaptive,
       is_semantic,
       is_serp,
@@ -282,7 +316,8 @@
       is_geo_local,
       is_from_device,
       is_top_pick,
-      is_ai
+      is_ai,
+      is_search
     )
 ),
 final AS (
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/schema.yaml	2026-05-08 21:45:52.609265922 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/firefox_desktop_derived/urlbar_events_daily_v2/schema.yaml	2026-05-08 21:45:48.502263507 +0000
@@ -112,4 +112,25 @@
 - name: is_ai
   type: BOOLEAN
   mode: NULLABLE
-  description: Flag for when result type is associated with an "ai" result
+  description: Flag for when result type is associated with an AI or LLM generated result.
+- name: is_search
+  type: BOOLEAN
+  mode: NULLABLE
+  description: Flag for when result type is associated with a search engine result, or leading to a SERP (Search engine results page).
+- name: window_mode
+  type: STRING
+  mode: NULLABLE
+  description: |
+    The standard display of the browser: classic, private, or smartwindow.
+- name: urlbar_abandonments
+  type: INTEGER
+  mode: NULLABLE
+  description: Number of times that a user clicked into the browser address bar and left it without clicking a result or performing a search.
+- name: urlbar_bounces
+  type: INTEGER
+  mode: NULLABLE
+  description: Number of times a urlbar session ended because the user moved keyboard focus away from the urlbar.
+- name: urlbar_disables
+  type: INTEGER
+  mode: NULLABLE
+  description: Number of times a urlbar session ended because the urlbar was disabled.
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/zendesk_syndicate/dataset_metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/zendesk_syndicate/dataset_metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/zendesk_syndicate/dataset_metadata.yaml	2026-05-08 21:45:54.075391524 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/zendesk_syndicate/dataset_metadata.yaml	2026-05-08 21:45:49.887264321 +0000
@@ -9,13 +9,8 @@
     syndicated_project: moz-fx-sumo-prod
     syndicated_dataset: zendesk
   syndicated_tables:
-    - csat_survey_answer
     - group
-    - schedule
-    - schedule_holiday
     - ticket
-    - ticket_comment
-    - ticket_csat_survey
     - ticket_field_history
     - ticket_tag
     - user

Link to full diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants