From bb2e48fa3b59ce719c24ef933271a3117f238258 Mon Sep 17 00:00:00 2001 From: Linh Nguyen Date: Tue, 18 Jul 2023 14:37:27 -0400 Subject: [PATCH] Remove buildhub2 filter in GLAM templates (#4088) --- .../clients_daily_histogram_aggregates.py | 6 ----- .../glam/clients_daily_scalar_aggregates.py | 6 ----- .../clients_daily_histogram_aggregates_v1.sql | 22 +------------------ .../clients_daily_scalar_aggregates_v1.sql | 22 +------------------ 4 files changed, 2 insertions(+), 54 deletions(-) diff --git a/bigquery_etl/glam/clients_daily_histogram_aggregates.py b/bigquery_etl/glam/clients_daily_histogram_aggregates.py index 2306e885e3..9702ce6e26 100644 --- a/bigquery_etl/glam/clients_daily_histogram_aggregates.py +++ b/bigquery_etl/glam/clients_daily_histogram_aggregates.py @@ -111,11 +111,6 @@ def main(): + (" --no-parameterize" if args.no_parameterize else "") ) - # This enables build_id filtering against Buildhub data - # and filtering out of an erroneous version "1024" (see query template for details). - # Only the desktop builds are reported to Buildhub - filter_desktop_builds = True if args.product == "firefox_desktop" else False - schema = get_schema(args.source_table) distributions = get_distribution_metrics(schema) metrics_sql = get_metrics_sql(distributions).strip() @@ -126,7 +121,6 @@ def main(): print( render_main( header=header, - filter_desktop_builds=filter_desktop_builds, source_table=args.source_table, submission_date=submission_date, attributes=ATTRIBUTES, diff --git a/bigquery_etl/glam/clients_daily_scalar_aggregates.py b/bigquery_etl/glam/clients_daily_scalar_aggregates.py index e6f73cda38..a5434d498e 100755 --- a/bigquery_etl/glam/clients_daily_scalar_aggregates.py +++ b/bigquery_etl/glam/clients_daily_scalar_aggregates.py @@ -146,11 +146,6 @@ def main(): + (" --no-parameterize" if args.no_parameterize else "") ) - # This enables build_id filtering against Buildhub data - # and filtering out of an erroneous version "1024" (see query template for details). - # Only the desktop builds are reported to Buildhub - filter_desktop_builds = True if args.product == "firefox_desktop" else False - schema = get_schema(args.source_table) unlabeled_metric_names = get_scalar_metrics(schema, "unlabeled") labeled_metric_names = get_scalar_metrics(schema, "labeled") @@ -164,7 +159,6 @@ def main(): print( render_main( header=header, - filter_desktop_builds=filter_desktop_builds, source_table=args.source_table, submission_date=submission_date, attributes=ATTRIBUTES, diff --git a/bigquery_etl/glam/templates/clients_daily_histogram_aggregates_v1.sql b/bigquery_etl/glam/templates/clients_daily_histogram_aggregates_v1.sql index 16dadbbb2a..322e0d3e3e 100644 --- a/bigquery_etl/glam/templates/clients_daily_histogram_aggregates_v1.sql +++ b/bigquery_etl/glam/templates/clients_daily_histogram_aggregates_v1.sql @@ -1,14 +1,5 @@ {{ header }} -WITH -{% if filter_desktop_builds %} -valid_builds AS ( - SELECT DISTINCT - build.build.id AS build_id - FROM - `moz-fx-data-shared-prod.telemetry.buildhub2` -), -{% endif %} -extracted AS ( +WITH extracted AS ( SELECT *, DATE(submission_timestamp) AS submission_date, @@ -23,20 +14,9 @@ extracted AS ( client_info.app_channel AS channel FROM `moz-fx-data-shared-prod.{{ source_table }}` - {% if filter_desktop_builds %} - INNER JOIN - valid_builds - ON - client_info.app_build = build_id - {% endif %} WHERE DATE(submission_timestamp) = {{ submission_date }} AND client_info.client_id IS NOT NULL - {% if filter_desktop_builds %} - -- some FOG clients on Windows are sending version "1024.0.0" - -- see https://bugzilla.mozilla.org/show_bug.cgi?id=1768187 - AND client_info.app_display_version != '1024.0.0' - {% endif %} ), histograms AS ( SELECT diff --git a/bigquery_etl/glam/templates/clients_daily_scalar_aggregates_v1.sql b/bigquery_etl/glam/templates/clients_daily_scalar_aggregates_v1.sql index 8a4f2943c1..304b9f0096 100644 --- a/bigquery_etl/glam/templates/clients_daily_scalar_aggregates_v1.sql +++ b/bigquery_etl/glam/templates/clients_daily_scalar_aggregates_v1.sql @@ -1,14 +1,5 @@ {{ header }} -WITH -{% if filter_desktop_builds %} -valid_builds AS ( - SELECT DISTINCT - build.build.id AS build_id - FROM - `moz-fx-data-shared-prod.telemetry.buildhub2` -), -{% endif %} -extracted AS ( +WITH extracted AS ( SELECT *, DATE(submission_timestamp) AS submission_date, @@ -23,20 +14,9 @@ extracted AS ( client_info.app_channel AS channel FROM `moz-fx-data-shared-prod.{{ source_table }}` - {% if filter_desktop_builds %} - INNER JOIN - valid_builds - ON - client_info.app_build = build_id - {% endif %} WHERE DATE(submission_timestamp) = {{ submission_date }} AND client_info.client_id IS NOT NULL - {% if filter_desktop_builds %} - -- some FOG clients on Windows are sending version "1024.0.0" - -- see https://bugzilla.mozilla.org/show_bug.cgi?id=1768187 - AND client_info.app_display_version != '1024.0.0' - {% endif %} ), unlabeled_metrics AS ( SELECT