File tree Expand file tree Collapse file tree
sql/moz-fx-data-shared-prod/udf/remove_label_from_metric_path Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CREATE OR REPLACE FUNCTION udf .remove_label_from_metric_path(column_path STRING)
22RETURNS STRING AS (
33 IF(
4- STARTS_WITH(column_path, ' metrics.labeled_' ),
4+ STARTS_WITH(column_path, ' metrics.labeled_' )
5+ OR STARTS_WITH(column_path, ' metrics.dual_labeled_' ),
56 -- labeled metric path looks like metrics.labeled_counter.metric_name.label
7+ -- dual-labeled metric path looks like metrics.dual_labeled_counter.metric_name.key_label.value_label
68 (
79 SELECT
810 ARRAY_TO_STRING(ARRAY_AGG(s ORDER BY offset), ' .' )
@@ -28,6 +30,12 @@ SELECT
2830 " metrics.labeled_boolean.tb_ui_configuration_pane_visibility.folder_pane"
2931 )
3032 ),
33+ mozfun .assert .equals(
34+ " metrics.dual_labeled_counter.tls_handshake_result" ,
35+ udf .remove_label_from_metric_path (
36+ " metrics.dual_labeled_counter.tls_handshake_result.all.pr_end_of_file_error"
37+ )
38+ ),
3139 mozfun .assert .equals(
3240 " metrics.custom_distribution.update_pref_service_errors_notify.values" ,
3341 udf .remove_label_from_metric_path (
You can’t perform that action at this time.
0 commit comments