DENG-476 - Create derived table for HCM clients dashboards (#4372)
so that they no longer need to depend on main summary
This commit is contained in:
Родитель
3691e88952
Коммит
de71eac14d
|
@ -272,7 +272,6 @@ bqetl_main_summary:
|
|||
[
|
||||
"telemetry-alerts@mozilla.com",
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
]
|
||||
retries: 2
|
||||
retry_delay: 30m
|
||||
|
|
|
@ -28,11 +28,7 @@ default_args = {
|
|||
"owner": "dthorn@mozilla.com",
|
||||
"start_date": datetime.datetime(2018, 11, 27, 0, 0),
|
||||
"end_date": None,
|
||||
"email": [
|
||||
"telemetry-alerts@mozilla.com",
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
],
|
||||
"email": ["telemetry-alerts@mozilla.com", "dthorn@mozilla.com"],
|
||||
"depends_on_past": False,
|
||||
"retry_delay": datetime.timedelta(seconds=1800),
|
||||
"email_on_failure": True,
|
||||
|
@ -57,7 +53,6 @@ with DAG(
|
|||
owner="wlachance@mozilla.com",
|
||||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
"wlachance@mozilla.com",
|
||||
],
|
||||
|
@ -75,7 +70,6 @@ with DAG(
|
|||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"frank@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
date_partition_parameter="submission_date",
|
||||
|
@ -104,11 +98,7 @@ with DAG(
|
|||
dataset_id="telemetry_derived",
|
||||
project_id="moz-fx-data-shared-prod",
|
||||
owner="dthorn@mozilla.com",
|
||||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
email=["dthorn@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
date_partition_parameter="submission_date",
|
||||
depends_on_past=False,
|
||||
)
|
||||
|
@ -134,11 +124,7 @@ with DAG(
|
|||
dataset_id="telemetry_derived",
|
||||
project_id="moz-fx-data-shared-prod",
|
||||
owner="dthorn@mozilla.com",
|
||||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
email=["dthorn@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
start_date=datetime.datetime(2019, 11, 5, 0, 0),
|
||||
date_partition_parameter="submission_date",
|
||||
depends_on_past=False,
|
||||
|
@ -211,7 +197,6 @@ with DAG(
|
|||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"frank@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
start_date=datetime.datetime(2021, 1, 19, 0, 0),
|
||||
|
@ -430,6 +415,17 @@ with DAG(
|
|||
task_concurrency=1,
|
||||
)
|
||||
|
||||
telemetry_derived__hcm_clients__v1 = bigquery_etl_query(
|
||||
task_id="telemetry_derived__hcm_clients__v1",
|
||||
destination_table="hcm_clients_v1",
|
||||
dataset_id="telemetry_derived",
|
||||
project_id="moz-fx-data-shared-prod",
|
||||
owner="dthorn@mozilla.com",
|
||||
email=["dthorn@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
date_partition_parameter="submission_date",
|
||||
depends_on_past=False,
|
||||
)
|
||||
|
||||
telemetry_derived__main_1pct__v1 = bigquery_etl_query(
|
||||
task_id="telemetry_derived__main_1pct__v1",
|
||||
destination_table="main_1pct_v1",
|
||||
|
@ -473,7 +469,6 @@ with DAG(
|
|||
email=[
|
||||
"ascholtz@mozilla.com",
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
start_date=datetime.datetime(2023, 7, 1, 0, 0),
|
||||
|
@ -502,11 +497,7 @@ with DAG(
|
|||
dataset_id="telemetry_derived",
|
||||
project_id="moz-fx-data-shared-prod",
|
||||
owner="dthorn@mozilla.com",
|
||||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
email=["dthorn@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
start_date=datetime.datetime(2019, 10, 25, 0, 0),
|
||||
date_partition_parameter="submission_date",
|
||||
depends_on_past=False,
|
||||
|
@ -552,7 +543,6 @@ with DAG(
|
|||
email=[
|
||||
"ascholtz@mozilla.com",
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
start_date=datetime.datetime(2023, 7, 1, 0, 0),
|
||||
|
@ -569,7 +559,6 @@ with DAG(
|
|||
owner="rburwei@mozilla.com",
|
||||
email=[
|
||||
"dthorn@mozilla.com",
|
||||
"jklukas@mozilla.com",
|
||||
"rburwei@mozilla.com",
|
||||
"telemetry-alerts@mozilla.com",
|
||||
],
|
||||
|
@ -705,6 +694,8 @@ with DAG(
|
|||
firefox_desktop_exact_mau28_by_dimensions_v2
|
||||
)
|
||||
|
||||
telemetry_derived__hcm_clients__v1.set_upstream(wait_for_copy_deduplicate_main_ping)
|
||||
|
||||
telemetry_derived__main_1pct__v1.set_upstream(wait_for_copy_deduplicate_main_ping)
|
||||
|
||||
telemetry_derived__main_nightly__v1.set_upstream(
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
CREATE OR REPLACE VIEW
|
||||
`moz-fx-data-shared-prod.telemetry.hcm_clients`
|
||||
AS
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`moz-fx-data-shared-prod.telemetry_derived.hcm_clients_v1`
|
|
@ -0,0 +1,22 @@
|
|||
friendly_name: HCM Clients
|
||||
description: |-
|
||||
OS High Color Mode (HCM) Firefox Clients by channel and os. This table counts
|
||||
users who have OS HCM on and who have not forced document colors everywhere
|
||||
(ie. the OS HCM colors should propagate to web content).
|
||||
owners:
|
||||
- dthorn@mozilla.com
|
||||
labels:
|
||||
incremental: true
|
||||
owner1: dthorn
|
||||
scheduling:
|
||||
application: firefox
|
||||
schedule: daily
|
||||
dag_name: bqetl_main_summary
|
||||
bigquery:
|
||||
time_partitioning:
|
||||
type: day
|
||||
field: submission_date
|
||||
require_partition_filter: false
|
||||
clustering:
|
||||
fields:
|
||||
- channel
|
|
@ -0,0 +1,34 @@
|
|||
SELECT
|
||||
DATE(main.submission_timestamp) AS submission_date,
|
||||
main.normalized_channel AS channel,
|
||||
main.environment.system.os.name AS os,
|
||||
COUNT(DISTINCT client_id) AS num_clients,
|
||||
FROM
|
||||
`moz-fx-data-shared-prod`.telemetry_stable.main_v5 AS main
|
||||
CROSS JOIN
|
||||
UNNEST(main.payload.processes.parent.keyed_scalars.a11y_theme) AS a11y_theme
|
||||
WHERE
|
||||
{% if is_init() %}
|
||||
DATE(main.submission_timestamp) >= '2021-01-01'
|
||||
{% else %}
|
||||
DATE(main.submission_timestamp) = @submission_date
|
||||
{% endif %}
|
||||
/*
|
||||
a11y_theme.value is TRUE when an OS high contrast mode (HCM) is present and FALSE otherwise,
|
||||
|
||||
a11y_theme.key is derived from the config pref `browser.display.document_color_use" which is has the
|
||||
following values / meanings:
|
||||
* "always" = always use document colors, regardless of OS HCM or colors chosen in the colors
|
||||
dialog (about:preferences > manage colors)
|
||||
* "never" = never use document colors (this is equivalent to "always use HCM colors")
|
||||
* "default" = use document colors when OS HCM is off, and use OS HCM colors when OS HCM is on.
|
||||
|
||||
This condition selects users who have OS HCM on and who have not forced document colors everywhere
|
||||
(ie. the OS HCM colors should propagate to web content).
|
||||
*/
|
||||
AND a11y_theme.value IS TRUE
|
||||
AND a11y_theme.key != "always"
|
||||
GROUP BY
|
||||
submission_date,
|
||||
channel,
|
||||
os
|
Загрузка…
Ссылка в новой задаче