-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create aggregate tables for Firefox Health Indicators dashboard (#6699)
* Create new aggregate table for Firefox Health Indicator dashboard * Create new video playback by OS version table * Create agg table at country level * Fix SQL formatting
- Loading branch information
Showing
12 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
sql/moz-fx-data-shared-prod/telemetry/fx_health_ind_vid_plybck_by_country/view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE OR REPLACE VIEW | ||
`moz-fx-data-shared-prod.telemetry.fx_health_ind_vid_plybck_by_country` | ||
AS | ||
SELECT | ||
* | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry_derived.fx_health_ind_vid_plybck_by_country_v1` |
7 changes: 7 additions & 0 deletions
7
sql/moz-fx-data-shared-prod/telemetry/fx_health_ind_vid_plybck_by_os/view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE OR REPLACE VIEW | ||
`moz-fx-data-shared-prod.telemetry.fx_health_ind_vid_plybck_by_os` | ||
AS | ||
SELECT | ||
* | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry_derived.fx_health_ind_vid_plybck_by_os_v1` |
7 changes: 7 additions & 0 deletions
7
sql/moz-fx-data-shared-prod/telemetry/fx_health_ind_vid_plybck_by_os_version/view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE OR REPLACE VIEW | ||
`moz-fx-data-shared-prod.telemetry.fx_health_ind_vid_plybck_by_os_version` | ||
AS | ||
SELECT | ||
* | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry_derived.fx_health_ind_vid_plybck_by_os_version_v1` |
22 changes: 22 additions & 0 deletions
22
...x-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_country_v1/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
friendly_name: Fx Health Ind Vid Plybck By Os | ||
description: |- | ||
Aggregate table of video playback minutes per user per OS | ||
owners: | ||
- kwindau@mozilla.com | ||
labels: | ||
incremental: true | ||
owner1: kwindau@mozilla.com | ||
table_type: aggregate | ||
scheduling: | ||
dag_name: bqetl_fx_health_ind_dashboard | ||
bigquery: | ||
time_partitioning: | ||
type: day | ||
field: submission_date | ||
require_partition_filter: false | ||
expiration_days: null | ||
range_partitioning: null | ||
clustering: | ||
fields: | ||
- normalized_country_code | ||
references: {} |
15 changes: 15 additions & 0 deletions
15
...oz-fx-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_country_v1/query.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
SELECT | ||
DATE(submission_timestamp) AS submission_date, | ||
normalized_country_code, | ||
SUM( | ||
`moz-fx-data-shared-prod.udf.histogram_max_key_with_nonzero_value`( | ||
payload.processes.content.histograms.video_play_time_ms | ||
) | ||
) / COUNT(DISTINCT client_id) / 60000 AS play_time_ratio | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry.main_1pct` | ||
WHERE | ||
DATE(submission_timestamp) = @submission_date | ||
GROUP BY | ||
DATE(submission_timestamp), | ||
normalized_country_code |
13 changes: 13 additions & 0 deletions
13
...-fx-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_country_v1/schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
fields: | ||
- mode: NULLABLE | ||
name: submission_date | ||
type: DATE | ||
description: Submission Date | ||
- mode: NULLABLE | ||
name: normalized_country_code | ||
type: STRING | ||
description: Normalized Country Code | ||
- mode: NULLABLE | ||
name: play_time_ratio | ||
type: FLOAT | ||
description: Play Time Ratio |
22 changes: 22 additions & 0 deletions
22
...moz-fx-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_os_v1/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
friendly_name: Fx Health Ind Vid Plybck By Os | ||
description: |- | ||
Aggregate table of video playback minutes per user per OS | ||
owners: | ||
- kwindau@mozilla.com | ||
labels: | ||
incremental: true | ||
owner1: kwindau@mozilla.com | ||
table_type: aggregate | ||
scheduling: | ||
dag_name: bqetl_fx_health_ind_dashboard | ||
bigquery: | ||
time_partitioning: | ||
type: day | ||
field: submission_date | ||
require_partition_filter: false | ||
expiration_days: null | ||
range_partitioning: null | ||
clustering: | ||
fields: | ||
- normalized_os | ||
references: {} |
17 changes: 17 additions & 0 deletions
17
sql/moz-fx-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_os_v1/query.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SELECT | ||
DATE(submission_timestamp) AS submission_date, | ||
normalized_os, | ||
SUM( | ||
`moz-fx-data-shared-prod.udf.histogram_max_key_with_nonzero_value`( | ||
payload.processes.content.histograms.video_play_time_ms | ||
) | ||
) / COUNT(DISTINCT client_id) / 60000 AS play_time_ratio | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry.main` | ||
WHERE | ||
DATE(submission_timestamp) = @submission_date | ||
AND normalized_os IN ('Windows', 'Linux', 'Mac') | ||
AND sample_id = 42 | ||
GROUP BY | ||
DATE(submission_timestamp), | ||
normalized_os |
13 changes: 13 additions & 0 deletions
13
sql/moz-fx-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_os_v1/schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
fields: | ||
- mode: NULLABLE | ||
name: submission_date | ||
type: DATE | ||
description: Submission Date | ||
- mode: NULLABLE | ||
name: normalized_os | ||
type: STRING | ||
description: Normalized Operating System | ||
- mode: NULLABLE | ||
name: play_time_ratio | ||
type: FLOAT | ||
description: Play Time Ratio |
22 changes: 22 additions & 0 deletions
22
...ata-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_os_version_v1/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
friendly_name: Fx Health Ind Vid Plybck By Os | ||
description: |- | ||
Aggregate table of video playback minutes per user per OS | ||
owners: | ||
- kwindau@mozilla.com | ||
labels: | ||
incremental: true | ||
owner1: kwindau@mozilla.com | ||
table_type: aggregate | ||
scheduling: | ||
dag_name: bqetl_fx_health_ind_dashboard | ||
bigquery: | ||
time_partitioning: | ||
type: day | ||
field: submission_date | ||
require_partition_filter: false | ||
expiration_days: null | ||
range_partitioning: null | ||
clustering: | ||
fields: | ||
- normalized_os_version | ||
references: {} |
16 changes: 16 additions & 0 deletions
16
...fx-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_os_version_v1/query.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SELECT | ||
DATE(submission_timestamp) AS submission_date, | ||
normalized_os_version, | ||
SUM( | ||
`moz-fx-data-shared-prod.udf.histogram_max_key_with_nonzero_value`( | ||
payload.processes.content.histograms.video_play_time_ms | ||
) | ||
) / COUNT(DISTINCT client_id) / 60000 AS play_time_ratio | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry.main_1pct` | ||
WHERE | ||
DATE(submission_timestamp) = @submission_date | ||
AND normalized_os = 'Windows' | ||
GROUP BY | ||
DATE(submission_timestamp), | ||
normalized_os_version |
13 changes: 13 additions & 0 deletions
13
...-data-shared-prod/telemetry_derived/fx_health_ind_vid_plybck_by_os_version_v1/schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
fields: | ||
- mode: NULLABLE | ||
name: submission_date | ||
type: DATE | ||
description: Submission Date | ||
- mode: NULLABLE | ||
name: normalized_os_version | ||
type: STRING | ||
description: Normalized Operating System Version | ||
- mode: NULLABLE | ||
name: play_time_ratio | ||
type: FLOAT | ||
description: Play Time Ratio |
6f23929
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration report for "Create aggregate tables for Firefox Health Indicators dashboard (#6699)"
sql.diff
Click to expand!
Link to full diff