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

Create telemetry.active_users view #5247

Open
wants to merge 72 commits into
base: main
Choose a base branch
from

Conversation

lucia-vargas-a
Copy link
Contributor

@lucia-vargas-a lucia-vargas-a commented Mar 20, 2024

This PR implements view for all apps to return user active status, mainly dau, wau, mau.
DENG-2975

Checklist for reviewer:

  • Commits should reference a bug or github issue, if relevant (if a bug is referenced, the pull request should include the bug number in the title).
  • If the PR comes from a fork, trigger integration CI tests by running the Push to upstream workflow and provide the <username>:<branch> of the fork as parameter. The parameter will also show up
    in the logs of the manual-trigger-required-for-fork CI task together with more detailed instructions.
  • If adding a new field to a query, ensure that the schema and dependent downstream schemas have been updated.
  • When adding a new derived dataset, ensure that data is not available already (fully or partially) and recommend extending an existing dataset in favor of creating new ones. Data can be available in the bigquery-etl repository, looker-hub or in looker-spoke-default.

For modifications to schemas in restricted namespaces (see CODEOWNERS):

@dataops-ci-bot

This comment has been minimized.

Copy link
Contributor

@bochocki bochocki left a comment

Choose a reason for hiding this comment

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

This looks good! I think there are just a few simple changes required to get this merged.

@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@lucia-vargas-a lucia-vargas-a enabled auto-merge (squash) March 25, 2024 16:46
@dataops-ci-bot

This comment has been minimized.

This reverts commit c2ab9b0.
@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

lucia-vargas-a and others added 10 commits April 17, 2024 02:48
* Create clients_last_seen_v2 checks.

* Formatting.

---------

Co-authored-by: Brad Ochocki Szasz <brad.ochocki@gmail.com>
* DENG-3008 removing misspelled file

* DENG-3008 adding suppressions model

* adding products model

* updating dataset

* adding newsletter model

* adding waitlist model

* removing create statement and adding modified timestamp

* updating name and description for newsletters

* updating description

* adding users model

* adding braze dag

* changing subscribed to boolean

* updating type to date

* updating to full refresh

* updating email id to external id for standardization

* updating format

* updating nullable fields

* updating format

* updating nullable fields

* adding subscription map model

* adding subscriptions model

* adding user profiles model

* updating format

* formatting

* removing last modified date in favor of only timestamp

* updating table name
* fix: GLAM checks to prevent skipping days of data

* format sql

* Skip dryrun
@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@dataops-ci-bot

This comment has been minimized.

@bochocki
Copy link
Contributor

@lucia-vargas-a is most of this logic going to live in the clients_last_seen views, now? Similar to #5406?

@dataops-ci-bot
Copy link

Integration report for "Get columns from Desktop's clients_last_seen_v2 and Mobile's baseline_clients_last_seen views."

sql.diff

Click to expand!
Only in /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry: active_users
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/metadata.yaml /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/metadata.yaml
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/metadata.yaml	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/metadata.yaml	2024-04-25 21:12:50.000000000 +0000
@@ -0,0 +1,27 @@
+friendly_name: Active Users
+description: |-
+  This view contains the boolean values that can be used to monitor client's
+  activity and growth metrics for all browsers.
+
+  Proposal:
+  https://docs.google.com/document/d/1G_pJs62c8mGOxt1eGdzc_-pwG_ShE3hAb-N4Lmp9A8M/edit?usp=sharing
+owners:
+- lvargas@mozilla.com
+- mozilla/kpi_table_reviewers
+labels:
+  owner1: lvargas
+bigquery: null
+workgroup_access:
+- role: roles/bigquery.dataViewer
+  members:
+  - workgroup:dataops-managed/taar
+  - workgroup:mozilla-confidential
+references:
+  view.sql:
+  - moz-fx-data-shared-prod.fenix.baseline_clients_last_seen
+  - moz-fx-data-shared-prod.firefox_ios.baseline_clients_last_seen
+  - moz-fx-data-shared-prod.focus_android.baseline_clients_last_seen
+  - moz-fx-data-shared-prod.focus_ios.baseline_clients_last_seen
+  - moz-fx-data-shared-prod.klar_android.baseline_clients_last_seen
+  - moz-fx-data-shared-prod.klar_ios.baseline_clients_last_seen
+  - moz-fx-data-shared-prod.telemetry_derived.clients_last_seen_v2
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/view.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/view.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/view.sql	1970-01-01 00:00:00.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry/active_users/view.sql	2024-04-25 21:11:13.000000000 +0000
@@ -0,0 +1,134 @@
+CREATE OR REPLACE VIEW
+  `moz-fx-data-shared-prod.telemetry.active_users`
+AS
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  FALSE AS is_mobile
+FROM
+  `moz-fx-data-shared-prod.telemetry_derived.clients_last_seen_v2`
+UNION ALL
+-- Fenix
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  is_mobile
+FROM
+  `moz-fx-data-shared-prod.fenix.baseline_clients_last_seen`
+UNION ALL
+-- Firefox iOS
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  is_mobile
+FROM
+  `moz-fx-data-shared-prod.firefox_ios.baseline_clients_last_seen`
+UNION ALL
+-- Klar Android
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  is_mobile
+FROM
+  `moz-fx-data-shared-prod.klar_android.baseline_clients_last_seen`
+UNION ALL
+-- Klar iOS
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  is_mobile
+FROM
+  `moz-fx-data-shared-prod.klar_ios.baseline_clients_last_seen`
+UNION ALL
+-- Focus Android
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  is_mobile
+FROM
+  `moz-fx-data-shared-prod.focus_android.baseline_clients_last_seen`
+UNION ALL
+-- Focus iOS
+SELECT
+  submission_date,
+  client_id,
+  sample_id,
+  app_name,
+  days_seen_bits,
+  days_active_bits,
+  is_dau,
+  is_wau,
+  is_mau,
+  is_daily_user,
+  is_weekly_user,
+  is_monthly_user,
+  is_desktop,
+  is_mobile
+FROM
+  `moz-fx-data-shared-prod.focus_ios.baseline_clients_last_seen`

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.

None yet