SELECT `justfunctions.eu.surrogate_key`("python")
/*--Output--
2065202487608477923
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.surrogate_key`(`string` STRING)
RETURNS INT64 AS (CAST(FARM_FINGERPRINT(string) AS INT64))
OPTIONS ( description = '''Creates a hashed value of multiple field <string>. Use CONCAT to create <string> to include multiple fields.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.