MSCEWI3120

Unnecessary built-in packages parameters

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Low

Description

This message is displayed when SnowConvert migrates an Oracle built-in package procedure or function, and some of the arguments are removed from the call.

Some of the original parameters may not have an equivalent in Snowflake or may not be needed in the transformed version, those parameters are removed from the produced code but are preserved in the EWI message so the user can still track them.

Example Code

Input Code:

CREATE OR REPLACE PROCEDURE built_in_package_proc
IS
w_file UTL_FILE.FILE_TYPE;
BEGIN
    w_file:= UTL_FILE.FOPEN('MY_DIR','test.txt','W',32760);
    UTL_FILE.PUT_LINE(w_file,'New line');    
END;

Output Code:

CREATE OR REPLACE PROCEDURE PUBLIC.built_in_package_proc ()
RETURNS VARCHAR
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
    DECLARE
        w_file VARIANT /*** MSC-WARNING - MSCEWI1036 - UTL_FILE.FILE_TYPE DATA TYPE CONVERTED TO VARIANT ***/;
    BEGIN
        /*** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'UTL_FILE.FOPEN' INSERTED. ***/
        /*** MSC-WARNING - MSCEWI3120 - PARAMETERS: 'LOCATION, MAX_LINESIZE' UNNECESSARY IN THE IMPLEMENTATION. ***/
        CALL UTL_FILE.FOPEN('test.txt', 'W');
        SELECT
            *
        INTO
            w_file
        FROM
            TABLE(RESULT_SCAN(LAST_QUERY_ID()));
        /*** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'UTL_FILE.PUT_LINE' INSERTED. ***/
        /*** MSC-WARNING - MSCEWI3120 - PARAMETERS: 'AUTOFLUSH' UNNECESSARY IN THE IMPLEMENTATION. ***/
        CALL UTL_FILE.PUT_LINE(:w_file,'New line');
    END;
$$;

Recommendations

Last updated