feat: update firefox_android_clients_v1 to pull distribution_id only from the baseline ping (#5685)

* feat: update firefox_android_clients_v1 to pull distribution_id only from the baseline ping

* feat: update firefox_android_clients_v1 baseline test schema to include distribution_id

* fix: resolve distribution_id not in baseline error

---------

Co-authored-by: Katie Windau <153020235+kwindau@users.noreply.github.com>
This commit is contained in:
kik-kik 2024-05-30 19:43:53 +02:00 коммит произвёл GitHub
Родитель f7496428b3
Коммит 11e7ca30a9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 10 добавлений и 12 удалений

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

@ -19,6 +19,7 @@ WITH baseline_clients AS (
app_display_version AS app_version,
locale,
is_new_profile,
distribution_id,
FROM
`moz-fx-data-shared-prod.fenix.baseline_clients_daily`
WHERE
@ -43,7 +44,7 @@ first_seen AS (
device_model,
os_version,
app_version,
locale
locale,
FROM
baseline_clients
WHERE
@ -154,11 +155,6 @@ first_session_ping AS (
ORDER BY
submission_timestamp ASC
)[SAFE_OFFSET(0)] AS play_store_attribution_install_referrer_response,
ARRAY_AGG(
metrics.string.first_session_distribution_id IGNORE NULLS
ORDER BY
submission_timestamp ASC
)[SAFE_OFFSET(0)] AS distribution_id,
ARRAY_AGG(metrics.string.meta_attribution_app IGNORE NULLS ORDER BY submission_timestamp ASC)[
SAFE_OFFSET(0)
] AS meta_attribution_app,
@ -231,11 +227,6 @@ metrics_ping AS (
ORDER BY
submission_timestamp DESC
)[SAFE_OFFSET(0)] AS last_reported_adjust_campaign,
ARRAY_AGG(
metrics.string.metrics_distribution_id IGNORE NULLS
ORDER BY
submission_timestamp ASC
)[SAFE_OFFSET(0)] AS distribution_id,
FROM
fenix.metrics AS fenix_metrics
WHERE
@ -267,6 +258,9 @@ baseline_ping AS (
ARRAY_AGG(locale IGNORE NULLS ORDER BY submission_date DESC)[
SAFE_OFFSET(0)
] AS last_reported_locale,
ARRAY_AGG(distribution_id IGNORE NULLS ORDER BY submission_date DESC)[
SAFE_OFFSET(0)
] AS distribution_id,
FROM
baseline_clients
GROUP BY
@ -299,7 +293,7 @@ _current AS (
first_session.play_store_attribution_source,
first_session.play_store_attribution_term,
first_session.play_store_attribution_install_referrer_response,
COALESCE(first_session.distribution_id, metrics.distribution_id) AS distribution_id,
baseline.distribution_id,
first_session.meta_attribution_app AS meta_attribution_app,
metrics.last_reported_adjust_campaign AS last_reported_adjust_campaign,
metrics.last_reported_adjust_ad_group AS last_reported_adjust_ad_group,

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

@ -55,5 +55,9 @@
{
"type": "BOOLEAN",
"name": "is_new_profile"
},
{
"type": "STRING",
"name": "distribution_id"
}
]