Newtab
is_default_ui_v1 (UDF)
Determine if the newtab open is attributed to default UI
Is Default UI UDF
This function computes if the newtab opened by the client is attributed to the Default UI.
Input parameters from the newtab ping:
event_category as STRING (category)
event_name as STRING (name)
event_details as ARRAY<STRUCT<key STRING, value STRING>> (extra)
newtab_homepage_category as STRING (metrics.string.newtab_homepage_category)
newtab_newtab_category as STRING (metrics.string.newtab_newtab_category)
Parameters
INPUTS
event_category STRING, event_name STRING, event_details ARRAY<STRUCT<key STRING, value STRING>>, newtab_homepage_category STRING, newtab_newtab_category STRING
OUTPUTS
BOOLEAN
scheduled_surface_id_v1 (UDF)
Content teams reference for the surface where an article is published on Newtab
Scheduled Surface Id UDF
This function takes a country and locale to compute the Content teams identifier for the surface the article is published.
Note: The UDF tries to mimic the backend merino implementation (https://github.com/mozilla-services/merino-py/blob/main/merino/curated_recommendations/provider.py#L66-L103) for the Scheduled_Surface_Id. The UDF is meant to be used temporarily until the backend computed value gets added to the newtab ping
Parameters
INPUTS
country STRING, locale STRING
OUTPUTS
STRING