Skip to content

Commit 7acbaa7

Browse files
committed
Add firefox_ios derived tables and views for health scorecards
This adds the following Glean Health Scorecard related views and derived tables for firefox_ios: - `telemetry_health_glean_errors` - `telemetry_health_ping_latency` - `telemetry_health_ping_volume_p80` - `telemetry_health_sequence_holes`
1 parent b49a984 commit 7acbaa7

File tree

32 files changed

+420
-58
lines changed

32 files changed

+420
-58
lines changed

sql/moz-fx-data-shared-prod/fenix_derived/telemetry_health_ping_latency_v1/query.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
WITH sample AS (
22
SELECT
3-
normalized_channel AS channel,
3+
normalized_channel,
44
metadata.header.parsed_date,
55
ping_info.parsed_end_time,
66
submission_timestamp,
@@ -12,7 +12,7 @@ WITH sample AS (
1212
),
1313
latency_quantiles AS (
1414
SELECT
15-
channel,
15+
normalized_channel,
1616
DATE(submission_timestamp) AS submission_date,
1717
APPROX_QUANTILES(
1818
TIMESTAMP_DIFF(parsed_date, parsed_end_time, SECOND),
@@ -32,7 +32,7 @@ latency_quantiles AS (
3232
ALL
3333
)
3434
SELECT
35-
channel,
35+
normalized_channel,
3636
submission_date,
3737
collection_to_submission_latency[OFFSET(95)] AS collection_to_submission_latency_p95,
3838
collection_to_submission_latency[OFFSET(50)] AS collection_to_submission_latency_median,

sql/moz-fx-data-shared-prod/fenix_derived/telemetry_health_ping_latency_v1/schema.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
fields:
2-
- name: application
2+
- name: normalized_channel
33
type: STRING
4-
mode: REQUIRED
5-
- name: channel
6-
type: STRING
7-
mode: REQUIRED
4+
mode: NULLABLE
85
- name: submission_date
96
type: DATE
10-
mode: REQUIRED
7+
mode: NULLABLE
118
- name: collection_to_submission_latency_p95
129
type: INTEGER
1310
mode: NULLABLE

sql/moz-fx-data-shared-prod/fenix_derived/telemetry_health_ping_volume_p80_v1/query.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Query for telemetry health ping volume p80
22
WITH sample AS (
33
SELECT
4-
normalized_channel AS channel,
4+
normalized_channel,
55
DATE(submission_timestamp) AS submission_date,
66
COUNT(1) AS ping_count
77
FROM
@@ -10,13 +10,13 @@ WITH sample AS (
1010
sample_id = 0
1111
AND DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
1212
GROUP BY
13-
channel,
13+
normalized_channel,
1414
submission_date,
1515
client_info.client_id
1616
),
1717
ping_count_quantiles AS (
1818
SELECT
19-
channel,
19+
normalized_channel,
2020
submission_date,
2121
APPROX_QUANTILES(ping_count, 100) AS quantiles,
2222
FROM
@@ -25,7 +25,7 @@ ping_count_quantiles AS (
2525
ALL
2626
)
2727
SELECT
28-
channel,
28+
normalized_channel,
2929
submission_date,
3030
quantiles[OFFSET(80)] AS p80
3131
FROM
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
fields:
2-
- name: application
2+
- name: normalized_channel
33
type: STRING
4-
mode: REQUIRED
5-
- name: channel
6-
type: STRING
7-
mode: REQUIRED
4+
mode: NULLABLE
85
- name: submission_date
96
type: DATE
10-
mode: REQUIRED
7+
mode: NULLABLE
118
- name: p80
129
type: INTEGER
1310
mode: NULLABLE

sql/moz-fx-data-shared-prod/fenix_derived/telemetry_health_sequence_holes_v1/query.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Query for telemetry health sequence holes
22
WITH sample AS (
33
SELECT
4-
normalized_channel AS channel,
4+
normalized_channel,
55
DATE(submission_timestamp) AS submission_date,
66
client_info.client_id,
77
ping_info.seq AS sequence_number
@@ -13,7 +13,7 @@ WITH sample AS (
1313
),
1414
lagged AS (
1515
SELECT
16-
channel,
16+
normalized_channel,
1717
submission_date,
1818
client_id,
1919
sequence_number,
@@ -29,7 +29,7 @@ lagged AS (
2929
),
3030
per_client_day AS (
3131
SELECT
32-
channel,
32+
normalized_channel,
3333
submission_date,
3434
client_id,
3535
-- A client has a gap on that date if any step isn't prev+1.
@@ -40,7 +40,7 @@ per_client_day AS (
4040
ALL
4141
)
4242
SELECT
43-
channel,
43+
normalized_channel,
4444
submission_date,
4545
COUNTIF(has_gap) AS clients_with_sequence_gaps_1pct,
4646
COUNT(DISTINCT client_id) AS total_unique_clients_1pct,

sql/moz-fx-data-shared-prod/fenix_derived/telemetry_health_sequence_holes_v1/schema.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
fields:
2-
- name: application
2+
- name: normalized_channel
33
type: STRING
4-
mode: REQUIRED
5-
- name: channel
6-
type: STRING
7-
mode: REQUIRED
4+
mode: NULLABLE
85
- name: submission_date
96
type: DATE
10-
mode: REQUIRED
7+
mode: NULLABLE
118
- name: clients_with_sequence_gaps_1pct
129
type: INTEGER
1310
mode: NULLABLE

sql/moz-fx-data-shared-prod/firefox_desktop_derived/telemetry_health_ping_latency_v1/query.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
WITH sample AS (
22
SELECT
3-
normalized_channel AS channel,
3+
normalized_channel,
44
metadata.header.parsed_date,
55
ping_info.parsed_end_time,
66
submission_timestamp,
@@ -12,7 +12,7 @@ WITH sample AS (
1212
),
1313
latency_quantiles AS (
1414
SELECT
15-
channel,
15+
normalized_channel,
1616
DATE(submission_timestamp) AS submission_date,
1717
APPROX_QUANTILES(
1818
TIMESTAMP_DIFF(parsed_date, parsed_end_time, SECOND),
@@ -32,7 +32,7 @@ latency_quantiles AS (
3232
ALL
3333
)
3434
SELECT
35-
channel,
35+
normalized_channel,
3636
submission_date,
3737
collection_to_submission_latency[OFFSET(95)] AS collection_to_submission_latency_p95,
3838
collection_to_submission_latency[OFFSET(50)] AS collection_to_submission_latency_median,

sql/moz-fx-data-shared-prod/firefox_desktop_derived/telemetry_health_ping_latency_v1/schema.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
fields:
2-
- name: application
2+
- name: normalized_channel
33
type: STRING
4-
mode: REQUIRED
5-
- name: channel
6-
type: STRING
7-
mode: REQUIRED
4+
mode: NULLABLE
85
- name: submission_date
96
type: DATE
10-
mode: REQUIRED
7+
mode: NULLABLE
118
- name: collection_to_submission_latency_p95
129
type: INTEGER
1310
mode: NULLABLE

sql/moz-fx-data-shared-prod/firefox_desktop_derived/telemetry_health_ping_volume_p80_v1/query.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Query for telemetry health ping volume p80
22
WITH sample AS (
33
SELECT
4-
normalized_channel AS channel,
4+
normalized_channel,
55
DATE(submission_timestamp) AS submission_date,
66
COUNT(1) AS ping_count
77
FROM
@@ -10,13 +10,13 @@ WITH sample AS (
1010
sample_id = 0
1111
AND DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
1212
GROUP BY
13-
channel,
13+
normalized_channel,
1414
submission_date,
1515
client_info.client_id
1616
),
1717
ping_count_quantiles AS (
1818
SELECT
19-
channel,
19+
normalized_channel,
2020
submission_date,
2121
APPROX_QUANTILES(ping_count, 100) AS quantiles,
2222
FROM
@@ -25,7 +25,7 @@ ping_count_quantiles AS (
2525
ALL
2626
)
2727
SELECT
28-
channel,
28+
normalized_channel,
2929
submission_date,
3030
quantiles[OFFSET(80)] AS p80
3131
FROM
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
fields:
2-
- name: application
2+
- name: normalized_channel
33
type: STRING
4-
mode: REQUIRED
5-
- name: channel
6-
type: STRING
7-
mode: REQUIRED
4+
mode: NULLABLE
85
- name: submission_date
96
type: DATE
10-
mode: REQUIRED
7+
mode: NULLABLE
118
- name: p80
129
type: INTEGER
1310
mode: NULLABLE

0 commit comments

Comments
 (0)