BigQuery Create Function
A user-defined function (UDF) lets you create a function by using a SQL expression or JavaScript code. A UDF accepts columns of input, performs actions on the input, and returns the result of those actions as a value.\n\nYou can define a UDFs as either persistent or temporary. You can reuse persistent UDFs across multiple queries, while temporary UDFs only exist in the scope of a single query.
Create Function example
\n CREATE FUNCTION mydataset.multiplyInputs(x FLOAT64, y FLOAT64)\nRETURNS FLOAT64\nAS (x * y);\n\n\n
Example 2
\n\n CREATE FUNCTION mydataset.AddFourAndDivide(x INT64, y INT64)\n RETURNS FLOAT64\n AS ((x + 4) / y);\n
Syntax reference
CREATE [OR REPLACE] [TEMPORARY | TEMP] FUNCTION [IF NOT EXISTS]\n [[project_name.]dataset_name.]function_name\n ([named_parameter[, ...]])\n [RETURNS data_type]\n AS (sql_expression)\n\nnamed_parameter:\n param_name param_type