Bug 1673976 - Add glean ios search probes to mobile search tables (#1974)

This commit is contained in:
Ben Wu 2021-05-13 11:47:57 -04:00 коммит произвёл GitHub
Родитель df92ad9201
Коммит e48271f3cf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
27 изменённых файлов: 1840 добавлений и 140 удалений

Просмотреть файл

@ -13,6 +13,7 @@ SKIP = {
*glob.glob("bigquery_etl/glam/templates/*.sql"),
*glob.glob("bigquery_etl/events_daily/query_templates/**/*.sql"),
*glob.glob("bigquery_etl/glean_usage/templates/*.sql"),
*glob.glob("bigquery_etl/search/templates/*.sql"),
"sql/moz-fx-data-shared-prod/telemetry/fenix_events_v1/view.sql",
"sql/moz-fx-data-shared-prod/telemetry/fennec_ios_events_v1/view.sql",
"sql/moz-fx-data-shared-prod/telemetry/fire_tv_events_v1/view.sql",
@ -81,8 +82,6 @@ SKIP = {
"sql/moz-fx-data-shared-prod/telemetry_derived/smoot_usage_desktop_v2/query.sql",
"sql/moz-fx-data-shared-prod/telemetry_derived/smoot_usage_fxa_v2/query.sql",
"sql/moz-fx-data-shared-prod/telemetry_derived/smoot_usage_new_profiles_v2/query.sql", # noqa E501
"sql/moz-fx-data-shared-prod/search_derived/mobile_search_clients_daily_v1/fenix_metrics.template.sql", # noqa E501
"sql/moz-fx-data-shared-prod/search_derived/mobile_search_clients_daily_v1/mobile_search_clients_daily.template.sql", # noqa E501
"sql/moz-fx-data-shared-prod/udf/active_n_weeks_ago.sql",
"sql/moz-fx-data-shared-prod/udf/add_monthly_engine_searches.sql",
"sql/moz-fx-data-shared-prod/udf/add_monthly_searches.sql",

Просмотреть файл

@ -0,0 +1,94 @@
#!/usr/bin/env python3
"""
Generate mobile search clients_daily query.
Creates a combined CTE for metrics and baseline for Android and iOS Glean
apps, then print query to stdout
To update query file:
python -m bigquery_etl.search.mobile_search_clients_daily \
> sql/moz-fx-data-shared-prod/\
search_derived/mobile_search_clients_daily_v1/query.sql
"""
from pathlib import Path
from typing import List
from jinja2 import Environment, FileSystemLoader
from bigquery_etl.format_sql.formatter import reformat
# fmt: off
APP_CHANNEL_TUPLES = [
("org_mozilla_fenix", "Firefox Preview", "beta", "android"), # noqa E241 E501
("org_mozilla_fenix_nightly", "Firefox Preview", "nightly", "android"), # noqa E241 E501
("org_mozilla_fennec_aurora", "Fenix", "nightly", "android"), # noqa E241 E501
("org_mozilla_firefox_beta", "Fenix", "beta", "android"), # noqa E241 E501
("org_mozilla_firefox", "Fenix", "release", "android"), # noqa E241 E501
("org_mozilla_ios_firefox", "Firefox iOS", "release", "ios"), # noqa E241 E501
("org_mozilla_ios_firefoxbeta", "Firefox iOS", "beta", "ios"), # noqa E241 E501
("org_mozilla_ios_fennec", "Firefox iOS", "nightly", "ios"), # noqa E241 E501
]
# fmt: on
def union_statements(statements: List[str]):
"""Join a list of strings together by UNION ALL."""
return "\nUNION ALL\n".join(statements)
def main():
"""Generate mobile search clients daily query and print to stdout."""
base_dir = Path(__file__).parent
env = Environment(loader=FileSystemLoader(base_dir / "templates"))
android_query_template = env.get_template("fenix_metrics.template.sql")
ios_query_template = env.get_template("ios_metrics.template.sql")
queries = [
android_query_template.render(
namespace=app_channel[0], app_name=app_channel[1], channel=app_channel[2]
)
if app_channel[3] == "android"
else ios_query_template.render(
namespace=app_channel[0], app_name=app_channel[1], channel=app_channel[2]
)
for app_channel in APP_CHANNEL_TUPLES
]
search_query_template = env.get_template("mobile_search_clients_daily.template.sql")
fenix_combined_baseline = union_statements(
[
f"SELECT * FROM baseline_{namespace}"
for namespace, _, _, platform in APP_CHANNEL_TUPLES
if platform == "android"
]
)
fenix_combined_metrics = union_statements(
[
f"SELECT * FROM metrics_{namespace}"
for namespace, _, _, platform in APP_CHANNEL_TUPLES
if platform == "android"
]
)
ios_combined_metrics = union_statements(
[
f"SELECT * FROM metrics_{namespace}"
for namespace, _, _, platform in APP_CHANNEL_TUPLES
if platform == "ios"
]
)
search_query = search_query_template.render(
baseline_and_metrics_by_namespace="\n".join(queries),
fenix_baseline=fenix_combined_baseline,
fenix_metrics=fenix_combined_metrics,
ios_metrics=ios_combined_metrics,
)
print(reformat(search_query))
if __name__ == "__main__":
main()

Просмотреть файл

@ -1,35 +1,35 @@
-- baseline for {namespace} ({app_name} {channel})
baseline_{namespace} AS (
-- baseline for {{ app_name }} {{ channel }}
baseline_{{ namespace }} AS (
SELECT
DATE(submission_timestamp) AS submission_date,
client_info.client_id,
client_info.locale
FROM
{namespace}.baseline
{{ namespace }}.baseline
),
-- baseline for {namespace} ({app_name} {channel})
metrics_{namespace} AS (
-- metrics for {{ app_name }} {{ channel }}
metrics_{{ namespace }} AS (
SELECT
DATE(submission_timestamp) AS submission_date,
client_info.client_id,
normalized_country_code AS country,
'{app_name}' AS app_name,
'{{ app_name }}' AS app_name,
'Fenix' AS normalized_app_name,
client_info.app_display_version AS app_version,
'{channel}' AS channel,
'{{ channel }}' AS channel,
normalized_os AS os,
client_info.android_sdk_version AS os_version,
metrics.string.search_default_engine_code AS default_search_engine,
metrics.string.search_default_engine_submission_url AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.metrics_search_count,
metrics.labeled_counter.browser_search_ad_clicks,
metrics.labeled_counter.browser_search_in_content,
metrics.labeled_counter.browser_search_with_ads,
metrics.labeled_counter.metrics_search_count AS search_count,
metrics.labeled_counter.browser_search_ad_clicks AS search_ad_clicks,
metrics.labeled_counter.browser_search_in_content AS search_in_content,
metrics.labeled_counter.browser_search_with_ads AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
metrics.counter.events_total_uri_count AS total_uri_count,
FROM
{namespace}.metrics AS {namespace}_metrics
{{ namespace }}.metrics AS {{ namespace }}_metrics
),

Просмотреть файл

@ -0,0 +1,29 @@
-- metrics for {{ app_name }} {{ channel }}
metrics_{{ namespace }} AS (
SELECT
DATE(submission_timestamp) AS submission_date,
client_info.client_id,
normalized_country_code AS country,
'{{ app_name }}' AS app_name,
'Firefox iOS' AS normalized_app_name,
client_info.app_display_version AS app_version,
'{{ channel }}' AS channel,
normalized_os AS os,
client_info.os_version AS os_version,
metrics.string.search_default_engine AS default_search_engine,
CAST(NULL AS STRING) AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.search_counts AS search_count,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_ad_clicks,
metrics.labeled_counter.search_in_content AS search_in_content,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
NULL AS total_uri_count,
client_info.locale,
FROM
{{ namespace }}.metrics
AS
{{ namespace }}_metrics
),

Просмотреть файл

@ -1,3 +1,5 @@
-- Query generated by bigquery-etl/search/mobile_search_clients_daily.py
--
-- Older versions separate source and engine with an underscore instead of period
-- Return array of form [source, engine] if key is valid, empty array otherwise
CREATE TEMP FUNCTION normalize_fenix_search_key(key STRING) AS (
@ -87,12 +89,15 @@ WITH core_flattened_searches AS (
IF(ARRAY_LENGTH(searches) = 0, null_search(), searches)
) AS searches
),
{baseline_and_metrics_by_namespace}
{{ baseline_and_metrics_by_namespace }}
fenix_baseline AS (
{fenix_baseline}
{{ fenix_baseline }}
),
fenix_metrics AS (
{fenix_metrics}
{{ fenix_metrics }}
),
ios_metrics AS (
{{ ios_metrics }}
),
-- older fenix clients don't send locale in the metrics ping
fenix_client_locales AS (
@ -106,22 +111,46 @@ fenix_client_locales AS (
GROUP BY
client_id
),
fenix_combined_searches AS (
fenix_metrics_with_locale AS (
SELECT
* EXCEPT (
metrics_search_count, browser_search_ad_clicks,
browser_search_in_content, browser_search_with_ads
),
ARRAY_CONCAT(
add_search_type(metrics_search_count, 'sap'),
add_search_type(browser_search_in_content, 'in-content'),
add_search_type(browser_search_ad_clicks, 'ad-click'),
add_search_type(browser_search_with_ads, 'search-with-ads')
) AS searches,
fenix_metrics.*,
locale,
FROM
fenix_metrics
LEFT JOIN
fenix_client_locales
USING
(client_id)
),
fenix_flattened_searches AS (
glean_metrics AS (
SELECT
*
FROM
fenix_metrics_with_locale
UNION ALL
SELECT
*
FROM
ios_metrics
),
glean_combined_searches AS (
SELECT
* EXCEPT (
search_count,
search_ad_clicks,
search_in_content,
search_with_ads
),
ARRAY_CONCAT(
add_search_type(search_count, 'sap'),
add_search_type(search_in_content, 'in-content'),
add_search_type(search_ad_clicks, 'ad-click'),
add_search_type(search_with_ads, 'search-with-ads')
) AS searches,
FROM
glean_metrics
),
glean_flattened_searches AS (
SELECT
*,
@ -181,11 +210,7 @@ fenix_flattened_searches AS (
DAY
) AS profile_age_in_days,
FROM
fenix_combined_searches
LEFT JOIN
fenix_client_locales
USING
(client_id)
glean_combined_searches
CROSS JOIN
UNNEST(
-- Add a null search to pings that have no searches
@ -239,11 +264,12 @@ combined_search_clients AS (
THEN
'tagged-sap'
WHEN
STARTS_WITH(source, 'in-content.sap-follow-on.')
REGEXP_CONTAINS(source, '^in-content.*-follow-on')
THEN
'tagged-follow-on'
WHEN
STARTS_WITH(source, 'in-content.organic')
OR STARTS_WITH(source, 'organic.') -- for ios
THEN
'organic'
WHEN
@ -274,7 +300,13 @@ combined_search_clients AS (
normalize_fenix_experiments(experiments) AS experiments,
total_uri_count,
FROM
fenix_flattened_searches
glean_flattened_searches
WHERE
-- iOS organic counts are incorrect as of 2021-05-04
-- https://github.com/mozilla-mobile/firefox-ios/issues/8412
NOT STARTS_WITH(source, 'organic.')
OR source IS NULL
OR app_name != 'Firefox iOS'
),
unfiltered_search_clients AS (
SELECT
@ -312,7 +344,7 @@ unfiltered_search_clients AS (
udf.mode_last(ARRAY_AGG(country)) AS country,
udf.mode_last(ARRAY_AGG(locale)) AS locale,
udf.mode_last(ARRAY_AGG(app_version)) AS app_version,
udf.mode_last(ARRAY_AGG(channel)) AS channel,
channel,
udf.mode_last(ARRAY_AGG(os)) AS os,
udf.mode_last(ARRAY_AGG(os_version)) AS os_version,
udf.mode_last(ARRAY_AGG(default_search_engine)) AS default_search_engine,
@ -336,7 +368,8 @@ unfiltered_search_clients AS (
source,
search_type,
app_name,
normalized_app_name
normalized_app_name,
channel
)
SELECT
*

Просмотреть файл

@ -1,49 +0,0 @@
#!/usr/bin/env python3
"""
Generate mobile search clients_daily query by creating a combined CTE for
metrics and baseline for all Firefox Android apps, then print query to stdout
"""
import os
APP_CHANNEL_TUPLES = [
("org_mozilla_fenix", "Firefox Preview", "beta"),
("org_mozilla_fenix_nightly", "Firefox Preview", "nightly"),
("org_mozilla_fennec_aurora", "Fenix", "nightly"),
("org_mozilla_firefox_beta", "Fenix", "beta"),
("org_mozilla_firefox", "Fenix", "release"),
]
def main():
base_dir = os.path.dirname(__file__)
with open(os.path.join(base_dir, "fenix_metrics.template.sql")) as f:
metrics_query_template = f.read()
metrics_queries = [
metrics_query_template.format(
namespace=app_channel[0], app_name=app_channel[1], channel=app_channel[2]
) for app_channel in APP_CHANNEL_TUPLES
]
with open(os.path.join(base_dir, "mobile_search_clients_daily.template.sql")) as f:
search_query_template = f.read()
combined_baseline = "\nUNION ALL\n".join(
[f" SELECT * FROM baseline_{namespace}" for namespace, _, _ in APP_CHANNEL_TUPLES]
)
combined_metrics = "\nUNION ALL\n".join(
[f"SELECT * FROM metrics_{namespace}" for namespace, _, _ in APP_CHANNEL_TUPLES]
)
search_query = search_query_template.format(
baseline_and_metrics_by_namespace="\n".join(metrics_queries),
fenix_baseline=combined_baseline,
fenix_metrics=combined_metrics,
)
print(search_query)
if __name__ == "__main__":
main()

Просмотреть файл

@ -1,3 +1,5 @@
-- Query generated by bigquery-etl/search/mobile_search_clients_daily.py
--
-- Older versions separate source and engine with an underscore instead of period
-- Return array of form [source, engine] if key is valid, empty array otherwise
CREATE TEMP FUNCTION normalize_fenix_search_key(key STRING) AS (
@ -67,7 +69,7 @@ WITH core_flattened_searches AS (
IF(ARRAY_LENGTH(searches) = 0, null_search(), searches)
) AS searches
),
-- baseline for org_mozilla_fenix (Firefox Preview beta)
-- baseline for Firefox Preview beta
baseline_org_mozilla_fenix AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -76,7 +78,7 @@ baseline_org_mozilla_fenix AS (
FROM
org_mozilla_fenix.baseline
),
-- baseline for org_mozilla_fenix (Firefox Preview beta)
-- metrics for Firefox Preview beta
metrics_org_mozilla_fenix AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -91,10 +93,10 @@ metrics_org_mozilla_fenix AS (
metrics.string.search_default_engine_code AS default_search_engine,
metrics.string.search_default_engine_submission_url AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.metrics_search_count,
metrics.labeled_counter.browser_search_ad_clicks,
metrics.labeled_counter.browser_search_in_content,
metrics.labeled_counter.browser_search_with_ads,
metrics.labeled_counter.metrics_search_count AS search_count,
metrics.labeled_counter.browser_search_ad_clicks AS search_ad_clicks,
metrics.labeled_counter.browser_search_in_content AS search_in_content,
metrics.labeled_counter.browser_search_with_ads AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
@ -102,7 +104,7 @@ metrics_org_mozilla_fenix AS (
FROM
org_mozilla_fenix.metrics AS org_mozilla_fenix_metrics
),
-- baseline for org_mozilla_fenix_nightly (Firefox Preview nightly)
-- baseline for Firefox Preview nightly
baseline_org_mozilla_fenix_nightly AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -111,7 +113,7 @@ baseline_org_mozilla_fenix_nightly AS (
FROM
org_mozilla_fenix_nightly.baseline
),
-- baseline for org_mozilla_fenix_nightly (Firefox Preview nightly)
-- metrics for Firefox Preview nightly
metrics_org_mozilla_fenix_nightly AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -126,10 +128,10 @@ metrics_org_mozilla_fenix_nightly AS (
metrics.string.search_default_engine_code AS default_search_engine,
metrics.string.search_default_engine_submission_url AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.metrics_search_count,
metrics.labeled_counter.browser_search_ad_clicks,
metrics.labeled_counter.browser_search_in_content,
metrics.labeled_counter.browser_search_with_ads,
metrics.labeled_counter.metrics_search_count AS search_count,
metrics.labeled_counter.browser_search_ad_clicks AS search_ad_clicks,
metrics.labeled_counter.browser_search_in_content AS search_in_content,
metrics.labeled_counter.browser_search_with_ads AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
@ -137,7 +139,7 @@ metrics_org_mozilla_fenix_nightly AS (
FROM
org_mozilla_fenix_nightly.metrics AS org_mozilla_fenix_nightly_metrics
),
-- baseline for org_mozilla_fennec_aurora (Fenix nightly)
-- baseline for Fenix nightly
baseline_org_mozilla_fennec_aurora AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -146,7 +148,7 @@ baseline_org_mozilla_fennec_aurora AS (
FROM
org_mozilla_fennec_aurora.baseline
),
-- baseline for org_mozilla_fennec_aurora (Fenix nightly)
-- metrics for Fenix nightly
metrics_org_mozilla_fennec_aurora AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -161,10 +163,10 @@ metrics_org_mozilla_fennec_aurora AS (
metrics.string.search_default_engine_code AS default_search_engine,
metrics.string.search_default_engine_submission_url AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.metrics_search_count,
metrics.labeled_counter.browser_search_ad_clicks,
metrics.labeled_counter.browser_search_in_content,
metrics.labeled_counter.browser_search_with_ads,
metrics.labeled_counter.metrics_search_count AS search_count,
metrics.labeled_counter.browser_search_ad_clicks AS search_ad_clicks,
metrics.labeled_counter.browser_search_in_content AS search_in_content,
metrics.labeled_counter.browser_search_with_ads AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
@ -172,7 +174,7 @@ metrics_org_mozilla_fennec_aurora AS (
FROM
org_mozilla_fennec_aurora.metrics AS org_mozilla_fennec_aurora_metrics
),
-- baseline for org_mozilla_firefox_beta (Fenix beta)
-- baseline for Fenix beta
baseline_org_mozilla_firefox_beta AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -181,7 +183,7 @@ baseline_org_mozilla_firefox_beta AS (
FROM
org_mozilla_firefox_beta.baseline
),
-- baseline for org_mozilla_firefox_beta (Fenix beta)
-- metrics for Fenix beta
metrics_org_mozilla_firefox_beta AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -196,10 +198,10 @@ metrics_org_mozilla_firefox_beta AS (
metrics.string.search_default_engine_code AS default_search_engine,
metrics.string.search_default_engine_submission_url AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.metrics_search_count,
metrics.labeled_counter.browser_search_ad_clicks,
metrics.labeled_counter.browser_search_in_content,
metrics.labeled_counter.browser_search_with_ads,
metrics.labeled_counter.metrics_search_count AS search_count,
metrics.labeled_counter.browser_search_ad_clicks AS search_ad_clicks,
metrics.labeled_counter.browser_search_in_content AS search_in_content,
metrics.labeled_counter.browser_search_with_ads AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
@ -207,7 +209,7 @@ metrics_org_mozilla_firefox_beta AS (
FROM
org_mozilla_firefox_beta.metrics AS org_mozilla_firefox_beta_metrics
),
-- baseline for org_mozilla_firefox (Fenix release)
-- baseline for Fenix release
baseline_org_mozilla_firefox AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -216,7 +218,7 @@ baseline_org_mozilla_firefox AS (
FROM
org_mozilla_firefox.baseline
),
-- baseline for org_mozilla_firefox (Fenix release)
-- metrics for Fenix release
metrics_org_mozilla_firefox AS (
SELECT
DATE(submission_timestamp) AS submission_date,
@ -231,10 +233,10 @@ metrics_org_mozilla_firefox AS (
metrics.string.search_default_engine_code AS default_search_engine,
metrics.string.search_default_engine_submission_url AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.metrics_search_count,
metrics.labeled_counter.browser_search_ad_clicks,
metrics.labeled_counter.browser_search_in_content,
metrics.labeled_counter.browser_search_with_ads,
metrics.labeled_counter.metrics_search_count AS search_count,
metrics.labeled_counter.browser_search_ad_clicks AS search_ad_clicks,
metrics.labeled_counter.browser_search_in_content AS search_in_content,
metrics.labeled_counter.browser_search_with_ads AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
@ -242,6 +244,87 @@ metrics_org_mozilla_firefox AS (
FROM
org_mozilla_firefox.metrics AS org_mozilla_firefox_metrics
),
-- metrics for Firefox iOS release
metrics_org_mozilla_ios_firefox AS (
SELECT
DATE(submission_timestamp) AS submission_date,
client_info.client_id,
normalized_country_code AS country,
'Firefox iOS' AS app_name,
'Firefox iOS' AS normalized_app_name,
client_info.app_display_version AS app_version,
'release' AS channel,
normalized_os AS os,
client_info.os_version AS os_version,
metrics.string.search_default_engine AS default_search_engine,
CAST(NULL AS STRING) AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.search_counts AS search_count,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_ad_clicks,
metrics.labeled_counter.search_in_content AS search_in_content,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
NULL AS total_uri_count,
client_info.locale,
FROM
org_mozilla_ios_firefox.metrics AS org_mozilla_ios_firefox_metrics
),
-- metrics for Firefox iOS beta
metrics_org_mozilla_ios_firefoxbeta AS (
SELECT
DATE(submission_timestamp) AS submission_date,
client_info.client_id,
normalized_country_code AS country,
'Firefox iOS' AS app_name,
'Firefox iOS' AS normalized_app_name,
client_info.app_display_version AS app_version,
'beta' AS channel,
normalized_os AS os,
client_info.os_version AS os_version,
metrics.string.search_default_engine AS default_search_engine,
CAST(NULL AS STRING) AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.search_counts AS search_count,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_ad_clicks,
metrics.labeled_counter.search_in_content AS search_in_content,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
NULL AS total_uri_count,
client_info.locale,
FROM
org_mozilla_ios_firefoxbeta.metrics AS org_mozilla_ios_firefoxbeta_metrics
),
-- metrics for Firefox iOS nightly
metrics_org_mozilla_ios_fennec AS (
SELECT
DATE(submission_timestamp) AS submission_date,
client_info.client_id,
normalized_country_code AS country,
'Firefox iOS' AS app_name,
'Firefox iOS' AS normalized_app_name,
client_info.app_display_version AS app_version,
'nightly' AS channel,
normalized_os AS os,
client_info.os_version AS os_version,
metrics.string.search_default_engine AS default_search_engine,
CAST(NULL AS STRING) AS default_search_engine_submission_url,
sample_id,
metrics.labeled_counter.search_counts AS search_count,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_ad_clicks,
metrics.labeled_counter.search_in_content AS search_in_content,
ARRAY<STRUCT<key STRING, value INT64>>[] AS search_with_ads,
client_info.first_run_date,
ping_info.end_time,
ping_info.experiments,
NULL AS total_uri_count,
client_info.locale,
FROM
org_mozilla_ios_fennec.metrics AS org_mozilla_ios_fennec_metrics
),
fenix_baseline AS (
SELECT
*
@ -294,6 +377,22 @@ fenix_metrics AS (
FROM
metrics_org_mozilla_firefox
),
ios_metrics AS (
SELECT
*
FROM
metrics_org_mozilla_ios_firefox
UNION ALL
SELECT
*
FROM
metrics_org_mozilla_ios_firefoxbeta
UNION ALL
SELECT
*
FROM
metrics_org_mozilla_ios_fennec
),
-- older fenix clients don't send locale in the metrics ping
fenix_client_locales AS (
SELECT
@ -306,24 +405,41 @@ fenix_client_locales AS (
GROUP BY
client_id
),
fenix_combined_searches AS (
fenix_metrics_with_locale AS (
SELECT
* EXCEPT (
metrics_search_count,
browser_search_ad_clicks,
browser_search_in_content,
browser_search_with_ads
),
ARRAY_CONCAT(
add_search_type(metrics_search_count, 'sap'),
add_search_type(browser_search_in_content, 'in-content'),
add_search_type(browser_search_ad_clicks, 'ad-click'),
add_search_type(browser_search_with_ads, 'search-with-ads')
) AS searches,
fenix_metrics.*,
locale,
FROM
fenix_metrics
LEFT JOIN
fenix_client_locales
USING
(client_id)
),
fenix_flattened_searches AS (
glean_metrics AS (
SELECT
*
FROM
fenix_metrics_with_locale
UNION ALL
SELECT
*
FROM
ios_metrics
),
glean_combined_searches AS (
SELECT
* EXCEPT (search_count, search_ad_clicks, search_in_content, search_with_ads),
ARRAY_CONCAT(
add_search_type(search_count, 'sap'),
add_search_type(search_in_content, 'in-content'),
add_search_type(search_ad_clicks, 'ad-click'),
add_search_type(search_with_ads, 'search-with-ads')
) AS searches,
FROM
glean_metrics
),
glean_flattened_searches AS (
SELECT
*,
CASE
@ -383,11 +499,7 @@ fenix_flattened_searches AS (
DAY
) AS profile_age_in_days,
FROM
fenix_combined_searches
LEFT JOIN
fenix_client_locales
USING
(client_id)
glean_combined_searches
CROSS JOIN
UNNEST(
-- Add a null search to pings that have no searches
@ -436,11 +548,15 @@ combined_search_clients AS (
THEN
'tagged-sap'
WHEN
STARTS_WITH(source, 'in-content.sap-follow-on.')
REGEXP_CONTAINS(source, '^in-content.*-follow-on')
THEN
'tagged-follow-on'
WHEN
STARTS_WITH(source, 'in-content.organic')
OR STARTS_WITH(
source,
'organic.'
) -- for ios
THEN
'organic'
WHEN
@ -471,7 +587,13 @@ combined_search_clients AS (
normalize_fenix_experiments(experiments) AS experiments,
total_uri_count,
FROM
fenix_flattened_searches
glean_flattened_searches
WHERE
-- iOS organic counts are incorrect as of 2021-05-04
-- https://github.com/mozilla-mobile/firefox-ios/issues/8412
NOT STARTS_WITH(source, 'organic.')
OR source IS NULL
OR app_name != 'Firefox iOS'
),
unfiltered_search_clients AS (
SELECT
@ -527,7 +649,7 @@ unfiltered_search_clients AS (
udf.mode_last(ARRAY_AGG(country)) AS country,
udf.mode_last(ARRAY_AGG(locale)) AS locale,
udf.mode_last(ARRAY_AGG(app_version)) AS app_version,
udf.mode_last(ARRAY_AGG(channel)) AS channel,
channel,
udf.mode_last(ARRAY_AGG(os)) AS os,
udf.mode_last(ARRAY_AGG(os_version)) AS os_version,
udf.mode_last(ARRAY_AGG(default_search_engine)) AS default_search_engine,
@ -551,7 +673,8 @@ unfiltered_search_clients AS (
source,
search_type,
app_name,
normalized_app_name
normalized_app_name,
channel
)
SELECT
*

Просмотреть файл

@ -230,3 +230,38 @@
experiments:
- key: test_experiment
value: test_branch
- &ios_base
<<: *base
client_id: release_ios
os: iOS
os_version: "13.0"
app_version: "31.0"
app_name: Firefox iOS
normalized_app_name: Firefox iOS
channel: release
country: US
locale: en-US
profile_creation_date: 18201
profile_age_in_days: 30
- <<: *ios_base
default_search_engine: engine2
engine: engine2
source: actionbar
search_count: 1
- <<: *ios_base
default_search_engine: engine2
engine: engine2
source: suggestion
search_count: 2
- <<: *ios_base
client_id: beta_ios
channel: beta
engine: engine2
source: in-content.sap.code
tagged_sap: 2
- <<: *ios_base
client_id: nightly_ios
channel: nightly
engine: engine2
source: in-content.sap-follow-on.code
tagged_follow_on: 1

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,19 @@
---
- submission_timestamp: 2019-12-01 09:13:09.842719 UTC
ping_info:
end_time: 2019-12-01T04:13-05:00
normalized_channel: nightly
normalized_os: iOS
sample_id: 1
client_info:
app_display_version: "31.0"
client_id: nightly_ios
os_version: "13.0"
locale: en-US
first_run_date: 2019-11-01-05:00
normalized_country_code: US
metrics:
labeled_counter:
search_in_content:
- key: engine2.in-content.sap-follow-on.code
value: "1"

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,36 @@
---
- &base
submission_timestamp: 2019-12-01 09:13:09.842719 UTC
ping_info:
end_time: 2019-12-01T04:13-05:00
normalized_channel: release
normalized_os: iOS
sample_id: 1
client_info:
app_display_version: "31.0"
client_id: release_ios
os_version: "13.0"
locale: en-US
first_run_date: 2019-11-01-05:00
normalized_country_code: US
- <<: *base
metrics:
string:
search_default_engine: engine2
labeled_counter:
search_counts:
- key: engine2.actionbar
value: "1"
- key: engine2.suggestion
value: "2"
search_in_content:
- key: engine2.organic.none
value: "3"
- <<: *base
metrics:
string:
search_default_engine: engine2
labeled_counter:
search_in_content:
- key: engine2.organic.none
value: "4"

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,19 @@
---
- submission_timestamp: 2019-12-01 09:13:09.842719 UTC
ping_info:
end_time: 2019-12-01T04:13-05:00
normalized_channel: beta
normalized_os: iOS
sample_id: 1
client_info:
app_display_version: "31.0"
client_id: beta_ios
os_version: "13.0"
locale: en-US
first_run_date: 2019-11-01-05:00
normalized_country_code: US
metrics:
labeled_counter:
search_in_content:
- key: engine2.in-content.sap.code
value: "2"

Просмотреть файл

@ -33,3 +33,27 @@
app_name: Fenix
normalized_app_name: Fenix
channel: release
- <<: *base
os: iOS
os_version: "13.0"
client_id: b
app_version: "31.0"
app_name: Firefox iOS
normalized_app_name: Firefox iOS
channel: release
- <<: *base
os: iOS
os_version: "13.0"
client_id: b
app_version: "31.0"
app_name: Firefox iOS
normalized_app_name: Firefox iOS
channel: beta
- <<: *base
os: iOS
os_version: "13.0"
client_id: b
app_version: "31.0"
app_name: Firefox iOS
normalized_app_name: Firefox iOS
channel: nightly

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,15 @@
---
- submission_timestamp: 2020-05-01 09:13:09.842719 UTC
normalized_channel: Other
normalized_os: iOS
sample_id: 1
client_info:
app_display_version: "31.0"
client_id: b
os_version: "13.0"
normalized_country_code: US
metrics:
labeled_counter:
search_counts:
- key: engine1.actionbar
value: "10"

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,15 @@
---
- submission_timestamp: 2020-05-01 09:13:09.842719 UTC
normalized_channel: Other
normalized_os: iOS
sample_id: 1
client_info:
app_display_version: "31.0"
client_id: b
os_version: "13.0"
normalized_country_code: US
metrics:
labeled_counter:
search_counts:
- key: engine1.actionbar
value: "10"

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,15 @@
---
- submission_timestamp: 2020-05-01 09:13:09.842719 UTC
normalized_channel: Other
normalized_os: iOS
sample_id: 1
client_info:
app_display_version: "31.0"
client_id: b
os_version: "13.0"
normalized_country_code: US
metrics:
labeled_counter:
search_counts:
- key: engine1.actionbar
value: "10"

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]

Просмотреть файл

@ -0,0 +1,143 @@
[
{
"fields": [
{
"type": "STRING",
"name": "app_display_version"
},
{
"type": "STRING",
"name": "client_id"
},
{
"type": "STRING",
"name": "first_run_date"
},
{
"type": "STRING",
"name": "locale"
},
{
"type": "STRING",
"name": "os_version"
}
],
"type": "RECORD",
"name": "client_info"
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"type": "STRING",
"name": "key"
},
{
"type": "INTEGER",
"name": "value"
}
],
"type": "RECORD",
"name": "search_counts",
"mode": "REPEATED"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "search_in_content",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "labeled_counter"
},
{
"fields": [
{
"type": "STRING",
"name": "search_default_engine"
}
],
"type": "RECORD",
"name": "string"
}
],
"type": "RECORD",
"name": "metrics"
},
{
"type": "STRING",
"name": "normalized_channel"
},
{
"type": "STRING",
"name": "normalized_country_code"
},
{
"type": "STRING",
"name": "normalized_os"
},
{
"fields": [
{
"type": "STRING",
"name": "end_time"
},
{
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"fields": [
{
"name": "branch",
"type": "STRING"
},
{
"fields": [
{
"name": "type",
"type": "STRING"
}
],
"name": "extra",
"type": "RECORD"
}
],
"name": "value",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "experiments",
"type": "RECORD"
}
],
"type": "RECORD",
"name": "ping_info"
},
{
"type": "INTEGER",
"name": "sample_id"
},
{
"type": "TIMESTAMP",
"name": "submission_timestamp"
}
]