SELECT `justfunctions.eu.normalize_text`("🎉 Welcome to Athens in 2023! Καλώς ήρθες!")
/*--Output--
welcome to athens in 2023
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.normalize_text`(`string` string)
RETURNS string AS (TRIM(
your_project_id.your_dataset_id.remove_extra_whitespaces(
your_project_id.your_dataset_id.transliterate_anyascii(
your_project_id.your_dataset_id.clean_special_symbols(
LOWER(
string
)
)
)
)
))
OPTIONS ( description = '''Normalizes a given <string> by converting it to lowercase, applying transliteration, and removing special symbols.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.