When I run select myadd(2,2);
in the Worksheet tab of the Snowflake Web console, I get an error "SQL compilation error: Unknown function MYADD" but the UDF works in Snowpark.
Why cannot I execute the Snowpark created UDF in Snowflake worksheet? It is listed in show user functions
.
I created the myadd UDF in Snowpark as follows:
@udf(name="myadd", replace=True)
def myadd(x:int, y:int) -> int:
return x + y
and when I execute it in Snowpark as
session.sql("select myadd(2,2)").collect()
I get the answer.
Why cannot I execute this UDF in Snowflake worksheet?