Skip to content

Commit 41f6024

Browse files
authored
feat(DENG-9984): Create fx_health_ind_new_profiles_by_os & fx_health_ind_webcompat (#8348)
* feat(DENG-9984): Create fx_health_ind_new_profiles_by_os_v1 * feat(DENG-9984): Create fx_health_ind_webcompat_v1
1 parent 682314d commit 41f6024

File tree

8 files changed

+122
-0
lines changed

8 files changed

+122
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE OR REPLACE VIEW
2+
`moz-fx-data-shared-prod.firefox_desktop.fx_health_ind_new_profiles_by_os`
3+
AS
4+
SELECT
5+
*
6+
FROM
7+
`moz-fx-data-shared-prod.firefox_desktop_derived.fx_health_ind_new_profiles_by_os_v1`
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE OR REPLACE VIEW
2+
`moz-fx-data-shared-prod.firefox_desktop.fx_health_ind_webcompat`
3+
AS
4+
SELECT
5+
*
6+
FROM
7+
`moz-fx-data-shared-prod.firefox_desktop_derived.fx_health_ind_webcompat_v1`
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
friendly_name: Firefox Health Indicator - New Profiles By OS
2+
description: |-
3+
Aggregate table used in Firefox Health dashboard, contains number of new profiles by OS
4+
owners:
5+
6+
labels:
7+
incremental: true
8+
owner1: kwindau
9+
table_type: aggregate
10+
shredder_mitigation: true
11+
scheduling:
12+
dag_name: bqetl_fx_health_ind_dashboard
13+
bigquery:
14+
time_partitioning:
15+
type: day
16+
field: submission_date
17+
require_partition_filter: false
18+
expiration_days: null
19+
range_partitioning: null
20+
clustering:
21+
fields:
22+
- os_version_bucket
23+
references: {}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SELECT
2+
submission_date,
3+
CASE
4+
WHEN normalized_os_version = '6.1'
5+
THEN 'Win7'
6+
WHEN normalized_os_version = '6.2'
7+
THEN 'Win8'
8+
WHEN normalized_os_version = '6.3'
9+
THEN 'Win8.1'
10+
WHEN (normalized_os_version = '10.0' AND windows_build_number >= 22000)
11+
THEN 'Win11'
12+
WHEN (normalized_os_version = '10.0' AND windows_build_number < 22000)
13+
THEN 'Win10'
14+
ELSE normalized_os
15+
END AS os_version_bucket,
16+
COUNT(DISTINCT(client_id)) AS new_profiles
17+
FROM
18+
`moz-fx-data-shared-prod.firefox_desktop.glean_baseline_clients_first_seen`
19+
WHERE
20+
first_seen_date = @submission_date
21+
AND submission_date = @submission_date
22+
GROUP BY
23+
submission_date,
24+
os_version_bucket
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
fields:
2+
- mode: NULLABLE
3+
name: submission_date
4+
type: DATE
5+
description: Submission Date
6+
- name: os_version_bucket
7+
type: STRING
8+
mode: NULLABLE
9+
description: A bucket for OS versions - for example, Win10, Win11, etc.
10+
- name: new_profiles
11+
type: INTEGER
12+
mode: NULLABLE
13+
description: Number of new profiles
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
friendly_name: ETP Disablement by Country and Date
2+
description: |-
3+
Aggregate table of count of unique users setting ETP disablement by day/country; used in Firefox Health Indicator dashboard
4+
owners:
5+
6+
labels:
7+
incremental: true
8+
owner1: kwindau
9+
shredder_mitigation: true
10+
table_type: aggregate
11+
scheduling:
12+
dag_name: bqetl_fx_health_ind_dashboard
13+
bigquery:
14+
time_partitioning:
15+
type: day
16+
field: submission_date
17+
require_partition_filter: false
18+
expiration_days: null
19+
range_partitioning: null
20+
clustering:
21+
fields:
22+
- country
23+
references: {}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
SELECT
2+
DATE(submission_timestamp) AS submission_date,
3+
metadata.geo.country AS country,
4+
COUNT(DISTINCT(client_id)) AS nbr_unique_clients_etp_disablement
5+
FROM
6+
`moz-fx-data-shared-prod.firefox_desktop.events_stream` AS e
7+
WHERE
8+
DATE(submission_timestamp) = @submission_date
9+
AND event = 'security.ui.protectionspopup.click_etp_toggle_off'
10+
GROUP BY
11+
submission_date,
12+
country
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
fields:
2+
- mode: NULLABLE
3+
name: submission_date
4+
type: DATE
5+
description: Submission Date
6+
- name: country
7+
type: STRING
8+
mode: NULLABLE
9+
description: Country
10+
- name: nbr_unique_clients_etp_disablement
11+
type: INTEGER
12+
mode: NULLABLE
13+
description: Count of Unique Clients Setting ETP Disablement

0 commit comments

Comments
 (0)