Skip to content

Commit

Permalink
DENG-476 - Update monitoring ETLs to reference main_v5 (#4431)
Browse files Browse the repository at this point in the history
  • Loading branch information
relud authored and kik-kik committed Nov 14, 2023
1 parent 659dd58 commit 42ab510
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ scheduling:
dag_name: bqetl_monitoring
arguments: ["--date", "{{ ds }}"]
referenced_tables:
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v4']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v5']
bigquery:
time_partitioning:
type: day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ WITH shredder AS (
SELECT
task_id,
CASE
WHEN target = "moz-fx-data-shared-prod.telemetry_stable.main_v4"
THEN "telemetry_main"
WHEN target = "moz-fx-data-shared-prod.telemetry_derived.main_summary_v4"
THEN "telemetry_main_summary"
WHEN target = "moz-fx-data-shared-prod.telemetry_stable.main_v5"
THEN "telemetry_main_v5"
WHEN target = "moz-fx-data-shared-prod.telemetry_stable.main_use_counter_v4"
THEN "telemetry_main_use_counter"
ELSE "all"
END AS airflow_task_id,
target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ scheduling:
arguments: ["--date", "{{ macros.ds_add(ds, -1) }}"]
referenced_tables:
- ['moz-fx-data-shared-prod', '*_stable', '*']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v4']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v5']
- ['moz-fx-data-shared-prod', '*_derived', '*']
bigquery:
time_partitioning:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ scheduling:
dag_name: bqetl_monitoring
referenced_tables:
- ['moz-fx-data-shared-prod', '*_stable', '*']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v4']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v5']
date_partition_parameter: null
parameters: ["submission_date:DATE:{{ds}}"]
bigquery:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ scheduling:
'monitoring',
'payload_bytes_decoded_stub_installer']
- ['moz-fx-data-shared-prod', '*_stable', '*']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v4']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v5']
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
DATE(submission_timestamp) = date "{date}"
-- https://cloud.google.com/bigquery/docs/querying-wildcard-tables#filtering_selected_tables_using_table_suffix
-- IT's also possible to exclude tables in this query e.g
-- AND _TABLE_SUFFIX NOT IN ('main_v4', 'saved_session_v4', 'first_shutdown_v4')
-- AND _TABLE_SUFFIX NOT IN ('main_v5', 'saved_session_v5', 'first_shutdown_v5')
),
transformed AS (
SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ scheduling:
'monitoring',
'payload_bytes_decoded_telemetry']
- ['moz-fx-data-shared-prod', 'telemetry_stable', '*']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v4']
- ['moz-fx-data-shared-prod', 'telemetry_stable', 'main_v5']
- ['moz-fx-data-shared-prod', 'telemetry_live', '*']
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ extracted AS (
)
-- https://cloud.google.com/bigquery/docs/querying-wildcard-tables#filtering_selected_tables_using_table_suffix
-- exclude pings derived from main schema to save on space, 300GB vs 3TB
AND _TABLE_SUFFIX NOT IN ('main_v4', 'saved_session_v4', 'first_shutdown_v4')
AND _TABLE_SUFFIX NOT IN (
'main_v4',
'saved_session_v4',
'first_shutdown_v4',
'main_v5',
'saved_session_v5',
'first_shutdown_v5'
)
AND _TABLE_SUFFIX NOT IN (SELECT * FROM placeholder_table_names)
),
transformed AS (
Expand Down

0 comments on commit 42ab510

Please sign in to comment.