Цікава й зручна ця нова функція SEARCH, використовуючи її можна швидко шукати щось в nested даних. Ось, наприклад, робота с таблицею events_:
SELECT * from
( select *,
search(event_params, 'link_url') as link_url, #one column
SEARCH((event_params, user_properties), 'user_id') user_id_search, #multiple columns
SEARCH(
from
where _table_suffix >= '20220301'
) where user_id_search = true
SELECT * from
( select *,
search(event_params, 'link_url') as link_url, #one column
SEARCH((event_params, user_properties), 'user_id') user_id_search, #multiple columns
SEARCH(
xxx.events_* , 'link_domain') link_domain #table scanfrom
xxx.events_* where _table_suffix >= '20220301'
) where user_id_search = true
🔥19👍1