Skip to content

Commit 851e010

Browse files
authored
feat: add partnership field to the active_users_aggregates view template (#6706)
* feat: add partnership field to the active_users_aggregates view template to support KPI filtering for partnership specific data * feat: add partnership to telemetry.active_users_aggregates view instead of the template
1 parent 96192c8 commit 851e010

File tree

2 files changed

+13
-3
lines changed
  • sql/moz-fx-data-shared-prod/telemetry/active_users_aggregates
  • sql_generators/active_users_aggregates_v4/templates

2 files changed

+13
-3
lines changed

sql/moz-fx-data-shared-prod/telemetry/active_users_aggregates/view.sql

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ SELECT
3232
app_version_minor,
3333
app_version_patch_revision,
3434
app_version_is_major_release,
35-
os_grouped
35+
os_grouped,
36+
CASE
37+
WHEN distribution_id LIKE "%vivo%"
38+
THEN "vivo"
39+
ELSE "other"
40+
END AS partnership,
3641
FROM
3742
`moz-fx-data-shared-prod.telemetry.active_users_aggregates_mobile`
3843
UNION ALL
@@ -68,6 +73,11 @@ SELECT
6873
app_version_minor,
6974
app_version_patch_revision,
7075
app_version_is_major_release,
71-
os_grouped
76+
os_grouped,
77+
CASE
78+
WHEN distribution_id LIKE "%vivo%"
79+
THEN "vivo"
80+
ELSE "other"
81+
END AS partnership,
7282
FROM
7383
`moz-fx-data-shared-prod.firefox_desktop.active_users_aggregates`

sql_generators/active_users_aggregates_v4/templates/view.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ SELECT
1010
`mozfun.norm.browser_version_info`(app_version).minor_version AS app_version_minor,
1111
`mozfun.norm.browser_version_info`(app_version).patch_revision AS app_version_patch_revision,
1212
`mozfun.norm.browser_version_info`(app_version).is_major_release AS app_version_is_major_release,
13-
`mozfun.norm.os`(os) AS os_grouped
13+
`mozfun.norm.os`(os) AS os_grouped,
1414
FROM
1515
`{{ project_id }}.{{ app_name }}_derived.{{ table_name }}`

0 commit comments

Comments
 (0)