Skip to content

Commit 15d4c2b

Browse files
chore: update documentation for glean cohort daily, weekly stats, dai… (#8227)
* chore: update documentation for glean cohort daily, weekly stats, daily churn * add README files as well as add details to the metadata.yaml files
1 parent 3f29b9d commit 15d4c2b

File tree

14 files changed

+131
-2
lines changed

14 files changed

+131
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# cohort_daily_churn_v1
2+
3+
## Description
4+
5+
A daily, Glean‑based cohort churn table that references **all clients first seen in the last 180 days** and includes their attributes for analysis. For each cohort_date (first_seen_date), the model tracks post‑acquisition return behavior and exposes counts needed for churn/retention analyses.
6+
7+
**Churn definition (per table fields):**
8+
9+
* Captures the number of **clients_returned** on **day 1** (the day after first seen), and **between day 1 and day 2, day 1 and day 3, day 1 and day 4, day 1 and day 5, day 1 and day 6, day 1 and day 7, and day 1 and day 28** after the cohort_date. These intervals enable standard short‑term retention/churn calculations off of day‑1 anchoring.
10+
11+
**Filters / scope:**
12+
13+
* Excludes **Firefox Desktop BrowserStack** and **Firefox Desktop MozillaOnline** distributions from all counts.
14+
15+
This model is part of the Glean `glean_telemetry_derived` churn/retention suite

sql/moz-fx-data-shared-prod/glean_telemetry_derived/cohort_daily_churn_v1/metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
friendly_name: Cohort Daily Churn
22
description: |-
33
Calculates churn for new users over time, for users first seen in last 180 days
4+
5+
Related Documentation:
6+
- Parent Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9509
7+
- Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9511
8+
- Data Model README: ./README.md
49
owners:
510
611
labels:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# cohort_daily_statistics_v1
2+
3+
## Description
4+
5+
A daily Glean‑based cohort statistics table. For each `cohort_date` (the day a client is first seen) and `activity_date` (the submission date), this model summarizes cohort size and activity over the first 180 days of a cohort.
6+
7+
* **`cohort_date`** = client first_seen_date.
8+
* **`activity_date`** = submission_date (the day being measured).
9+
* Includes rows only where `activity_date` is within **180 days** (inclusive) of `cohort_date`.
10+
11+
Provided counts per `(cohort_date, activity_date, and other attributes)` include:
12+
13+
* **Count of clients in the cohort** (cohort size).
14+
* **Count of clients active on that day** (within that cohort).
15+
16+
**Filters / scope:**
17+
18+
* This table is sourced from rolling cohorts logic that **excludes Firefox Desktop BrowserStack** and **Firefox Desktop MozillaOnline**; the same exclusions apply here.

sql/moz-fx-data-shared-prod/glean_telemetry_derived/cohort_daily_statistics_v1/metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ description: |-
66
Note that the values for client attributes are based on the
77
attributes at the time the cohort started (rather than the
88
values at activity time)
9+
10+
Related Documentation:
11+
- Parent Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9509
12+
- Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9516
13+
- Data Model README: ./README.md
914
owners:
1015
1116
labels:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# cohort_weekly_active_clients_staging
2+
3+
## Description
4+
5+
A staging table of Glean active users used to build weekly cohort metrics. It pulls from the view `glean_telemetry_derived.active_users`, which contains data for **both Desktop and Mobile**, and applies a single inclusion filter where `is_dau` is **TRUE**. This staging layer exists to reduce processing volume for downstream weekly aggregation.
6+
7+
* **Upstream:** `glean_telemetry_derived.active_users`
8+
* **Filter:** `is_dau = TRUE` (no other filters)
9+
* **Scope:** Desktop and Mobile
10+
* **Downstream:** `cohort_weekly_statistics_v1` consumes this table to compute weekly cohort activity
11+
* **Typical fields:** `client_id`, `submission_date` (daily activity); weekly bucketing is performed in downstream logic.

sql/moz-fx-data-shared-prod/glean_telemetry_derived/cohort_weekly_active_clients_staging_v1/metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ friendly_name: Cohort Weekly Active Clients Staging
22
description: |-
33
This is an intermediate physicalized table
44
used in the build of cohort_weekly_statistics_v1
5+
6+
Related Documentation:
7+
- Parent Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9509
8+
- Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9528
9+
- Data Model README: ./README.md
510
owners:
611
712
labels:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# glean_telemetry_derived.cohort_weekly_active_clients_v1
2+
3+
## Description
4+
5+
A weekly Glean-based table of clients who were active during each week, used to power downstream weekly cohort metrics. It is built from `glean_telemetry_derived.active_users` via the staging layer `cohort_weekly_active_clients_staging`, applying the inclusion filter `is_dau = TRUE`. This table goes back to start of week for date 768 days ago
6+
and to the last completed week
7+
8+
* **Grain:** `client_id × activity_week` (week start = Sunday, aligned with weekly statistics).
9+
* **Scope:** Desktop and Mobile (from the upstream active_users view).
10+
* **Upstream:** `cohort_weekly_active_clients_staging` → sourced from `glean_telemetry_derived.active_users`.
11+
* **Downstream:** `cohort_weekly_statistics_v1` consumes this table to compute weekly cohort activity.
12+
* **Typical fields:** `client_id`, `activity_week` (DATE, week start Sunday), plus selected app/device attribute

sql/moz-fx-data-shared-prod/glean_telemetry_derived/cohort_weekly_active_clients_v1/metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ friendly_name: Cohort Weekly Active Clients - Glean
22
description: |-
33
This is an intermediate physicalized table
44
used in the build of cohort_weekly_statistics_v1
5+
6+
Related Documentation:
7+
- Parent Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9509
8+
- Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9515
9+
- Data Model README: ./README.md
510
owners:
611
712
labels:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# glean_telemetry_derived.cohort_weekly_active_clients_staging_v1
2+
3+
## Description
4+
5+
A staging table of Glean active users used to build weekly cohort metrics. It pulls from the view `glean_telemetry_derived.active_users`, which contains data for **both Desktop and Mobile**, and applies a single inclusion filter where `is_dau` is **TRUE**. This staging layer exists to reduce processing volume for downstream weekly aggregation.
6+
7+
* **Upstream:** `glean_telemetry_derived.active_users`
8+
* **Filter:** `is_dau = TRUE` (no other filters)
9+
* **Scope:** Desktop and Mobile
10+
* **Downstream:** `cohort_weekly_statistics_v1` consumes this table to compute weekly cohort activity
11+
* **Typical fields:** `client_id`, `submission_date` (daily activity); weekly bucketing is performed in downstream logic.

sql/moz-fx-data-shared-prod/glean_telemetry_derived/cohort_weekly_cfs_staging_v1/metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ friendly_name: Cohort Weekly Clients First Seen Staging - Glean
22
description: |-
33
This is an intermediate physicalized table
44
used in the build of cohort_weekly_statistics_v1
5+
6+
Related Documentation:
7+
- Parent Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9509
8+
- Jira ticket: https://mozilla-hub.atlassian.net/browse/DENG-9514
9+
- Data Model README: ./README.md
510
owners:
611
712
labels:

0 commit comments

Comments
 (0)