DENG-4644 Add profile_group_id to clients_daily_event_v1 (#6121)
This commit is contained in:
Родитель
e302e78a61
Коммит
06c89b7d3c
|
@ -11,6 +11,7 @@ SELECT
|
|||
event_category = 'security.ui.protections'
|
||||
AND event_object = 'protection_report'
|
||||
) AS n_viewed_protection_report,
|
||||
mozfun.stats.mode_last(ARRAY_AGG(profile_group_id ORDER BY `timestamp`)) AS profile_group_id,
|
||||
FROM
|
||||
`moz-fx-data-shared-prod.telemetry.events`
|
||||
WHERE
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
fields:
|
||||
- name: submission_date
|
||||
type: DATE
|
||||
mode: NULLABLE
|
||||
- name: sample_id
|
||||
type: INTEGER
|
||||
mode: NULLABLE
|
||||
- name: client_id
|
||||
type: STRING
|
||||
mode: NULLABLE
|
||||
- name: n_logged_event
|
||||
type: INTEGER
|
||||
mode: NULLABLE
|
||||
- name: n_created_pictureinpicture
|
||||
type: INTEGER
|
||||
mode: NULLABLE
|
||||
- name: n_viewed_protection_report
|
||||
type: INTEGER
|
||||
mode: NULLABLE
|
||||
- name: profile_group_id
|
||||
type: STRING
|
||||
mode: NULLABLE
|
|
@ -26,3 +26,6 @@ fields:
|
|||
- name: n_viewed_protection_report
|
||||
type: INTEGER
|
||||
mode: NULLABLE
|
||||
- name: profile_group_id
|
||||
type: STRING
|
||||
mode: NULLABLE
|
||||
|
|
|
@ -3,8 +3,14 @@ SELECT
|
|||
FROM
|
||||
`moz-fx-data-shared-prod.telemetry_derived.clients_last_seen_v1` AS cls_main
|
||||
LEFT JOIN
|
||||
`moz-fx-data-shared-prod.telemetry_derived.clients_last_seen_event_v1` AS cls_event
|
||||
(
|
||||
SELECT
|
||||
* EXCEPT (profile_group_id)
|
||||
FROM
|
||||
`moz-fx-data-shared-prod.telemetry_derived.clients_last_seen_event_v1`
|
||||
WHERE
|
||||
submission_date = @submission_date
|
||||
) AS cls_event
|
||||
USING (submission_date, sample_id, client_id)
|
||||
WHERE
|
||||
cls_main.submission_date = @submission_date
|
||||
AND cls_event.submission_date = @submission_date
|
||||
|
|
Загрузка…
Ссылка в новой задаче