-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DENG - Added clients daily aggregate by default browser lifecycle sta…
…ge table (#6736) * Added clients last seen aggregate tables * Fixed schema description * Fixed profile column * Fixed formatting * Changed to use clients daily * Updated agg table name * Fixed formatting
- Loading branch information
Showing
4 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...-data-shared-prod/telemetry/clients_daily_agg_by_default_browser_lifecycle_stage/view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE OR REPLACE VIEW | ||
`moz-fx-data-shared-prod.telemetry.clients_daily_agg_by_default_browser_lifecycle_stage` | ||
AS | ||
SELECT | ||
* | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry_derived.clients_daily_agg_by_default_browser_lifecycle_stage_v1` |
23 changes: 23 additions & 0 deletions
23
...d/telemetry_derived/clients_daily_agg_by_default_browser_lifecycle_stage_v1/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
friendly_name: Clients Daily Aggregates By Default Browser Lifecycle Stage | ||
description: |- | ||
Aggregate table for clients daily by default browser lifecycle stage | ||
owners: | ||
- [email protected] | ||
labels: | ||
incremental: true | ||
owner1: [email protected] | ||
table_type: aggregate | ||
shredder_mitigation: true | ||
scheduling: | ||
dag_name: bqetl_default_browser_aggregates | ||
bigquery: | ||
time_partitioning: | ||
type: day | ||
field: submission_date | ||
require_partition_filter: true | ||
expiration_days: null | ||
range_partitioning: null | ||
clustering: | ||
fields: | ||
- normalized_os_version | ||
references: {} |
31 changes: 31 additions & 0 deletions
31
...-prod/telemetry_derived/clients_daily_agg_by_default_browser_lifecycle_stage_v1/query.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
SELECT | ||
submission_date, | ||
is_default_browser, | ||
normalized_os_version, | ||
os, | ||
normalized_channel, | ||
country, | ||
CASE | ||
WHEN first_seen_date = submission_date | ||
THEN 'new_profile' | ||
WHEN DATE_DIFF(submission_date, first_seen_date, DAY) | ||
BETWEEN 1 | ||
AND 27 | ||
THEN 'repeat_user' | ||
WHEN DATE_DIFF(submission_date, first_seen_date, DAY) >= 28 | ||
THEN 'existing_user' | ||
ELSE 'Unknown' | ||
END AS lifecycle_stage, | ||
COUNT(*) AS row_count, | ||
FROM | ||
`moz-fx-data-shared-prod.telemetry.clients_daily` | ||
WHERE | ||
submission_date = @submission_date | ||
GROUP BY | ||
submission_date, | ||
is_default_browser, | ||
os, | ||
normalized_os_version, | ||
normalized_channel, | ||
country, | ||
lifecycle_stage |
33 changes: 33 additions & 0 deletions
33
...rod/telemetry_derived/clients_daily_agg_by_default_browser_lifecycle_stage_v1/schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
fields: | ||
- name: submission_date | ||
type: DATE | ||
mode: NULLABLE | ||
description: Submission Date | ||
- name: is_default_browser | ||
type: BOOLEAN | ||
mode: NULLABLE | ||
description: Is Default Browser Indicator | ||
- name: os | ||
type: STRING | ||
mode: NULLABLE | ||
description: Operating System | ||
- name: normalized_os_version | ||
type: STRING | ||
mode: NULLABLE | ||
description: Normalized OS Version | ||
- name: normalized_channel | ||
type: STRING | ||
mode: NULLABLE | ||
description: Normalized Channel | ||
- name: country | ||
type: STRING | ||
mode: NULLABLE | ||
description: country | ||
- name: lifecycle_stage | ||
type: STRING | ||
mode: NULLABLE | ||
description: Indicates the life stage of a client profile | ||
- name: row_count | ||
type: INTEGER | ||
mode: NULLABLE | ||
description: The total number of rows aggregated. |
67fbf88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration report for "DENG - Added clients daily aggregate by default browser lifecycle stage table (#6736)"
sql.diff
Click to expand!
Link to full diff