This issue occurs when there is an error while parsing the source code that is being converted. It means there is a source code syntax error or a specific statement of the code is not being recognized yet.
The following example illustrates different parsing error scenarios where invalid syntax is placed in the input. Notice how the message varies between every scenario, these contents may be helpful on isolating and fixing the issue. For more information check “Message Contents” below.
Starting clause: Specifies the starting location (line, column, and ‘text’) of the unrecognized code. The code will be commented from the ‘text’ element onward for every unrecognized element until the parser locates a possible recovery point.
Expected grammar clause: Specifies the type of grammar that the parser was expecting. Check if the commented code has a matching type of the expected grammar.
Last matching token clause (OPTIONAL): May appear if the unrecognized code was partially recognized. This signals the point up until the parser recognized valid elements, so check the following tokens in the commented code to make sure they are valid.
Failed Token clause (OPTIONAL): May only be present when a “Last matching Token clause” is also present. This represents at which point the parser ultimately determined the code is invalid or not recognized. Make sure this element can be placed in this syntactical location.
The items in this list are not actively in usage, and are left here for historical purposes.
Recovery Code (DEPRECATED): It is intended to be used as an error code, and may be supplied for better support during parser upgrade requests. It represents how the parser triggered its recovery mechanism.
This EWI is deprecated. SnowConvert AI now automatically reorders default parameters to the end of the parameter list instead of emitting this warning. Please refer to SSC-FDM-0041 for the updated behavior.
CREATE OR REPLACEPROCEDURE MySampleProc
!!!RESOLVEEWI!!!/*** SSC-EWI-0002 - DEFAULT PARAMETERS MAY NEED TO BE REORDERED. SNOWFLAKE ONLY SUPPORTS DEFAULT PARAMETERS AT THE END OF THE PARAMETERS DECLARATIONS ***/!!!(PARAM1STRINGDEFAULTNULL,PARAM2STRING,PARAM3STRINGDEFAULTNULL,PARAM4STRING)RETURNSTABLE()LANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"transact"}}'EXECUTEASCALLERAS
$$
DECLARE
ProcedureResultSet RESULTSET;BEGIN
ProcedureResultSet :=(SELECT1);RETURNTABLE(ProcedureResultSet);END;
$$;
This EWI is generated when SnowConvert AI maps a built-in system object (table, view) to the Snowflake-equivalent object, but there is no map for one of its internal columns.
selectTABLE_NAME,
parent_object_id !!!RESOLVEEWI!!!/*** SSC-EWI-0003 - SYSTEM COLUMN 'parent_object_id' FOR BUILT-IN OBJECT 'SYS.TABLES' HAS NOT BEEN TRANSLATED. ***/!!!fromINFORMATION_SCHEMA.TABLES;
This issue appears when an unexpected transformation error occurs while trying to convert the source code and the output code file can not be generated.
The transformation of the TO_CHAR function supports most of this format elements, for a full list of suppported format elements and their equivalent mappings please refer to the Translation specification
SELECT!!!RESOLVEEWI!!!/*** SSC-EWI-PG0005 - DECADE FORMAT IS NOT SUPPORTED IN SNOWFLAKE. ***/!!!DATE_TRUNC('decade',TIMESTAMP'2017-03-17 02:09:30'),!!!RESOLVEEWI!!!/*** SSC-EWI-PG0005 - CENTURY FORMAT IS NOT SUPPORTED IN SNOWFLAKE. ***/!!!DATE_TRUNC('century',TIMESTAMP'2017-03-17 02:09:30'),!!!RESOLVEEWI!!!/*** SSC-EWI-PG0005 - MILLENNIUM FORMAT IS NOT SUPPORTED IN SNOWFLAKE. ***/!!!DATE_TRUNC('millennium',TIMESTAMP'2017-03-17 02:09:30');
This warning is added when the collate clause is used as a column option because it is supported in Snowflake, but behaves differently in the collate specification. To verify which specifiers are supported in Snowflake, see Collate specifications.
Currently, there is no support in Snowflake for extended regular expression beyond the POSIX Basic Regular Expression syntax.
This EWI is added every time a function call to REGEX_SUBSTR, REGEX_REPLACE, or REGEX_INSTR is transformed to Snowflake to warn the user about possible unsupported regular expressions. Some of the features not supported are lookahead, lookbehind, and non-capturing groups.
--** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **CREATE OR REPLACETEMPORARYTABLEVOLATILETABLE(COL1INTEGER,COL2INTEGER,COL3INTEGER)-- --** SSC-FDM-0008 - ON COMMIT NOT SUPPORTED **--ON COMMIT PRESERVE ROWSCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"teradata"}}';--** SSC-FDM-0007 - MISSING DEPENDENT OBJECTS "TABLE2", "TABLE3" **UPDATETABLE2AST2SET--** SSC-FDM-0025 - UNEXPECTED END OF STATEMENT. PLEASE CHECK THE LINE 9 OF ORIGINAL SOURCE CODE. **T2.COL1+VOLATILETABLE.COL1FROMVOLATILETABLEWHERET2.COL2=_VOLATILETABLE.COL2ANDT2.COL3=_VOLATILETABLE.COL3ANDT2.COL4=(SELECTMAX(T3.COL1)FROMTABLE3T3WHERET3.COL1=T2.COL1);
This section describes the different issues that could be triggered by PIVOT and UNPIVOT clauses. The not-supported scenarios are presented in the following table.
Renaming columns with aliases is not supported in Snowflake UNPIVOT clauses. SnowConvert will remove aliases for functions or columns to create a valid query and check that this change does not affect the original functionality.
For PIVOT, the use of column aliases is only supported in SnowConvert AI for Teradata if the following two conditions are true: all expressions inside the IN clause have an alias associated and SnowConvert AI has information about the columns that will be generated as a result, either by providing the table definition or using a subquery with an explicit column list as input to the clause.
// SnowConvert AI Helpers Code section is omitted.SELECT*FROMSTAR1!!!RESOLVEEWI!!!/*** SSC-EWI-0015 - PIVOT/UNPIVOT MULTIPLE FUNCTION NOT SUPPORTED ***/!!!PIVOT(SUM(COL1),SUM(COL2)FORYRIN('Y1','Y2','Y3'))TMP;
// SnowConvert AI Helpers Code section is omitted.SELECT*FROMSTAR1PIVOT(SUM(COL1)FORYRIN('Y1','Y2','Y3')!!!RESOLVEEWI!!!/*** SSC-EWI-0015 - PIVOT/UNPIVOT WITH CLAUSE NOT SUPPORTED ***/!!!WITHSUM(*)AS withalias)TMP;
// SnowConvert AI Helpers Code section is omitted.SELECT*FROM(SELECT product_code, quantity FROM
pivot_test)!!!RESOLVEEWI!!!/*** SSC-EWI-0015 - PIVOT/UNPIVOT XML OUTPUT FORMAT NOT SUPPORTED ***/!!!PIVOT(SUM(quantity)FOR product_code IN('A','B','C'));
// SnowConvert AI Helpers Code section is omitted.SELECT*FROM
s1 PIVOT(SUM(COL1)FORFORCOL!!!RESOLVEEWI!!!/*** SSC-EWI-0015 - PIVOT/UNPIVOT IN CLAUSE SUBQUERY NOT SUPPORTED ***/!!!IN(SELECTSELCOLFROMS2));
// SnowConvert AI Helpers Code section is omitted.SELECT*FROM(SELECT product_code, quantity FROM
pivot_test)PIVOT(SUM(quantity)FOR product_code
!!!RESOLVEEWI!!!/*** SSC-EWI-0015 - PIVOT/UNPIVOT IN CLAUSE ANY SEQUENCE NOT SUPPORTED ***/!!!IN(ANY,ANY,ANY));
// SnowConvert AI Helpers Code section is omitted.SELECT*FROM
db1.star1p
!!!RESOLVEEWI!!!/*** SSC-EWI-0015 - PIVOT/UNPIVOT INCLUDE NULLS NOT SUPPORTED ***/!!!UNPIVOT( column1 FOR for_column IN(
col1,
col2)) Tmp;
There are several User-Defined Functions (UDF) provided by SnowConvert AI used to reproduce source language behaviors that are not supported by Snowflake, functionality and descriptions are detailed below.
UDFs can be found in “UDF Helpers” folder created in the output path after the migration has occurred.
One or more identifiers in a specific statement are considered parameters by default.
Warning
The EWI is only generated when Javascript is the target language for Stored Procedures. This is a deprecated translation feature, as Snowflake Scripting is the recommended target language for Stored Procedures.
Note
Some parts in the output code are omitted for clarity reasons.
Performance Review - A loop contains an insert, delete, or update statement.
Warning
The EWI is only generated when Javascript is the target language for Stored Procedures. This is a deprecated translation feature, as Snowflake Scripting is the recommended target language for Stored Procedures.
Note
Some parts in the output code are omitted for clarity reasons.
CREATE OR REPLACEPROCEDURE Database1.Proc1 ()RETURNSSTRINGLANGUAGEJAVASCRIPTCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'EXECUTEASCALLERAS
$$
// SnowConvert AI Helpers Code section is omitted.
var LNUMBER=1;/*** SSC-EWI-0023 - PERFORMANCE REVIEW - THIS LOOP CONTAINS AN INSERT, DELETE OR UPDATE STATEMENT ***/for(var CLASS2= new CURSOR(`SELECTCOL0,TRIM(COL1)ASCOL1ALIAS,TRIM(COL2),COL3FROM
someDb.prefixCol`,[],false).OPEN();CLASS2.NEXT();){letCLASS1=CLASS2.CURRENT;EXEC(`INSERTINTO TempDB.Table1
VALUES(:lgNumber,:1,(','||:!!!RESOLVEEWI!!!/*** SSC-EWI-0026 - THE VARIABLE class1.ClassCD MAY REQUIRE A CAST TO DATE, TIME OR TIMESTAMP ***/!!!:2||'_Ind CHAR(1) NOT NULL'))`,[LNUMBER,CLASS1.CLASSCD]);LNUMBER=LNUMBER+1;}CLASS2.CLOSE();
$$;
Binding time variables might require a change in the query.
Warning
The EWI is only generated when Javascript is the target language for Stored Procedures. This is a deprecated translation feature, as Snowflake Scripting is the recommended target language for Stored Procedures.
Note
Some parts in the output code are omitted for clarity reasons.
CREATE OR REPLACEPROCEDUREP_1025()RETURNSSTRINGLANGUAGEJAVASCRIPTCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'EXECUTEASCALLERAS
$$
// SnowConvert AI Helpers Code section is omitted.
var LN_EMP_KEY_NO_PARAM=-1;
var FLOATVARNAME=12.1;
var HERRORMSG= `NOERROR`;
var CURRTS= new Date()/*** SSC-EWI-0025 - BINDING TIME VARIABLE MIGHT REQUIRE CHANGE IN QUERY. ***/;
var CURRTS2= new Date();
$$;
The EWI is only generated when Javascript is the target language for Stored Procedures. This is a deprecated translation feature, as Snowflake Scripting is the recommended target language for Stored Procedures.
Note
Some parts in the output code are omitted for clarity reasons.
This warning is added when there is a query with a variable with a qualified member like an Oracle record or a Teradata for loop variable. Depending on where the variable is being used and the type of value, a cast may be necessary to work properly.
CREATETABLETABLE1(COL1DATE);CREATETABLETABLE2(COL1VARCHAR(25));CREATE OR REPLACEPROCEDUREEXAMPLEISCURSORC1ISSELECT*FROMTABLE1;BEGINFORREC1INC1LOOPinsertintoTABLE2values(TO_CHAR(REC1.COL1,'DD-MM-YYYY'));ENDLOOP;END;
-- Additional Params: -t javascriptCREATE OR REPLACETABLETABLE1(COL1TIMESTAMP/*** SSC-FDM-OR0042 - DATE TYPE COLUMN HAS A DIFFERENT BEHAVIOR IN SNOWFLAKE. ***/)COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';CREATE OR REPLACETABLETABLE2(COL1VARCHAR(25))COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';CREATE OR REPLACEPROCEDUREEXAMPLE()RETURNSSTRINGLANGUAGEJAVASCRIPTCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
// SnowConvert AI Helpers Code section is omitted.letC1= new CURSOR(`SELECT*FROMTABLE1`,()=>[]);C1.OPEN();//**SSC-EWI-0023-PERFORMANCEREVIEW-THISLOOPCONTAINSANINSERT,DELETEORUPDATESTATEMENT**while(C1.NEXT()){letREC1=C1.CURRENT;EXEC(`insertintoTABLE2values(TO_CHAR(!!!RESOLVEEWI!!!/*** SSC-EWI-0026 - THE VARIABLE REC1.COL1 MAY REQUIRE A CAST TO DATE, TIME OR TIMESTAMP ***/!!!?,'DD-MM-YYYY'))`,[REC1.COL1]);}C1.CLOSE();
$$;
CREATE OR REPLACETABLETABLE1(COL1TIMESTAMP)COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}';CREATE OR REPLACETABLETABLE2(COL1VARCHAR(25))COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}';CREATE OR REPLACEPROCEDUREEXAMPLE()RETURNSSTRINGLANGUAGEJAVASCRIPTCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
// SnowConvert AI Helpers Code section is omitted.letC1= new CURSOR(`SELECT*FROMTABLE1`,()=>[]);C1.OPEN();//**SSC-EWI-0023-PERFORMANCEREVIEW-THISLOOPCONTAINSANINSERT,DELETEORUPDATESTATEMENT**while(C1.NEXT()){letREC1=C1.CURRENT;EXEC(`insertintoTABLE2values(TO_CHAR(REC1.COL1::DATE,'DD-MM-YYYY'))`,[REC1.COL1]);}C1.CLOSE();
$$;
Check if a cast to a Date, Time, or Timestamp is necessary for the binding. Some cases are not necessary because an implicit conversion is done to the value.
This warning is used to report that a specific statement uses a variable or literal with an invalid query and for that reason, it will not be executed.
REPLACEPROCEDURETEST.COLLECT_STATS()BEGINCOLLECTSTATSONDBC.AccessRights COLUMN(COLNAME);SETSTATS_STATEMENT='COLLECT STATS ON '||OUT_DB||'.'||OUT_TBL||' COLUMN('||C4.ColumnName ||');';EXECUTEIMMEDIATESTATS_STATEMENT;EXECUTEIMMEDIATE'COLLECT STATS ON DBC.AccessRights COLUMN(COLNAME);';SETSTATS_STATEMENT_NOT_DYNAMIC='COLLECT STATS ON DBC.AccessRights COLUMN(COLNAME);';EXECUTEIMMEDIATESTATS_STATEMENT_NOT_DYNAMIC;END;;
CREATE OR REPLACEPROCEDURETEST.COLLECT_STATS()RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"teradata"}}'EXECUTEASCALLERAS
$$
BEGIN-- --** SSC-FDM-0027 - REMOVED NEXT STATEMENT, NOT APPLICABLE IN SNOWFLAKE. COLLECT **-- COLLECT STATS ON DBC.AccessRights COLUMN(COLNAME);STATS_STATEMENT:='COLLECT STATS ON '||OUT_DB||'.'||OUT_TBL||' COLUMN('||C4.ColumnName ||')';!!!RESOLVEEWI!!!/*** SSC-EWI-0027 - THE FOLLOWING STATEMENT USES A VARIABLE/LITERAL WITH AN INVALID QUERY AND IT WILL NOT BE EXECUTED ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!EXECUTEIMMEDIATESTATS_STATEMENT;!!!RESOLVEEWI!!!/*** SSC-EWI-0027 - THE FOLLOWING STATEMENT USES A VARIABLE/LITERAL WITH AN INVALID QUERY AND IT WILL NOT BE EXECUTED ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!EXECUTEIMMEDIATE'COLLECT STATS ON DBC.AccessRights COLUMN(COLNAME)';STATS_STATEMENT_NOT_DYNAMIC:='COLLECT STATS ON DBC.AccessRights COLUMN(COLNAME)';!!!RESOLVEEWI!!!/*** SSC-EWI-0027 - THE FOLLOWING STATEMENT USES A VARIABLE/LITERAL WITH AN INVALID QUERY AND IT WILL NOT BE EXECUTED ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!EXECUTEIMMEDIATESTATS_STATEMENT_NOT_DYNAMIC;END;
$$;
Check if a cast to a Date, Time, or Timestamp is necessary for the binding. Some cases are not necessary because an implicit conversion is done to the value.
CREATE OR REPLACETABLEMYTABLE(!!!RESOLVEEWI!!!/*** SSC-EWI-0028 - TYPE NOT SUPPORTED BY SNOWFLAKE ***/!!!COL1SYS.ANYDATASET)COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';
Snowflake supports the following External Table formats:
BigQuery
Snowflake
AVRO
AVRO
CSV GOOGLE_SHEETS
CSV
NEWLINE_DELIMITED_JSON JSON
JSON
ORC
ORC
PARQUET
PARQUET
When an external table has other FORMAT not specified in the above table, this EWI will be generated to inform the user that the FORMAT is not supported.
!!!RESOLVEEWI!!!/*** SSC-EWI-0029 - EXTERNAL TABLE DATA FORMAT NOT SUPPORTED IN SNOWFLAKE ***/!!!CREATE OR REPLACEEXTERNALTABLEtest.backup_restore_table USINGTEMPLATE(SELECTARRAY_AGG(OBJECT_CONSTRUCT('COLUMN_NAME',COLUMN_NAME,'TYPE',TYPE,'NULLABLE',NULLABLE,'EXPRESSION',EXPRESSION))FROM--** SSC-FDM-0035 - THE INFER_SCHEMA FUNCTION REQUIRES A FILE PATH WITHOUT WILDCARDS TO GENERATE THE TABLE TEMPLATE, REPLACE THE FILE_PATH PLACEHOLDER WITH IT **TABLE(INFER_SCHEMA(LOCATION=>'@EXTERNAL_STAGE/FILE_PATH',FILE_FORMAT=>'SC_TEST_BACKUP_RESTORE_TABLE_FORMAT')))!!!RESOLVEEWI!!!/*** SSC-EWI-0032 - EXTERNAL TABLE REQUIRES AN EXTERNAL STAGE TO ACCESS gs://backup_bucket, DEFINE AND REPLACE THE EXTERNAL_STAGE PLACEHOLDER ***/!!!LOCATION=@EXTERNAL_STAGEAUTO_REFRESH=falsePATTERN='backup_folder/.*'COMMENT='{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "bigquery", "convertedOn": "07/16/2025", "domain": "no-domain-provided" }}';
This error is used to indicate that the statement has usages of dynamic SQL. Each specific source language has its own set of statements that can execute dynamic SQL. Dynamic SQL refers to code that is built as text using the string manipulation tools the database engine language provides.
This scenario is considered a complex pattern because dynamic SQL is built and executed in runtime making it more difficult to track and debug errors. This error is meant to be a helper to spot some problems that a static-code analyzer such as Snow Convert cannot.
CREATE OR REPLACEPROCEDURE oracle_dynamic_sql ()RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
DECLARE
dynamic_statement VARCHAR(100);
numeric_variable INTEGER;
dynamic_statement VARCHAR(100);
column_variable VARCHAR(100);
cursor_variable_res RESULTSET;
c INTEGER;
dynamic_statement VARCHAR(100);BEGIN
dynamic_statement :='INSERT INTO sample_table(col1) VALUES(1)';
numeric_variable :=3;
column_variable :='col1';!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!EXECUTEIMMEDIATE :dynamic_statement;!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!EXECUTEIMMEDIATE'INSERT INTO sample_table(col1) VALUES('||NVL(:numeric_variable :: STRING,'')||')';!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!
cursor_variable_res :=(EXECUTEIMMEDIATE :dynamic_statement
);LET cursor_variable CURSORFOR
cursor_variable_res;OPEN cursor_variable;!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!
cursor_variable_res :=(EXECUTEIMMEDIATE'SELECT '||NVL(:column_variable :: STRING,'')||' FROM sample_table');!!!RESOLVEEWI!!!/*** SSC-EWI-OR0133 - THE CURSOR VARIABLE NAMED 'cursor_variable' HAS ALREADY BEEN ASSIGNED IN ANOTHER CURSOR ***/!!!LET cursor_variable CURSORFOR
cursor_variable_res;OPEN cursor_variable;!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!
cursor_variable_res :=(EXECUTEIMMEDIATE'SELECT col1 FROM sample_table');!!!RESOLVEEWI!!!/*** SSC-EWI-OR0133 - THE CURSOR VARIABLE NAMED 'cursor_variable' HAS ALREADY BEEN ASSIGNED IN ANOTHER CURSOR ***/!!!LET cursor_variable CURSORFOR
cursor_variable_res;OPEN cursor_variable;
c :=!!!RESOLVEEWI!!!/*** SSC-EWI-OR0076 - TRANSLATION FOR BUILT-IN PACKAGE 'DBMS_SQL.OPEN_CURSOR' IS NOT CURRENTLY SUPPORTED. ***/!!!''ASOPEN_CURSOR;
dynamic_statement :='SELECT * FROM sample_table';!!!RESOLVEEWI!!!/*** SSC-EWI-OR0076 - TRANSLATION FOR BUILT-IN PACKAGE 'DBMS_SQL.PARSE' IS NOT CURRENTLY SUPPORTED. ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!DBMS_SQL.PARSE(:c, :dynamic_statement);END;
$$;
Something important to take into account is that when migrating dynamic SQL code, SnowConvert AI will not report any type of issue inside of dynamic SQL in the output code or in the assessment reports. This will happen even when the documentation of an issue or the translation specification describes that an issue will always be added to the output code. Here is an example of a migration in Oracle where this situation might be encountered:
SELECT dbms_random.value()FROMdual;CREATE OR REPLACEPROCEDURE dynamic_sql_procedure
ASresultVARCHAR(100):='SELECT dbms_random.value() from dual';BEGINNULL;END;
SELECT--** SSC-FDM-OR0033 - DBMS_RANDOM.VALUE DIGITS OF PRECISION ARE LOWER IN SNOWFLAKE **DBMS_RANDOM.VALUE_UDF()FROMdual;CREATE OR REPLACEPROCEDURE dynamic_sql_procedure ()RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
DECLAREresultVARCHAR(100):='SELECT DBMS_RANDOM.VALUE_UDF() from dual';BEGINNULL;END;
$$;
In the previous example, the query and the variable assignment inside the procedure will be converted exactly the same, the difference is that in the dynamic SQL code the conversion issues will not be shown in the output code and in the assessment reports.
// SnowConvert AI Helpers Code section is omitted.SELECT!!!RESOLVEEWI!!!/*** SSC-EWI-0031 - VALUE FUNCTION NOT SUPPORTED ***/!!!VALUE(ST)FROM
SampleTable ST;
SELECT!!!RESOLVEEWI!!!/*** SSC-EWI-0031 - HASHBUCKET FUNCTION NOT SUPPORTED ***/!!!HASHBUCKET(!!!RESOLVEEWI!!!/*** SSC-EWI-0031 - HASHROW FUNCTION NOT SUPPORTED ***/!!!HASHROW(col1))FROM
my_table;
Note
Teradata hash functions (HASHBUCKET, HASHROW, HASHAMP, HASHBAKAMP) are tied to Teradata’s shared-nothing AMP architecture for data distribution. Snowflake manages data distribution internally and has no equivalent mechanism. While Snowflake provides a HASH function, the HASH function uses a different algorithm, produces values in a different range (Snowflake HASH: signed 64-bit integers; HASHBUCKET: 0–1,048,575), and handles NULLs differently. For this reason, SnowConvert marks these functions with EWI markers rather than attempting an automatic translation.
When transforming the CREATE EXTERNAL TABLE statement, SnowConvert AI will generate an EXTERNAL_STAGE placeholder that has to be replaced with the external stage created for connecting with the external location from Snowflake.
Please refer to the following guides to set up the necessary Storage Integration and External Stage in your Snowflake account:
CREATE OR REPLACEEXTERNALTABLEtest.Employees_test
(
Employee_id INTEGER,NameSTRING,
Mail STRING,PositionSTRING,
Salary INTEGER)OPTIONS(FORMAT='CSV',SKIP_LEADING_ROWS=1,URIS=['gs://sc_external_table_bucket/folder_with_csv/Employees.csv']);
CREATE OR REPLACEEXTERNALTABLEtest.Employees_test
(
Employee_id INTEGERASCAST(GET_IGNORE_CASE($1,'c1')ASINTEGER),NameSTRINGASCAST(GET_IGNORE_CASE($1,'c2')ASSTRING),
Mail STRINGASCAST(GET_IGNORE_CASE($1,'c3')ASSTRING),PositionSTRINGASCAST(GET_IGNORE_CASE($1,'c4')ASSTRING),
Salary INTEGERASCAST(GET_IGNORE_CASE($1,'c5')ASINTEGER))!!!RESOLVEEWI!!!/*** SSC-EWI-0032 - EXTERNAL TABLE REQUIRES AN EXTERNAL STAGE TO ACCESS gs://sc_external_table_bucket, DEFINE AND REPLACE THE EXTERNAL_STAGE PLACEHOLDER ***/!!!LOCATION=@EXTERNAL_STAGEAUTO_REFRESH=falsePATTERN='folder_with_csv/Employees.csv'FILE_FORMAT=(TYPE=CSVSKIP_HEADER=1);
// SnowConvert AI Helpers Code section is omitted.CREATE OR REPLACEVIEW SampleView
COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'ASSELECTCAST(RPAD(TO_VARCHAR(DAY_DATE!!!RESOLVEEWI!!!/*** SSC-EWI-0033 - FORMAT 'MMM-YYYY' REMOVED, SEMANTIC INFORMATION NOT FOUND. ***/!!!),8)ASCHAR(8))FROM
SampleTable;
// SnowConvert AI Helpers Code section is omitted.CREATE OR REPLACEVIEW SampleView
COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'ASSELECTDAY_DATE!!!RESOLVEEWI!!!/*** SSC-EWI-0034 - FORMAT 'MMM-YYYY' REMOVED. ***/!!!+1FROM
SampleTable;
CREATE OR REPLACETABLE"Schema"."BaseTable"("COLUMN1"VARCHAR(255),!!!RESOLVEEWI!!!/*** SSC-EWI-0035 - CHECK STATEMENT NOT SUPPORTED ***/!!!CHECK(COLUMN1IS NOT NULL))COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';
// SnowConvert AI Helpers Code section is omitted.SELECTTOP1!!!RESOLVEEWI!!!/*** SSC-EWI-0040 - THE 'TOP PERCENT' CLAUSE IS NOT SUPPORTED IN SNOWFLAKE ***/!!!*FROM
SampleTable;
This issue happens when a source code file has an encoding format not recognized by the tool. Character encoding is the process of assigning numbers to graphical characters, in this context written characters of human language, thus the error indicates the conversion tool could not recognize certain characters.
All files in the input folder should have the same encoding to avoid this error.
The appropriate encoding should be selected through the conversion settings or by utilizing the –encoding conversion parameter with the CLI. To determine which encoding to select online tools such as Free Online Formater (https://freeonlineformatter.com/encoding-string) can be used or run the command file -i * in the case of Linux or OS.
In some cases, column names that are valid in the source language may conflict with Snowflake’s reserved keywords. These conflicts arise because Snowflake reserves a set of keywords that cannot be used directly as column names without special handling. For details, refer to Snowflake’s official documentation on reserved and limited keywords.
CREATE OR REPLACETABLET1(!!!RESOLVEEWI!!!/*** SSC-EWI-0045 - COLUMN NAME 'LOCALTIME' IS A SNOWFLAKE RESERVED KEYWORD ***/!!!"LOCALTIME"VARCHAR,!!!RESOLVEEWI!!!/*** SSC-EWI-0045 - COLUMN NAME 'CURRENT_USER' IS A SNOWFLAKE RESERVED KEYWORD ***/!!!"CURRENT_USER"VARCHAR)COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';
Snowflake does not support the declaration of nested functions/procedures, this warning is added to any create function or create procedure statement in which nested declarations were found.
CREATE OR REPLACEFUNCTION myFunction
RETURNINTEGERIS
total_count INTEGER;-- Function DeclarationFUNCTION function_declaration(param1 VARCHAR)RETURNINTEGER;FUNCTION function_definition
RETURNINTEGERIScountINTEGER;PROCEDURE procedure_declaration(param1 INTEGER)ISBEGINNULL;END;BEGINRETURNcount;end;BEGIN-- Your logic to calculate the total employee count goes hereRETURN total_count;END;
!!!RESOLVEEWI!!!/*** SSC-EWI-0046 - NESTED FUNCTION/PROCEDURE DECLARATIONS ARE NOT SUPPORTED IN SNOWFLAKE. ***/!!!CREATE OR REPLACEFUNCTION myFunction ()RETURNSFLOATLANGUAGEJAVASCRIPTCOMMENT='{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "oracle", "convertedOn": "12/16/2024", "domain": "test" }}'AS
$$
letTOTAL_COUNT;!!!RESOLVEEWI!!!/*** SSC-EWI-OR0057 - TRANSFORMATION FOR NESTED FUNCTION IS NOT SUPPORTED IN THIS SCENARIO ***/!!!/* -- Function Declaration FUNCTION function_declaration(param1 VARCHAR) RETURN INTEGER; *///Function Declaration
;!!!RESOLVEEWI!!!/*** SSC-EWI-OR0057 - TRANSFORMATION FOR NESTED FUNCTION IS NOT SUPPORTED IN THIS SCENARIO ***/!!!/* FUNCTION function_definition RETURN INTEGER IS count INTEGER; PROCEDURE procedure_declaration(param1 INTEGER) IS BEGIN NULL; END; BEGIN RETURN count; end; */;// Your logic to calculate the total employee count goes here
returnTOTAL_COUNT;
$$;
--** SSC-FDM-0009 - GLOBAL TEMPORARY TABLE FUNCTIONALITY NOT SUPPORTED. **CREATE OR REPLACETABLE t1
(col1 varchar)COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}';CREATE OR REPLACEVIEW view1
COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'ASselect col1 from!!!RESOLVEEWI!!!/*** SSC-EWI-0049 - A Global Temporary Table is being referenced ***/!!!
t1;
This error happens when the conversion tool could not determine the data type of a variable. This may happen because the declaration of a variable could be missing.
This error happens when a correlated subquery is found within an OR logical expression of an OUTER JOIN (Left, Right or Full). In those cases they could produce inconsistent results or cause the following error:
SQL compilation error: Unsupported subquery type cannot be evaluated.
SELECT a.Column1, b.Column2
FROM
TableA a
LEFT JOIN TableB b ON(a.Column1 = b.Column1)AND(
a.Column2 = b.Column2
OREXISTS(SELECT*FROM Table3 c
WHERE c.Column1 = a.Column1
));
// SnowConvert AI Helpers Code section is omitted.SELECT
a.Column1,
b.Column2
FROM
TableA a
LEFT JOIN
TableB b ON(a.Column1 = b.Column1)AND(
a.Column2 = b.Column2
OREXISTS!!!RESOLVEEWI!!!/*** SSC-EWI-0054 - CORRELATED SUBQUERIES WITHIN AN OR EXPRESSION OF AN OUTER JOIN COULD CAUSE COMPILATION ERRORS ***/!!!(SELECT*FROM
Table3 c
WHERE c.Column1 = a.Column1
));
This message appears when a user-defined type (UDT) is defined. User-defined types are not supported in Snowflake, so references to the custom type are changed to an appropriate Snowflake type (such as VARIANT or OBJECT).
Snowflake has a UDT Private Preview feature available. For more information about accessing this feature, please contact udt-prpr@snowflake.com.
Note
The type definition is commented on but is still being taken into account for resolving usages, see SSC-EWI-0062 for more information.
!!!RESOLVEEWI!!!/*** SSC-EWI-0056 - USER-DEFINED TYPES ARE NOT SUPPORTED IN SNOWFLAKE. REFERENCES WERE CHANGED TO VARIANT. A UDT PRIVATE PREVIEW FEATURE IS AVAILABLE, FOR MORE INFORMATION, PLEASE CONTACT udt-prpr@snowflake.com ***/!!!CREATETYPE type1 ASOBJECT(column1 INT);CREATE OR REPLACEPROCEDURE record_procedure ()RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
DECLARE!!!RESOLVEEWI!!!/*** SSC-EWI-0056 - USER-DEFINED TYPES ARE NOT SUPPORTED IN SNOWFLAKE. REFERENCES WERE CHANGED TO OBJECT. A UDT PRIVATE PREVIEW FEATURE IS AVAILABLE, FOR MORE INFORMATION, PLEASE CONTACT udt-prpr@snowflake.com ***/!!!TYPE record_typ ISRECORD(col1 INTEGER, col2 FLOAT);BEGINNULL;END;
$$;
CREATE OR REPLACEPROCEDUREPROC01()RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
DECLARE
number_variable INTEGER;BEGIN!!!RESOLVEEWI!!!/*** SSC-EWI-0030 - THE STATEMENT BELOW HAS USAGES OF DYNAMIC SQL. ***/!!!EXECUTEIMMEDIATE'SELECT 1 FROM DUAL'!!!RESOLVEEWI!!!/*** SSC-EWI-0058 - FUNCTIONALITY FOR 'EXECUTE IMMEDIATE RETURNING CLAUSE' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/!!!INTO number_variable;END;
$$;
This error happens when a Custom Type is referenced in a source for a DML statement, but the Custom Type was never defined.
For example in a Table Column whose type might be a UDT but it was never defined.
Warning
Not to be confused with SSC-FDM-0015, which is when it was referenced in a DDL query.
--Type was never defined--CREATE TYPE type1;!!!RESOLVEEWI!!!/*** SSC-EWI-0050 - MISSING DEPENDENT OBJECT "type1" ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0063 - 'PUBLIC.table1_view' ADDED BECAUSE 'table1' USED A CUSTOM TYPE ***/!!!CREATE OR REPLACETABLE table1
(--the type will be unresolved
column1 VARIANT!!!RESOLVEEWI!!!/*** SSC-EWI-0064 - REFERENCED CUSTOM TYPE 'type1' IN QUERY NOT FOUND, USAGES MAY BE AFFECTED ***/!!!/*** SSC-FDM-0015 - DATA TYPE 'type1' NOT RECOGNIZED ***/);CREATE OR REPLACEVIEWPUBLIC.table1_view
ASSELECT
column1
FROM
table1;SELECT
column1 !!!RESOLVEEWI!!!/*** SSC-EWI-0064 - REFERENCED CUSTOM TYPE 'type1' IN QUERY NOT FOUND, USAGES MAY BE AFFECTED ***/!!!FROM
table1;
SELECT*fromT1where!!!RESOLVEEWI!!!/*** SSC-EWI-0066 - EXPRESSION 'OVERLAPS' IS NOT SUPPORTED IN SNOWFLAKE. ***/!!!(cast('2016-03-17'asDATE),cast('2016-03-21'asDATE))OVERLAPS(cast('2016-03-20'asDATE),cast('2016-03-22'asDATE));
This error is added when a call to a UDF (user defined function) is found inside a query. Oracle UDFs and UDFs inside packages and some SQL Server UDFs, are being transformed to Snowflake Stored Procedures, which can not be called from a query.
The function is transformed to a Stored procedure to maintain functional equivalence and the function call is transformed to an empty Snowflake UDF function.
User defined function was transformed to a Snowflake procedure.
Snowflake user defined functions do not support the same features as Oracle or SQL Server. To maintain the functional equivalence the function is transformed to a Snowflake stored procedure. This will affect their usage in queries.
CREATE OR REPLACEFUNCTIONFUN1(PAR1VARCHAR)RETURNVARCHARISVAR1VARCHAR(20);VAR2VARCHAR(20);BEGINSELECTCOL1INTOVAR1FROMTABLE1where col1 =1;VAR2:=PAR1||VAR1;RETURNVAR2;END;/
!!!RESOLVEEWI!!!/*** SSC-EWI-0068 - USER DEFINED FUNCTION WAS TRANSFORMED TO SNOWFLAKE PROCEDURE ***/!!!CREATE OR REPLACEPROCEDUREFUN1(PAR1VARCHAR)RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
DECLAREVAR1VARCHAR(20);VAR2VARCHAR(20);BEGINSELECTCOL1INTO
:VAR1
FROMTABLE1where col1 =1;VAR2:=NVL(:PAR1:: STRING,'')||NVL(:VAR1:: STRING,'');RETURN :VAR2;END;
$$;
This EWI is added when there is a grammar clause in the input platform that has not been reviewed by the SnowConvert AI developer team. The code may require manual revision for it to work in Snowflake.
Notice in line 6 of the input code, that there is a reference to a INSERT statement with DEFAULT VALUES, this is currently a not supported statement by SnowConvert AI and that is why in lines 11 and 12 the EWI is generated.
This warning is added when a query that has several CTE (Common Table Expression) reference calls creates a cycle that cannot determine the calling order of the CTEs, and then the CTEs cannot be ordered and the query will remain as the source.
!!!RESOLVEEWI!!!/*** SSC-EWI-0077 - CYCLE FOUND BETWEEN CTE REFERENCE CALLS, CTES CANNOT BE ORDERED AND THE QUERY WILL REMAIN AS ORIGINAL ***/!!!WITHRECURSIVE t1(c1)AS(SELECT
c1 FROM t2
),
t2(c2)AS(SELECT
c2 FROM t3
),
t3(c3)AS(SELECT
c3,
someOtherColumn FROM t1, t3
)SELECT*FROM t1;
CREATE OR REPLACETABLE test1345
(
key1 BINARY!!!RESOLVEEWI!!!/*** SSC-EWI-0080 - DEFAULT VALUE IS NOT ALLOWED ON BINARY COLUMNS ***/!!!default0)COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"transact"}}';
SELECT*FROM!!!RESOLVEEWI!!!/*** SSC-EWI-0084 - XMLTABLE IS NOT SUPPORTED BY SNOWFLAKE ***/!!!XMLTABLE('stringValue'PASSINGBYREF passingExpr AS AliasName
)ASXMLTABLENAME
Currently, all Materialized Views are being converted to regular Views. This process eliminates additional clauses that the Materialized Views may have had. For more information, see Limitations on creating materialized views.
!!!RESOLVEEWI!!!/*** SSC-EWI-0092 - MATERIALIZED VIEW WAS CONVERTED TO REGULAR VIEW. ***/!!!CREATE OR REPLACEVIEWMATERIALIZED_VIEW1COMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'AS--** SSC-FDM-0001 - VIEWS SELECTING ALL COLUMNS FROM A SINGLE TABLE ARE NOT REQUIRED IN SNOWFLAKE AND MAY IMPACT PERFORMANCE. **select*from
aTable;
CREATE OR REPLACEPROCEDURE Example (grade NUMBER(38,18))RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'EXECUTEASCALLERAS
$$
BEGIN!!!RESOLVEEWI!!!/*** SSC-EWI-0094 - LABEL DECLARATION FOR A STATEMENT IS NOT SUPPORTED BY SNOWFLAKE SCRIPTING <<CASE1>><<CASE2>> ***/!!!CASE :grade
WHEN10THENNULL;ELSENULL;ENDCASE;END;
$$;
Deprecation: This issue code is deprecated. Snowflake supports native user-defined types, and SnowConvert emits CREATE TYPE for many supported patterns. This entry’s Input Code and Generated Code examples are preserved as historical reference. For current conversion behavior, see the translation reference for your source: Oracle, IBM DB2, Teradata, SQL Server / Azure Synapse, PostgreSQL / Greenplum / Netezza, Sybase IQ.
User-defined types (UDTs) created with the CREATE TYPE statement are not currently supported in Snowflake. When SnowConvert AI encounters a CREATE TYPE statement, it adds this warning to indicate that manual intervention is required.
Snowflake has a UDT Private Preview feature available. For more information about accessing this feature, please contact udt-prpr@snowflake.com.
--** SSC-EWI-0095 - USER-DEFINED TYPE: 'address_type' IS CURRENTLY NOT SUPPORTED IN SNOWFLAKE. A UDT PRIVATE PREVIEW FEATURE IS AVAILABLE, FOR MORE INFORMATION, PLEASE CONTACT udt-prpr@snowflake.com **CREATE OR REPLACETYPE address_type ASOBJECT(
street VARCHAR(100),
city VARCHAR(50),
state VARCHAR(2),
zip_code VARCHAR(10));
Snowflake does not operate transaction label names because there should not be nested transactions to identify in different COMMIT or ROLLBACK statements.
CREATE OR REPLACEPROCEDURE TestTransaction ()RETURNSVARCHARLANGUAGESQLCOMMENT='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"transact"}}'EXECUTEASCALLERAS
$$
BEGINDROPTABLEIF EXISTSNEWTABLE;CREATE OR REPLACETABLENEWTABLE(COL1INT,COL2VARCHAR);BEGINTRANSACTION!!!RESOLVEEWI!!!/*** SSC-EWI-0101 - COMMENTED OUT TRANSACTION LABEL NAME BECAUSE IS NOT APPLICABLE IN SNOWFLAKE ***/!!!
LabelA;INSERTINTONEWTABLEVALUES(1,'MICHAEL');INSERTINTONEWTABLEVALUES(2,'JACKSON');COMMIT;END;
$$;
Snowflake statements could remove some options when they are handled by the conversion rule. So it will be removed from the output code but the functionality is equivalent.
-- Case 1:!!!RESOLVEEWI!!!/*** SSC-EWI-0102 - REMOVED ONLY OPTION FROM CODE, ALREADY HANDLED IN CONVERSION TO SNOWFLAKE ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0102 - REMOVED CASCADE OPTION FROM CODE, ALREADY HANDLED IN CONVERSION TO SNOWFLAKE ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0102 - REMOVED RESTART IDENTITY OPTION FROM CODE, ALREADY HANDLED IN CONVERSION TO SNOWFLAKE ***/!!!TRUNCATE table_base2;-- Case 2:!!!RESOLVEEWI!!!/*** SSC-EWI-0102 - REMOVED CASCADE OPTION FROM CODE, ALREADY HANDLED IN CONVERSION TO SNOWFLAKE ***/!!!!!!RESOLVEEWI!!!/*** SSC-EWI-0102 - REMOVED RESTART IDENTITY OPTION FROM CODE, ALREADY HANDLED IN CONVERSION TO SNOWFLAKE ***/!!!TRUNCATETABLE table_inherit_and_generated;
In Snowflake, there are multiple patterns and elements in a subquery that are not supported and make it not executable. According to the Snowflake documentation on subqueries the following subquery types are supported:
Uncorrelated scalar subqueries in any place that a value expression can be used.
Correlated scalar subqueries in WHERE clauses.
EXISTS, ANY / ALL, and IN subqueries in WHERE clauses. These subqueries can be correlated or uncorrelated.
Please note that the list above is not exhaustive, meaning that subqueries that match none of the specified types may still be considered valid.
To help avoid errors, SnowConvert AI knows a set of subquery patterns that normally invalidate subqueries, this EWI is added to warn the user that the subquery matches at least one of these patterns and therefore may produce errors when compiled in Snowflake.
CREATETABLE tableA
(
col1 INTEGER,
col2 VARCHAR(20));CREATETABLE tableB
(
col3 INTEGER,
col4 VARCHAR(20));INSERTINTO tableA VALUES(50,'Hey');INSERTINTO tableB VALUES(50,'Hey');INSERTINTO tableB VALUES(50,'Example');INSERTINTO tableB VALUES(10,'Bye');-- Snowflake only allows the usage of FETCH in subqueries that are uncorrelated scalar, this subquery execution will failSELECT col2
FROM tableA
WHERE col2 =(SELECT col4 FROM tableB WHERE col3 = col1 FETCHFIRSTROWONLY);-- This subquery is uncorrelated scalar so FETCH is valid to useSELECT col2
FROM tableA
WHERE col2 =(SELECT col4 FROM tableB FETCHFIRSTROWONLY);
CREATE OR REPLACETABLE tableA
(
col1 INTEGER,
col2 VARCHAR(20))COMMENT='{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "oracle", "convertedOn": "12/05/2024", "domain": "test" }}';CREATE OR REPLACETABLE tableB
(
col3 INTEGER,
col4 VARCHAR(20))COMMENT='{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "oracle", "convertedOn": "12/05/2024", "domain": "test" }}';INSERTINTO tableA
VALUES(50,'Hey');INSERTINTO tableB
VALUES(50,'Hey');INSERTINTO tableB
VALUES(50,'Example');INSERTINTO tableB
VALUES(10,'Bye');-- Snowflake only allows the usage of FETCH in subqueries that are uncorrelated scalar, this subquery execution will failSELECT col2
FROM
tableA
WHERE col2 =--** SSC-FDM-0002 - CORRELATED SUBQUERIES MAY HAVE SOME FUNCTIONAL DIFFERENCES. **!!!RESOLVEEWI!!!/*** SSC-EWI-0108 - THE FOLLOWING SUBQUERY MATCHES AT LEAST ONE OF THE PATTERNS CONSIDERED INVALID AND MAY PRODUCE COMPILATION ERRORS ***/!!!(SELECTANY_VALUE( col4)FROM
tableB
WHERE col3 = col1
FETCHFIRST1ROWONLY);-- This subquery is uncorrelated scalar so FETCH is valid to useSELECT col2
FROM
tableA
WHERE col2 =(SELECT col4 FROM
tableB
FETCHFIRST1ROWONLY);
Check the subquery in Snowflake, if it compiles without problems then this EWI can be safely ignored.
Please check the complex patterns section for subqueries inside the assessment report, it contains a list of the patterns that normally invalidate subqueries and their occurrences, it can be used to review the migrated subqueries and why are they considered invalid.
!!!RESOLVEEWI!!!/*** SSC-EWI-0109 - ALTER TABLE SYNTAX NOT APPLICABLE IN SNOWFLAKE ***/!!!ALTERTABLESOMENAMEDEFAULTCOLLATIONSOMENAME;!!!RESOLVEEWI!!!/*** SSC-EWI-0109 - ALTER TABLE SYNTAX NOT APPLICABLE IN SNOWFLAKE ***/!!!ALTERTABLESOMENAMEROWARCHIVAL;!!!RESOLVEEWI!!!/*** SSC-EWI-0109 - ALTER TABLE SYNTAX NOT APPLICABLE IN SNOWFLAKE ***/!!!ALTERTABLESOMENAMEMODIFYCLUSTERING;!!!RESOLVEEWI!!!/*** SSC-EWI-0109 - ALTER TABLE SYNTAX NOT APPLICABLE IN SNOWFLAKE ***/!!!ALTERTABLESOMENAMEDROPCLUSTERING;!!!RESOLVEEWI!!!/*** SSC-EWI-0109 - ALTER TABLE SYNTAX NOT APPLICABLE IN SNOWFLAKE ***/!!!ALTERTABLESOMENAMESHRINKSPACECOMPACTCASCADE;
When there are missing dependencies, the EWI is added to indicate that a transformation cannot be executed. SnowConvert AI utilizes abstract syntax trees to create a semantic model of the input code, which is then used to generate new code that replicates the functionality of the original source. However, in this particular scenario, the transformation could not be completed because the semantic model lacks certain dependencies.
Snowflake supports only a single level of nesting for procedures. Defining a nested procedure inside another nested procedure is not allowed. If this pattern is detected, this error will be generated.
Refactor your code to avoid more than one level of nested procedures. Move deeply nested procedures to the top level or restructure your logic to comply with Snowflake’s single-level nesting limitation.
Snowflake does not support overloading of nested procedures. In other words, you cannot define multiple nested procedures with the same name but different parameter lists within the same parent procedure. If the source code contains overloaded nested procedures, this error will be generated to indicate that such patterns are not supported in Snowflake.
Attempting to overload nested procedures in Snowflake will result in compilation errors or unexpected behavior. To ensure compatibility, you should refactor your code to avoid overloading nested procedures. Consider renaming procedures so that each nested procedure has a unique name within its scope, or restructure your logic to eliminate the need for overloading. Additionally, review and update all procedure calls to use the new unique names.
In database systems like DB2, Teradata, and others, it is possible to declare both CONTINUE and EXIT exception handlers in the same procedural block. However, Snowflake Scripting does not support mixing CONTINUE and EXIT handlers within the same EXCEPTION block.
When SnowConvert AI encounters a procedure with both types of handlers declared in the same block, it generates separate EXCEPTION blocks for each handler type and adds this EWI to indicate that manual review and testing are required to ensure the converted code maintains the intended behavior.
Key Behavioral Differences:
CONTINUE HANDLER: Allows execution to continue after handling the exception
EXIT HANDLER: Terminates the current block after handling the exception
Since Snowflake cannot mix these behaviors in a single EXCEPTION block, the conversion may result in different execution flow compared to the source system.
Instead of mixing handlers, consider this approach:
BEGIN-- Handle operations that should continue on errorBEGIN
operation1();
operation2();EXCEPTIONWHENOTHERCONTINUETHEN
log_error('Continue handler');END;-- Handle operations that should exit on errorBEGIN
critical_operation();EXCEPTIONWHENOTHEREXITTHEN
log_error('Exit handler');END;END;
This EWI is emitted for tables that contain datatypes currently not supported by Snowflake on Iceberg tables.
Currently, Snowflake offers support for Iceberg tables in V2 format.
This EWI is emitted when a CHECK constraint expression contains functions or constructs that Snowflake does not support in CHECK constraints. Snowflake CHECK constraints only support deterministic, scalar expressions without user-defined functions or non-deterministic built-in functions.
The unsupported expression types include:
User-defined functions (UDFs): Any function that is not a Snowflake built-in function, including schema-qualified function calls or unresolved function references
Non-deterministic functions: Built-in functions that return different values on each call or depend on session/system context, such as NEWID(), RAND(), UUID_STRING(), GETDATE(), CURRENT_TIMESTAMP(), CURRENT_USER(), CURRENT_ROLE()
When this EWI is emitted, the CHECK constraint is flagged with the !!!RESOLVE EWI!!! marker and the specific reason (e.g., “user-defined function”, “non-deterministic function”) is included in the annotation.
CREATE OR REPLACETABLE Orders (
Price DECIMAL(10,2)!!!RESOLVEEWI!!!/*** SSC-EWI-0116 - CHECK CONSTRAINT WITH user-defined function IS NOT SUPPORTED IN SNOWFLAKE ***/!!!CHECK(dbo.IsValidPrice(Price)=1));
Example 2: CHECK Constraint with Non-Deterministic Function¶
CREATE OR REPLACETABLE Sessions (
Token NVARCHAR(100)!!!RESOLVEEWI!!!/*** SSC-EWI-0116 - CHECK CONSTRAINT WITH non-deterministic function: 'NEWID' IS NOT SUPPORTED IN SNOWFLAKE ***/!!!CHECK(Token <>CAST(NEWID()ASNVARCHAR(100))));
Example 3: CHECK Constraint with Unresolved Function (Oracle)¶
CREATE OR REPLACETABLE invoices (
invoice_id NUMBER(38,18)/*** SSC-FDM-0006 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE. ***/NOT NULL,
tax_code VARCHAR(10),CONSTRAINT chk_tax_code
!!!RESOLVEEWI!!!/*** SSC-EWI-0116 - CHECK CONSTRAINT WITH user-defined function IS NOT SUPPORTED IN SNOWFLAKE ***/!!!CHECK(validate_tax_code(tax_code)=1));
Replace UDFs with inline expressions: If the user-defined function performs validation logic, consider rewriting it as an inline SQL expression using Snowflake built-in functions
Remove dynamic constraints: CHECK constraints with non-deterministic functions typically try to enforce rules that change over time. Consider alternative approaches such as:
Application-level validation
Triggers or streams to validate data changes
Regular scheduled tasks to audit and flag violations
Simplify validation logic: Ensure CHECK constraints only use deterministic, scalar expressions that can be evaluated at insert/update time
This EWI is emitted when the --UseIntervalDatatypepreview flag is enabled and an INTERVAL data type appears inside a semi-structured type column such as ARRAY, MAP, or STRUCT. Snowflake does not support storing INTERVAL values inside VARIANT-based columns. The outer type is still converted (for example, STRUCT becomes VARIANT), but the EWI warns that the INTERVAL values within cannot be preserved.
For more details on how interval types are handled across languages, see the Interval Data Types translation reference.
CREATETABLEtest.table1 (
col1 ARRAY!!!RESOLVEEWI!!!/*** SSC-EWI-0116 - SNOWFLAKE DOES NOT SUPPORT INTERVAL VALUES INSIDE SEMI-STRUCTURED TYPE COLUMNS ***/!!!DEFAULT[]);
CREATETABLE tb1 (
col1 VARIANT/*** SSC-FDM-0034 - STRUCT<INTERVAL, INT> CONVERTED TO VARIANT. SOME OF ITS USAGES MIGHT HAVE FUNCTIONAL DIFFERENCES. ***/!!!RESOLVEEWI!!!/*** SSC-EWI-0116 - SNOWFLAKE DOES NOT SUPPORT INTERVAL VALUES INSIDE SEMI-STRUCTURED TYPE COLUMNS ***/!!!);
This EWI is emitted when the --UseIntervalDatatypepreview flag is enabled and an INTERVAL data type is used in a context not yet supported by Snowflake Scripting: UDF or procedure parameters, return types, or variable declarations. The INTERVAL type is preserved in the output for reference, but the EWI warns that it will not work at runtime in these contexts.
For more details on how interval types are handled across languages, see the Interval Data Types translation reference.
CREATEFUNCTIONtest.fn1 (p1 INTERVALDAYTOSECOND/*** SSC-FDM-0042 - INTERVAL QUALIFIER CHANGED TO DAY TO SECOND, SNOWFLAKE DOES NOT SUPPORT MIXING YEAR TO MONTH AND DAY TO SECOND TIME PARTS. ***/!!!RESOLVEEWI!!!/*** SSC-EWI-0117 - SNOWFLAKE DOES NOT SUPPORT THE INTERVAL DATA TYPE IN UDF/PROCEDURE PARAMETERS, RETURN TYPES, OR VARIABLE DECLARATIONS ***/!!!)RETURNSINTAS
$$
1
$$;
-- Additional Params: --UseIntervalDatatypeCREATE OR REPLACEPROCEDURE test_proc (P1INTERVALDAYTOSECOND!!!RESOLVEEWI!!!/*** SSC-EWI-0117 - SNOWFLAKE DOES NOT SUPPORT THE INTERVAL DATA TYPE IN UDF/PROCEDURE PARAMETERS, RETURN TYPES, OR VARIABLE DECLARATIONS ***/!!!)RETURNSVARCHARLANGUAGESQLEXECUTEASCALLERAS
$$
BEGINSELECT1;END;
$$;
This EWI is emitted when the --UseIntervalDatatypepreview flag is enabled and a materialized view (converted to a Snowflake Dynamic Table) references columns with INTERVAL data types. Snowflake Dynamic Tables do not support INTERVAL-typed columns. The Dynamic Table is still generated, but the EWI warns that it may fail at runtime.
For more details on how interval types are handled across languages, see the Interval Data Types translation reference.
-- Additional Params: --UseIntervalDatatypeCREATETABLE src_table (
col1 INT,
col2 INTERVALDAYTOSECOND/*** SSC-FDM-0042 - INTERVAL QUALIFIER CHANGED TO DAY TO SECOND, SNOWFLAKE DOES NOT SUPPORT MIXING YEAR TO MONTH AND DAY TO SECOND TIME PARTS. ***/);!!!RESOLVEEWI!!!/*** SSC-EWI-0118 - SNOWFLAKE DOES NOT SUPPORT INTERVAL COLUMNS IN DYNAMIC TABLES ***/!!!CREATE OR REPLACEDYNAMICTABLE mv1
--** SSC-FDM-0031 - DYNAMIC TABLE REQUIRED PARAMETERS SET BY DEFAULT **TARGET_LAG='1 day'WAREHOUSE=UPDATE_DUMMY_WAREHOUSEASSELECT
col1,
col2
FROM
src_table;
This EWI is emitted in Dynamic Table contexts when the --UseIntervalDatatypepreview flag is not enabled and a source column had an INTERVAL data type that was converted to VARCHAR. This alerts users that the column in the Dynamic Table query originally referenced an interval-typed column that lost its type during conversion.
CREATETABLE src_table (
col1 INT,
col2 VARCHAR(30)!!!RESOLVEEWI!!!/*** SSC-EWI-0036 - INTERVAL DATA TYPE CONVERTED TO VARCHAR ***/!!!);CREATE OR REPLACEDYNAMICTABLE mv1
--** SSC-FDM-0031 - DYNAMIC TABLE REQUIRED PARAMETERS SET BY DEFAULT **TARGET_LAG='1 day'WAREHOUSE=UPDATE_DUMMY_WAREHOUSEASSELECT
col1,
col2 !!!RESOLVEEWI!!!/*** SSC-EWI-0119 - INTERVAL TYPE COLUMN WAS CONVERTED TO VARCHAR ***/!!!FROM
src_table;
This EWI is generated when SnowConvert AI encounters a CREATE SEQUENCE statement with options that are not supported in Snowflake. The unsupported options (such as MINVALUE, MAXVALUE, or CYCLE) are removed during conversion because Snowflake sequences do not support them. The EWI message lists the specific options that were removed.
When a START WITH clause is not explicitly present, SnowConvert AI infers the start value from MINVALUE (for positive increments) or MAXVALUE (for negative increments) before removing those options.
!!!RESOLVEEWI!!!/*** SSC-EWI-0120 - SEQUENCE OPTIONS 'MIN VALUE, MAX VALUE' WERE REMOVED, THEY ARE NOT SUPPORTED IN SNOWFLAKE ***/!!!CREATESEQUENCE dwh.seq_tcor_party
STARTWITH23177568INCREMENTBY1NOORDER;
This EWI is emitted when a DELETE statement targets an error-logging table and includes a WHERE clause. Snowflake error tables are read-only virtual views accessible via ERROR_TABLE(<base_table>) — they cannot be deleted from selectively. The only supported operation is a full truncation via TRUNCATE ERROR_TABLE(<base_table>).
When the DELETE has no WHERE clause, SnowConvert converts it to TRUNCATE ERROR_TABLE(<base_table>) automatically. When a WHERE clause is present, that automatic conversion is not possible, so the statement is kept as-is and annotated with this EWI.
----** SSC-FDM-0050 - EXPLICIT ERROR LOGGING TABLE REMOVED; NOT REQUIRED IN SNOWFLAKE. READ ERRORS WITH 'SELECT * FROM ERROR_TABLE(ORDERS)'. **--CREATE TABLE ERR$_ORDERS (-- ORA_ERR_NUMBER$ NUMBER,-- ORA_ERR_MESG$ VARCHAR2(2000),-- ORA_ERR_ROWID$ ROWID,-- ORA_ERR_OPTYP$ VARCHAR2(2),-- ORA_ERR_TAG$ VARCHAR2(2000),-- ORDER_ID NUMBER--);!!!RESOLVEEWI!!!/*** SSC-EWI-0121 - DELETE FROM ERROR TABLE WITH WHERE CLAUSE HAS NO DIRECT SNOWFLAKE EQUIVALENT. SNOWFLAKE ERROR TABLES ONLY SUPPORT TRUNCATE VIA 'TRUNCATE ERROR_TABLE(ORDERS)'. ***/!!!DELETEFROM"ERR$_ORDERS"WHERE"ORA_ERR_TAG$"='BATCH_1';
If the goal is to clear all captured errors, replace the DELETE with TRUNCATE ERROR_TABLE(<base_table>).
If the goal is to retain only a subset of error rows, consider reading errors with SELECT * FROM ERROR_TABLE(<base_table>), filtering in application logic, and storing the relevant rows in a custom audit table.
This EWI is emitted when a SELECT from an error-logging table references a system column that has no direct equivalent in Snowflake’s ERROR_TABLE() output. SnowConvert maps well-known error system columns to their Snowflake counterparts where possible:
Oracle column
Snowflake equivalent
ORA_ERR_NUMBER$
error_code
ORA_ERR_MESG$
ERROR_METADATA:error_message
Columns that cannot be mapped — notably ORA_ERR_ROWID$, ORA_ERR_OPTYP$, and ORA_ERR_TAG$ — are preserved as quoted identifiers and annotated with this EWI. Payload columns (copied from the base table) are rewritten using IFF(IS_ARRAY(ERROR_DATA:<COL>), GET(ERROR_DATA:<COL>, 0), ERROR_DATA:<COL>).
----** SSC-FDM-0050 - ERROR LOGGING TABLE REMOVED; THIS TABLE IS NOT REQUIRED IN SNOWFLAKE. READ ERRORS WITH 'SELECT * FROM ERROR_TABLE(employees)'. **--CREATE TABLE ERR$_employees (-- ORA_ERR_OPTYP$ VARCHAR2(2),-- ORA_ERR_TAG$ VARCHAR2(2000),-- emp_id NUMBER--);SELECT"ORA_ERR_OPTYP$"!!!RESOLVEEWI!!!/*** SSC-EWI-0122 - THE ERROR LOGGING COLUMN 'ORA_ERR_OPTYP$' HAS NO DIRECT EQUIVALENT IN SNOWFLAKE'S ERROR TABLE OUTPUT. REVIEW MANUALLY. ***/!!!,"ORA_ERR_TAG$"!!!RESOLVEEWI!!!/*** SSC-EWI-0122 - THE ERROR LOGGING COLUMN 'ORA_ERR_TAG$' HAS NO DIRECT EQUIVALENT IN SNOWFLAKE'S ERROR TABLE OUTPUT. REVIEW MANUALLY. ***/!!!,IFF(IS_ARRAY(ERROR_DATA:EMP_ID),GET(ERROR_DATA:EMP_ID,0),ERROR_DATA:EMP_ID)"emp_id"FROMERROR_TABLE(employees);
Review each flagged column and determine whether the data it contained in Oracle is relevant in the migrated environment.
For ORA_ERR_OPTYP$ (operation type: I/U/D), consider querying ERROR_METADATA for contextual information, or track the operation type in application logic before the DML call.
For ORA_ERR_TAG$ (user-defined tag), the value was set in the LOG ERRORS INTO ... (<tag>) clause at DML time; there is no direct equivalent in Snowflake’s error table — store the tag value in a separate audit table if needed.
For ORA_ERR_ROWID$ (original row ROWID), Snowflake does not expose physical row addresses; remove this column reference or replace it with a logical key.