MSCEWI3053
User defined function was transformed to a Snowflake procedure.
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Low
Description
Snowflake user defined functions do not support the same features as Oracle. To maintain the functional equivalence the function is transformed to a Snowflake stored procedure. This will affect their usage in queries.
Example Code
Input Code:
CREATE OR REPLACE FUNCTION FUNC01(x NUMBER) RETURN NUMBER AS
VAR1 NUMBER;
BEGIN
-- some pl sql statements
RETURN VAR1;
END FUNC01;
Output Code:
/*** MSC-ERROR - MSCEWI3053 - USER DEFINED FUNCTION WAS TRANSFORMED TO SNOWFLAKE PROCEDURE ***/
CREATE OR REPLACE PROCEDURE PUBLIC.FUNC01(x FLOAT)
RETURNS FLOAT
LANGUAGE JAVASCRIPT
EXECUTE AS CALLER
AS
$$
/* mobilize helpers */
/* pl sql statements translation */
return VAR1;
$$;
Recommendations
The source code may need to be restructured to fit with the Snowflake user-defined functions approach.
If you need more support, you can email us at [email protected]
Last updated