Skip to content

Commit 4e50c42

Browse files
authored
fix(DENG-10047): Add engaged_session flag at the session level to the firefox.com firefox_whatsnew_summary view, & add session filter (#8490)
1 parent 12c31f3 commit 4e50c42

File tree

1 file changed

+9
-1
lines changed
  • sql/moz-fx-data-shared-prod/firefoxdotcom/firefox_whatsnew_summary

1 file changed

+9
-1
lines changed

sql/moz-fx-data-shared-prod/firefoxdotcom/firefox_whatsnew_summary/view.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ CREATE OR REPLACE VIEW
22
`moz-fx-data-shared-prod.firefoxdotcom.firefox_whatsnew_summary`
33
AS
44
SELECT
5+
wns.ga_client_id || "-" || wns.ga_session_id AS visit_identifier,
56
wns.*,
6-
map.english_text
7+
map.english_text,
8+
s.engaged_session
79
FROM
810
`moz-fx-data-shared-prod.firefoxdotcom_derived.firefox_whatsnew_summary_v2` wns
11+
JOIN
12+
`moz-fx-data-shared-prod.firefoxdotcom_derived.ga_sessions_v2` s
13+
ON wns.ga_client_id = s.ga_client_id
14+
AND wns.ga_session_id = s.ga_session_id
915
LEFT JOIN
1016
(
1117
--this is an extra safeguard, there should only ever be 1 row per UID & locale
@@ -21,3 +27,5 @@ LEFT JOIN
2127
) map
2228
ON wns.cta_click_uid = map.data_cta_uid
2329
AND wns.page_location_locale = map.locale
30+
WHERE
31+
REGEXP_CONTAINS(s.ga_client_id || '-' || s.ga_session_id, r"^[0-9]+\.{1}[0-9]+\-{1}[0-9]+$")

0 commit comments

Comments
 (0)