-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathview.sql
25 lines (25 loc) · 1.02 KB
/
view.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- Generated via ./bqetl generate stable_views
CREATE OR REPLACE VIEW
`moz-fx-data-shared-prod.org_mozilla_mozregression.metrics`
AS
SELECT
* REPLACE (
mozfun.norm.metadata(metadata) AS metadata,
mozfun.norm.glean_ping_info(ping_info) AS ping_info,
(
SELECT AS STRUCT
metrics.* EXCEPT (jwe, labeled_rate, text, url) REPLACE(
STRUCT(
mozfun.glean.parse_datetime(
metrics.datetime.glean_validation_first_run_hour
) AS glean_validation_first_run_hour,
metrics.datetime.glean_validation_first_run_hour AS raw_glean_validation_first_run_hour
) AS datetime
)
) AS metrics
),
mozfun.norm.extract_version(client_info.app_display_version, 'major') AS app_version_major,
mozfun.norm.extract_version(client_info.app_display_version, 'minor') AS app_version_minor,
mozfun.norm.extract_version(client_info.app_display_version, 'patch') AS app_version_patch
FROM
`moz-fx-data-shared-prod.org_mozilla_mozregression_stable.metrics_v1`