SELECT `justfunctions.eu.extract_email_domain`("[email protected]")
/*--Output--
justdataplease.com
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.extract_email_domain`(`url` STRING)
RETURNS STRING AS (NET.REG_DOMAIN(url))
OPTIONS ( description = '''Extracts the domain from an <email>.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.