MSCINF0004

Package Body Conversion Rate is affected by its inner elements

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

This EWI is deprecated, SnowConvert version used is out of date.

Severity

None

Description

The conversion rate of the Package Body is determined by the average conversion rate of its internal elements. Therefore, if any of the internal elements within the Package Body contains an EWI error, it will have a direct impact on the conversion rate of the entire Package Body.

Code Example

Input Code:

CREATE OR REPLACE PACKAGE BODY "REC"."BATCH_PROCESS_PKG"
AS
PROCEDURE Insert_batch_log(
    i_interface_category rec.batch_log.interface_category%type)
IS
BEGIN
SELECT COUNT(ROWID)
  INTO lv_total_job_count
  from rec.interface_config
  WHERE Upper(data_type) = lv_interface_category and upper(run_frequency) like lv_run_frequency;
  
END insert_batch_log;
end batch_process_pkg;
/

Output Code:

/*** MSC-INFORMATION - MSCINF0054 - PACKAGE BODY CONVERSION RATE IS AFFECTED BY ITS INNER ELEMENTS ***/  

--** MSC-WARNING - MSCEWI1050 - MISSING DEPENDENT OBJECTS "rec.batch_log", "rec.interface_config" **
CREATE OR REPLACE PROCEDURE "REC_BATCH_PROCESS_PKG".Insert_batch_log(i_interface_category VARIANT /*** MSC-WARNING - MSCEWI3129 - TYPE ATTRIBUTE 'rec.batch_log.interface_category%TYPE' COULD NOT BE RESOLVED, SO IT WAS TRANSFORMED TO VARIANT ***/)
RETURNS VARCHAR
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
    BEGIN
        SELECT COUNT(
            --** MSC-ERROR - MSCEWI3094 - ROWID PSEUDOCOLUMN IS NOT SUPPORTED IN SNOWFLAKE, IT WAS CONVERTED TO NULL TO AVOID RUNTIME ERRORS **
            null)
          INTO lv_total_job_count
          from
            rec.interface_config
          WHERE Upper(data_type) = lv_interface_category and upper(run_frequency) like lv_run_frequency;
    END;
$$;

Explanation: In this example, the procedure contains an EWI error, which will negatively impact the conversion rate of the procedure. Given that the procedure is an internal element of the Package Body, the conversion rate will be affected as a result.

Recommendations

  • Analyze the uses of array access in the code, if there was never the risk of getting an out of bounds error in the original code then no difference will be observed and this warning can be safely ignored.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated