File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
sql/moz-fx-data-shared-prod/amo_glean_derived/firefox_desktop_addons_by_client_v1 Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ WITH base AS (
33 submission_timestamp,
44 client_info .client_id ,
55 sample_id,
6+ IFNULL(metrics .uuid .legacy_telemetry_client_id, " " ) AS legacy_telemetry_client_id,
67 normalized_channel,
78 normalized_country_code,
89 client_info .locale ,
@@ -21,6 +22,7 @@ per_clients_without_addons AS (
2122 DATE (submission_timestamp) AS submission_date,
2223 client_id,
2324 sample_id,
25+ legacy_telemetry_client_id,
2426 ARRAY_AGG(
2527 app_display_version
2628 ORDER BY
@@ -41,6 +43,7 @@ per_clients_just_addons AS (
4143 DATE (submission_timestamp) AS submission_date,
4244 client_id,
4345 sample_id,
46+ legacy_telemetry_client_id,
4447 ARRAY_CONCAT_AGG(
4548 ARRAY(
4649 SELECT AS STRUCT
@@ -60,6 +63,7 @@ per_client AS (
6063 submission_date,
6164 client_id,
6265 sample_id,
66+ legacy_telemetry_client_id,
6367 addons,
6468 app_version,
6569 country,
@@ -69,10 +73,10 @@ per_client AS (
6973 per_clients_without_addons
7074 INNER JOIN
7175 per_clients_just_addons
72- USING (submission_date, client_id, sample_id)
76+ USING (submission_date, client_id, sample_id, legacy_telemetry_client_id )
7377)
7478SELECT
75- * EXCEPT (addons),
79+ * EXCEPT (addons) REPLACE(NULLIF(legacy_telemetry_client_id, " " ) AS legacy_telemetry_client_id) ,
7680 ARRAY(
7781 SELECT AS STRUCT
7882 addon .id ,
Original file line number Diff line number Diff line change 88- name : sample_id
99 type : INTEGER
1010 mode : NULLABLE
11+ - name : legacy_telemetry_client_id
12+ type : STRING
13+ mode : NULLABLE
1114- name : app_version
1215 type : STRING
1316 mode : NULLABLE
You can’t perform that action at this time.
0 commit comments