Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DENG-4848 add profile group id to clients_scalar_aggregates_v1 #6261

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kwindau
Copy link
Contributor

@kwindau kwindau commented Sep 25, 2024

Description

This PR adds the column "profile_group_id" to moz-fx-data-shared-prod.telemetry_derived.clients_scalar_aggregates_v1 This will add the column in the middle of the table so I will manually redeploy the table and transfer the old data in.

Related Tickets & Documents

Reviewer, please follow this checklist

┆Issue is synchronized with this Jira Task

@dataops-ci-bot
Copy link

Integration report for "DENG-4848 add profile group id to clients_scalar_aggregates_v1"

sql.diff

Click to expand!
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/query.sql	2024-09-25 15:32:09.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/query.sql	2024-09-25 15:31:59.000000000 +0000
@@ -11,6 +11,7 @@
   SELECT
     submission_date,
     client_id,
+    profile_group_id,
     os,
     app_version,
     app_build_id,
@@ -32,6 +33,7 @@
   SELECT
     submission_date,
     scalar_aggs.client_id,
+    scalar_aggs.profile_group_id,
     scalar_aggs.os,
     scalar_aggs.app_version,
     scalar_aggs.app_build_id,
@@ -53,6 +55,7 @@
 scalar_aggregates_new AS (
   SELECT
     client_id,
+    profile_group_id,
     os,
     app_version,
     app_build_id,
@@ -76,6 +79,7 @@
     version_filtered_new
   GROUP BY
     client_id,
+    profile_group_id,
     os,
     app_version,
     app_build_id,
@@ -89,6 +93,7 @@
 filtered_new AS (
   SELECT
     client_id,
+    profile_group_id,
     os,
     app_version,
     app_build_id,
@@ -98,6 +103,7 @@
     scalar_aggregates_new
   GROUP BY
     client_id,
+    profile_group_id,
     os,
     app_version,
     app_build_id,
@@ -106,6 +112,7 @@
 filtered_old AS (
   SELECT
     scalar_aggs.client_id,
+    scalar_aggs.profile_group_id,
     scalar_aggs.os,
     scalar_aggs.app_version,
     scalar_aggs.app_build_id,
@@ -123,6 +130,7 @@
 joined_new_old AS (
   SELECT
     COALESCE(old_data.client_id, new_data.client_id) AS client_id,
+    COALESCE(old_data.profile_group_id, new_data.profile_group_id) AS profile_group_id,
     COALESCE(old_data.os, new_data.os) AS os,
     COALESCE(old_data.app_version, new_data.app_version) AS app_version,
     COALESCE(old_data.app_build_id, new_data.app_build_id) AS app_build_id,
@@ -133,11 +141,12 @@
     filtered_new AS new_data
   FULL OUTER JOIN
     filtered_old AS old_data
-    USING (client_id, os, app_version, app_build_id, channel)
+    USING (client_id, profile_group_id, os, app_version, app_build_id, channel)
 )
 SELECT
   @submission_date AS submission_date,
   client_id,
+  profile_group_id,
   os,
   app_version,
   app_build_id,
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/schema.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/schema.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/schema.yaml	2024-09-25 15:32:09.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/clients_scalar_aggregates_v1/schema.yaml	2024-09-25 15:31:59.000000000 +0000
@@ -5,6 +5,9 @@
 - name: client_id
   type: STRING
   mode: NULLABLE
+- name: profile_group_id
+  type: STRING
+  mode: NULLABLE
 - name: os
   type: STRING
   mode: NULLABLE

Link to full diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants