SSC-EWI-OR0078

Unable to parse dynamic SQL statement inside Execute Immediate.

Severity

Medium

Description

SnowConvert could not parse the dynamic SQL statement inside the Execute Immediate.

Generate Procedures and Macros using JavasScript as the target language adding the following flag -t JavaScript or --PLTargetLanguage JavaScript

Example Code

Oracle:

IN -> Oracle_01.sql
--Additional Params: -t JavaScript
CREATE OR REPLACE PROCEDURE PROC1 AS
BEGIN
    EXECUTE IMMEDIATE 'NOT A VALID SQL STATEMENT';
END;

Snowflake Scripting:

OUT -> Oracle_01.sql
CREATE OR REPLACE PROCEDURE PROC1 ()
RETURNS STRING
LANGUAGE JAVASCRIPT
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": {  "major": 0,  "minor": 0,  "patch": "0" }, "attributes": {  "component": "oracle",  "convertedOn": "12/16/2024",  "domain": "test" }}'
EXECUTE AS CALLER
AS
$$
    // SnowConvert Helpers Code section is omitted.

    !!!RESOLVE EWI!!! /*** SSC-EWI-OR0078 - UNABLE TO PARSE DYNAMIC SQL STATEMENT ***/!!!
    /*EXEC(`NOT A VALID SQL STATEMENT`)*/
    ;
$$;

Recommendations

  • Check the dynamic SQL statement for any syntax error.

  • Review the SnowConvert documentation to see if the statement is still unsupported.

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

Last updated