adding search_with_ads_organic to mobile_clients_daily table (#5683)

* adding search_with_ads_organic to mobile_clients_daily table

* Fix the CI tests

---------

Co-authored-by: Alekhya Kommasani <akommasani@mozilla.com>
Co-authored-by: Alekhya <88394696+alekhyamoz@users.noreply.github.com>
This commit is contained in:
Preethi Issac 2024-05-30 14:19:17 -04:00 коммит произвёл GitHub
Родитель 11e7ca30a9
Коммит 71bbaa2ac8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 21 добавлений и 0 удалений

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

@ -722,6 +722,12 @@ glean_flattened_searches AS (
SUBSTR(search.key, STRPOS(search.key, '.') + 1),
search.search_type
)
WHEN search.search_type = 'search-with-ads'
THEN IF(
REGEXP_CONTAINS(search.key, '\\.'),
SUBSTR(search.key, STRPOS(search.key, '.') + 1),
search.search_type
)
ELSE search.search_type
END AS source,
search.value AS search_count,
@ -774,6 +780,8 @@ combined_search_clients AS (
CASE
WHEN search_type = 'ad-click'
THEN IF(STARTS_WITH(source, 'in-content.organic'), 'ad-click-organic', search_type)
WHEN search_type = 'search-with-ads'
THEN IF(STARTS_WITH(source, 'in-content.organic'), 'search-with-ads-organic', search_type)
WHEN STARTS_WITH(source, 'in-content.sap.')
THEN 'tagged-sap'
WHEN REGEXP_CONTAINS(source, '^in-content.*-follow-on')
@ -855,6 +863,15 @@ unfiltered_search_clients AS (
search_count
)
) AS search_with_ads,
SUM(
IF(
search_type != 'search-with-ads-organic'
OR engine IS NULL
OR search_count > 10000,
0,
search_count
)
) AS search_with_ads_organic,
SUM(
IF(search_type != 'unknown' OR engine IS NULL OR search_count > 10000, 0, search_count)
) AS unknown,

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

@ -11,6 +11,7 @@
ad_click: 0
ad_click_organic: 0
search_with_ads: 0
search_with_ads_organic: 0
unknown: 0
app_version: 68.2.1
app_name: Fennec

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

@ -9,6 +9,7 @@
ad_click: 0
ad_click_organic: 0
search_with_ads: 0
search_with_ads_organic: 0
unknown: 0
locale: en-US
app_version: "30.0"

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

@ -9,6 +9,7 @@
ad_click: 0
ad_click_organic: 0
search_with_ads: 0
search_with_ads_organic: 0
unknown: 0
country: US
os_version: '29'

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

@ -9,6 +9,7 @@
ad_click: 0
ad_click_organic: 0
search_with_ads: 0
search_with_ads_organic: 0
unknown: 0
locale: fr-FR
app_version: 68.2.1