Skip to content

Commit 6a7c3bb

Browse files
authored
fix: isp column appears to be out of order between last_seen and daily table for some products. Fix order of the isp column in the last_seen view (#7157)
1 parent b84c2c9 commit 6a7c3bb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sql_generators/glean_usage/templates/baseline_clients_last_seen_v1.query.sql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ SELECT
1111
{% if app_name == "firefox_desktop" %}
1212
CAST(NULL AS INT64) AS days_desktop_active_bits,
1313
{% endif %}
14+
isp,
1415
-- We make sure to delay * until the end so that as new columns are added
1516
-- to the daily table we can add those columns in the same order to the end
1617
-- of this schema, which may be necessary for the daily join query between
1718
-- the two tables to validate.
18-
*
19+
* EXCEPT(isp),
1920
FROM
2021
`{{ daily_table }}`
2122
WHERE
@@ -44,7 +45,8 @@ WITH _current AS (
4445
CAST(browser_engagement_uri_count > 0 AS INT64) &
4546
CAST(browser_engagement_active_ticks > 0 AS INT64) AS days_desktop_active_bits,
4647
{% endif %}
47-
* EXCEPT(submission_date)
48+
isp,
49+
* EXCEPT(submission_date, isp)
4850
FROM
4951
`{{ daily_table }}`
5052
WHERE
@@ -60,14 +62,16 @@ _previous AS (
6062
days_desktop_active_bits,
6163
{% endif %}
6264
days_created_profile_bits,
65+
isp,
6366
* EXCEPT (
6467
submission_date,
6568
days_seen_bits,
6669
days_active_bits,
6770
{% if app_name == "firefox_desktop" %}
6871
days_desktop_active_bits,
6972
{% endif %}
70-
days_created_profile_bits
73+
days_created_profile_bits,
74+
isp
7175
),
7276
FROM
7377
`{{ last_seen_table }}`

0 commit comments

Comments
 (0)