Having trouble creating a basic UDF in Snowflake, this is what I have right now that is not working.
CREATE OR REPLACE FUNCTION addone(i int)
RETURNS INT
LANGUAGE SQL
AS
$$
i + 1;
$$;
Snowflake console is just giving me a compilation error. The function I’m expecting to feed it a number and return another number. I have also tried to make a function that returns a string but I also get a compilation error for that.
CREATE OR REPLACE FUNCTION test_function()
RETURNS STRING
LANGUAGE SQL
AS
$$
'Hello, World!';
$$;
New contributor
acf1001 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.