Skip to content

Commit

Permalink
add views for desktop_new_profiles clients and aggregates (#6258)
Browse files Browse the repository at this point in the history
* add views for desktop_new_profiles clients and aggregates

* move fiels from desktop_new_profiles_aggregates to desktop_new_profiles

* fix name of view by adding clients to it

* Update sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/view.sql

Co-authored-by: Chelsey Beck <[email protected]>

---------

Co-authored-by: Chelsey Beck <[email protected]>
  • Loading branch information
Marlene-M-Hirose and chelseybeck authored Sep 25, 2024
1 parent f826580 commit 9632554
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE OR REPLACE VIEW
`moz-fx-data-shared-prod.telemetry.desktop_new_profiles`
AS
SELECT
*
FROM
`moz-fx-data-shared-prod.telemetry_derived.desktop_new_profiles_aggregates_v1`
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CREATE OR REPLACE VIEW
`moz-fx-data-shared-prod.telemetry.desktop_new_profiles_clients`
AS
SELECT
a.*,
`moz-fx-data-shared-prod`.udf.funnel_derived_clients(
normalized_os,
first_seen_date,
app_build_id,
attribution_source,
attribution_ua,
startup_profile_selection_reason,
distribution_id
) AS funnel_derived,
`moz-fx-data-shared-prod`.udf.distribution_model_clients(distribution_id) AS distribution_model,
`moz-fx-data-shared-prod`.udf.partner_org_clients(distribution_id) AS partner_org,
IF(
LOWER(IFNULL(isp_name, '')) <> "browserstack"
AND LOWER(IFNULL(distribution_id, '')) <> "mozillaonline",
TRUE,
FALSE
) AS is_desktop
FROM
`moz-fx-data-shared-prod.telemetry_derived.clients_first_seen_v3` AS a

1 comment on commit 9632554

@dataops-ci-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration report for "add views for desktop_new_profiles clients and aggregates (#6258)"

sql.diff

Click to expand!
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry: desktop_new_profiles
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry: desktop_new_profiles_clients
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/metadata.yaml	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/metadata.yaml	2024-09-25 02:37:02.000000000 +0000
@@ -0,0 +1,14 @@
+friendly_name: Desktop New Profiles
+description: |-
+  Please provide a description for the query
+owners: []
+labels: {}
+bigquery: null
+workgroup_access:
+- role: roles/bigquery.dataViewer
+  members:
+  - workgroup:dataops-managed/taar
+  - workgroup:mozilla-confidential
+references:
+  view.sql:
+  - moz-fx-data-shared-prod.telemetry_derived.desktop_new_profiles_aggregates_v1
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/view.sql	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles/view.sql	2024-09-25 02:34:31.000000000 +0000
@@ -0,0 +1,7 @@
+CREATE OR REPLACE VIEW
+  `moz-fx-data-shared-prod.telemetry.desktop_new_profiles`
+AS
+SELECT
+  *
+FROM
+  `moz-fx-data-shared-prod.telemetry_derived.desktop_new_profiles_aggregates_v1`
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/metadata.yaml	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/metadata.yaml	2024-09-25 02:37:02.000000000 +0000
@@ -0,0 +1,14 @@
+friendly_name: Desktop New Profiles Clients
+description: |-
+  Please provide a description for the query
+owners: []
+labels: {}
+bigquery: null
+workgroup_access:
+- role: roles/bigquery.dataViewer
+  members:
+  - workgroup:dataops-managed/taar
+  - workgroup:mozilla-confidential
+references:
+  view.sql:
+  - moz-fx-data-shared-prod.telemetry_derived.clients_first_seen_v3
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/view.sql	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/desktop_new_profiles_clients/view.sql	2024-09-25 02:34:31.000000000 +0000
@@ -0,0 +1,24 @@
+CREATE OR REPLACE VIEW
+  `moz-fx-data-shared-prod.telemetry.desktop_new_profiles_clients`
+AS
+SELECT
+  a.*,
+  `moz-fx-data-shared-prod`.udf.funnel_derived_clients(
+    normalized_os,
+    first_seen_date,
+    app_build_id,
+    attribution_source,
+    attribution_ua,
+    startup_profile_selection_reason,
+    distribution_id
+  ) AS funnel_derived,
+  `moz-fx-data-shared-prod`.udf.distribution_model_clients(distribution_id) AS distribution_model,
+  `moz-fx-data-shared-prod`.udf.partner_org_clients(distribution_id) AS partner_org,
+  IF(
+    LOWER(IFNULL(isp_name, '')) <> "browserstack"
+    AND LOWER(IFNULL(distribution_id, '')) <> "mozillaonline",
+    TRUE,
+    FALSE
+  ) AS is_desktop
+FROM
+  `moz-fx-data-shared-prod.telemetry_derived.clients_first_seen_v3` AS a

Link to full diff

Please sign in to comment.