Desktop_retention_aggregates_v2 changes the data source from clients_first_seen_v2 to v3 as well as adding distribution_id to table (#6199)

This commit is contained in:
Marlene Hirose 2024-09-13 09:30:38 -07:00 коммит произвёл GitHub
Родитель 26d15abc18
Коммит ea2ad740a7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 177 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,26 @@
friendly_name: Desktop Retention - Aggregate
description: |-
Desktop Retention Aggregated
owners:
- mhirose@mozilla.com
labels:
incremental: true
owner1: example
scheduling:
dag_name: bqetl_desktop_retention_model
date_partition_parameter: metric_date
date_partition_offset: -27
parameters:
- submission_date:DATE:{{ds}}
bigquery:
time_partitioning:
type: day
field: 'metric_date'
require_partition_filter: false
expiration_days: null
range_partitioning: null
clustering:
fields:
- country
- normalized_os
references: {}

Просмотреть файл

@ -0,0 +1,50 @@
SELECT
metric_date,
first_seen_date,
normalized_channel,
country,
app_version,
locale,
attribution_campaign,
attribution_content,
attribution_dlsource,
attribution_medium,
attribution_ua,
attribution_experiment,
attribution_variation,
distribution_id,
startup_profile_selection_reason,
normalized_os,
normalized_os_version,
is_desktop,
COUNTIF(ping_sent_metric_date) AS ping_sent_metric_date,
COUNTIF(ping_sent_week_4) AS ping_sent_week_4,
COUNTIF(active_metric_date) AS active_metric_date,
COUNTIF(retained_week_4) AS retained_week_4,
COUNTIF(retained_week_4_new_profile) AS retained_week_4_new_profiles,
COUNTIF(new_profile_metric_date) AS new_profiles_metric_date,
COUNTIF(repeat_profile) AS repeat_profiles,
FROM
`moz-fx-data-shared-prod.telemetry_derived.desktop_retention_clients_v2`
WHERE
metric_date = DATE_SUB(@submission_date, INTERVAL 27 DAY)
AND submission_date = @submission_date
GROUP BY
metric_date,
first_seen_date,
normalized_channel,
country,
app_version,
locale,
attribution_campaign,
attribution_content,
attribution_dlsource,
attribution_medium,
attribution_ua,
attribution_experiment,
attribution_variation,
distribution_id,
startup_profile_selection_reason,
normalized_os,
normalized_os_version,
is_desktop

Просмотреть файл

@ -0,0 +1,101 @@
fields:
- mode: NULLABLE
name: metric_date
type: DATE
description: Metric DAte
- mode: NULLABLE
name: first_seen_date
type: DATE
description: First Seen Date
- mode: NULLABLE
name: normalized_channel
type: STRING
description: Normalized Channel
- mode: NULLABLE
name: country
type: STRING
description: Country
- mode: NULLABLE
name: app_version
type: STRING
description: App Version
- mode: NULLABLE
name: locale
type: STRING
description: Locale
- mode: NULLABLE
name: attribution_campaign
type: STRING
description: Attribution Campaign
- mode: NULLABLE
name: attribution_content
type: STRING
description: Attribution Content
- mode: NULLABLE
name: attribution_dlsource
type: STRING
description: Attribution DL Source
- mode: NULLABLE
name: attribution_medium
type: STRING
description: Attribution Medium
- mode: NULLABLE
name: attribution_ua
type: STRING
description: Attribution UA
- mode: NULLABLE
name: attribution_experiment
type: STRING
description: Attribution Experiment
- mode: NULLABLE
name: attribution_variation
type: STRING
description: Attribution Variation
- mode: NULLABLE
name: distribution_id
type: STRING
description: Distribution ID
- mode: NULLABLE
name: startup_profile_selection_reason
type: STRING
description: Startup Profile Selection Reason
- mode: NULLABLE
name: normalized_os
type: STRING
description: Normalized OS
- mode: NULLABLE
name: normalized_os_version
type: STRING
description: Normalized OS Version
- mode: NULLABLE
name: is_desktop
type: BOOLEAN
description: Indicates if the client is included in the desktop KPI
- mode: NULLABLE
name: ping_sent_metric_date
type: INT64
description: Count of Pings Sent on Metric Date
- mode: NULLABLE
name: ping_sent_week_4
type: INT64
description: Count of Pings Sent on Week 4
- mode: NULLABLE
name: active_metric_date
type: INT64
description: Count of Clients Active on Metric Date
- mode: NULLABLE
name: retained_week_4
type: INT64
description: Count of Clients Retained on Week 4
- mode: NULLABLE
name: retained_week_4_new_profiles
type: INT64
description: Count of New Profiles Retained on Week 4
- mode: NULLABLE
name: new_profiles_metric_date
type: INT64
description: Count of New Profiles on Metric Date
- mode: NULLABLE
name: repeat_profiles
type: INT64
description: Count of Repeat Profiles