SnowConvert AI - SQL Server-Azure Synapse Issues¶
Applies to
SQL Server
Azure Synapse Analytics
Sybase
SSC-EWI-TS0001¶
User defined function body not generated
严重性¶
关键
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI appears when SnowConvert AI handles a critical exception that causes the function body not to be generated during its translation.
示例代码¶
SQL Server¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0002¶
The ANSI_PADDING OFF is not supported in Snowflake.
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
In Transact-SQL, the statement SET ANSI_PADDING OFF removes the trailing spaces in the insertion of char Data types. Since SET ANSI_PADDING OFF is not a directly configurable setting in Snowflake; SnowConvert AI will generate this EWI.
示例代码¶
SQL Server¶
Snowflake¶
Best Practices¶
Add
RTRIMto allCHAR()data type insertions to remove this issue, including ETL code.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0003¶
The ANSI_WARNINGS OFF is not supported in Snowflake.
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
In Transact-SQL, the statement SET ANSI_WARNINGS OFF disables warnings such as Division by Zero or arithmetic overflow. Since SET ANSI_WARNINGS OFF is not a directly configurable setting in Snowflake, SnowConvert AI will generate this EWI.
示例代码¶
SQL Server¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0009¶
The following transaction may contain nested transactions and this is considered a complex pattern not supported in Snowflake.
备注
Some parts in the output code are omitted for clarity reasons.
严重性¶
高
描述¶
This error is added to indicate when a transaction may contain nested transactions. In SQL Server, transactions can be nested. This means that it is possible to start a new transaction within an existing transaction. If after the first BEGIN statement, we execute another one, a new transaction will be opened and the current transaction count will be increased by one.\
On the other hand this is not supported in Snowflake, what will happen is that the second BEGIN statement will be ignored and we will still have only one transaction. For more information please refer to SQL Server Transactions (https://learn.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql?view=sql-server-ver16).
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
In Snowflake nested transactions will not cause compilation errors, they will simply be ignored. You can access the assessment reports to check if nested transactions are present.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0010¶
Common table expression in view not supported in Snowflake.
备注
Some parts in the output code are omitted for clarity reasons.
严重性¶
高
描述¶
This error is added when an invalid CTE is inside a view since views are materialized representations of queries, which means that they only define how data is retrieved and presented, not how it is manipulated.
代码示例¶
输入代码:¶
Generated Code:¶
相关 EWI¶
SSC-EWI-0021: Not supported.
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0013¶
Computed column transformed
备注
This EWI is deprecated, please refer to SSC-FDM-TS0013 documentation
严重性¶
低
描述¶
This warning is added when an SQL Server computed column is transformed to its Snowflake equivalent. It is added because, in some cases, the functional equivalence could be affected.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
No additional user actions are required; it is just informative.
Add manual changes to the not-transformed expression.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0015¶
Data type is not supported in Snowflake
严重性¶
中
描述¶
This warning is added when an SQL Server column has an unsupported type in Snowflake.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Check the Snowflake data types documentation to find an equivalent for the data type.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0016¶
Translation for ODBC Scalar function pending
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when SnowConvert AI finds an ODBC Scalar function inside the input code.
User-defined functions are not supported in ODBC Scalar Function.
代码示例¶
输入代码:¶
Generated Code:¶
相关 EWI¶
SSC-EWI-0073: Pending Functional Equivalence Review.
Best Practices¶
No additional user actions are required; it is just informative.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0017¶
Masking not supported
严重性¶
低
描述¶
This EWI is added when SnowConvert AI finds a masked column inside a CREATE TABLE statement. This functionality doesn't work by adding the option in the column declaration. Manual effort is needed to have the same behavior as SQL Server.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
SnowConvert AI is not generating MASKING POLICIES in the current version, so they have to be created manually. E.g.:
The first step is to create a masking policy administrator role.
The second one is to grant the necessary privileges to the created role.
The next step is to create the masking policy functions.
备注
For sample purposes, we are taking some examples of masking functions in SQL Server, and manually translating it into its equivalent in Snowflake.
The final step is to add the masking policy to the column that originally had the masking option in SQL Server.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0023¶
Bulk option not supported
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when some option in a BULK INSERT could not be mapped. The translated bulk options should be reflected as FILE FORMAT options.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Visit the SnowSQL CLI user guide.
If you need more support, you can email us at snowconvert-support@snowflake.com
相关 EWI¶
SSC-FDM-TS0004: PUT statement not supported on UI.
SSC-EWI-TS0024¶
Incomplete transformation for Bulk Insert
严重性¶
低
描述¶
This EWI is added when a BULK INSERT inside a stored procedure was not identified at all, so the dependencies for the complete transformation will not be generated. Also the transformed COPY INTO retrieves the file from a tempStage that needs to be created manually.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
To retrieve the file, manually create a STAGE and a FILE FORMAT.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0025¶
ERROR_SEVERITY function transformed
严重性¶
低
备注
Generate Procedures and Macros using JavaScript as the target language adding the following flag -t JavaScript or --PLTargetLanguage JavaScript
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when ERROR_SEVERITY (https://docs.microsoft.com/en-us/sql/t-sql/functions/error-severity-transact-sql?view=sql-server-ver15)built-in function is translated. By default, the function will return 16 as it is the most common severity in SQL Server. The generated UDF should retrie
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0026¶
With Delete Query turned to Create Table.
严重性¶
低
描述¶
This EWI is added when a Common Table Expression With a Delete From is transformed to a Create or Replace Table.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
No additional user actions are required.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0032¶
Bulk Insert Partially Translated
警告
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.
严重性¶
高
备注
Generate Procedures and Macros using JavaScript as the target language adding the following flag -t JavaScript or --PLTargetLanguage JavaScript
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added to a literal that was originally a concatenation, when the contained code had a BULK INSERT statement. The PUT command resulting from the BULK INSERT translation is not supported when executing code that was originally Dynamic SQL.
For this reason, the PUT command must be extracted from the output code and executed manually outside of the procedure that contains it. Keep in mind that if there are many BULK INSERT statements in Dynamic SQL sentences within the procedure, it is advised to split this procedure to be able to manually execute the corresponding PUT command for each translated BULK INSERT.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Extract the
PUTcommand that resulted from the DynamicBULK INSERTstatement, and execute it before calling the procedure.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0034¶
RETURNS clause incomplete due to missing symbols
严重性¶
高
描述¶
This EWI is added to the output code when the RETURNS TABLE clause of a CREATE FUNCTION could not be properly generated. This happens when the columns that must be specified in the resulting RETURNS TABLE clause cannot be inferred by SnowConvert AI, thus leaving the RETURNS TABLE clause empty.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
The causes for this issue may vary. Be sure to include all the objects that your code needs. If the issue persists even though the migration has access to all the necessary objects, please do contact us with information about your specific scenario.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0035¶
Declaring a Cursor Variable that it is never initialized is not supported.
严重性¶
中
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
Currently, a Cursor Variable that is declared but never initialized is not supported by Snowflake. Thus, the EWI is added, and the code commented out.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0036¶
Snowflake Scripting only supports Local Cursors.
严重性¶
中
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when Cursors other than Local Cursors are identified. Currently, Snowflake Scripting only supports Local Cursors. Thus, all Cursors are translated as Local Cursors.
代码示例¶
输入代码:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0037¶
Snowflake Scripting Cursors are non-scrollable.
严重性¶
中
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
Snowflake Scripting Cursors are non-scrollable. Currently, only FETCH NEXT is supported.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0039¶
Multiple SET Statements for the same cursor found.
严重性¶
中
描述¶
This EWI is added when multiple SET Statements for the same cursor are found; All additional SET Statements are also commented out. This happens because having multiple SET Statements for the same cursor is not valid in Snowflake Scripting.
示例代码:¶
This EWI is added when multiple SET Statements for the same cursor are found; All additional SET Statements are also commented out. This happens because having multiple SET Statements for the same cursor is not valid in Snowflake Scripting.¶
示例代码:¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0041¶
XML data type methods are not supported in Snowflake.
严重性¶
中
描述¶
This EWI is added for the following XML data type methods (https://docs.microsoft.com/en-us/sql/t-sql/xml/xml-data-type-methods?view=sql-server-ver15) that are not supported in Snowflake SQL:
Value
Query
Exist
Modify
Nodes
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Consider using UDFs to emulate the behavior of the source code
You can check this documentation (link removed) and review some possible approaches to work with XML datatypes in Snowflake.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0043¶
WITH XMLNAMESPACES is not supported in Snowflake.
严重性¶
中
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added fort the WITH XMLNAMESPACES (https://docs.microsoft.com/en-us/sql/relational-databases/xml/add-namespaces-to-queries-with-with-xmlnamespaces?view=sql-server-ver15)clause which is not supported in Snowflake SQL
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Consider using UDFs to emulate the behavior of the source code. The following code provides suggestions of UDFs that can be used to achieve recreating the original behavior:
SQL Server¶
Snowflake SQL¶
If you need more support, you can email us at snowconvert-support@snowflake.com
相关 EWI¶
SSC-PRF-TS0001: Performance warning - recursion for CTE not checked. Might require a recursive keyword.
SSC-EWI-TS0044: FOR XML clause is not supported in Snowflake.
SSC-EWI-TS0015: Data type not supported in Snowflake
SSC-EWI-TS0044¶
FOR XML clause is not supported in Snowflake.
严重性¶
关键
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added for the FOR XML (https://docs.microsoft.com/en-us/sql/relational-databases/xml/for-xml-sql-server?view=sql-server-ver15)clause which is not supported in Snowflake SQL
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Consider using UDFs to emulate the behavior of the source code. The following code provides suggestions of UDFs that can be used to achieve recreating the original behavior:
SQL Server
Query¶
Result¶
Snowflake¶
Query¶
Result¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0045¶
Labeled Statement is not supported in Snowflake Scripting.
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added for all the LABELS used with the GOTO (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/goto-transact-sql?view=sql-server-ver15)statement in SQL Server.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
相关 EWI¶
SSC-EWI-0073: Pending Functional Equivalence Review.
SSC-EWI-TS0046¶
System table is not supported in Snowflake.
严重性¶
中
描述¶
This EWI is added when referencing SQL Server system tables (https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/object-catalog-views-transact-sql?view=sql-server-ver15) not supported or without equivalent in Snowflake SQL. See the supported and unsupported system tables reference for the complete list.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0047¶
RAISERROR Error Message may differ because of the SQL Server string format.
备注
This EWI is deprecated, please refer to SSC-FDM-TS0019 documentation
严重性¶
低
描述¶
This EWI is added to notify that the RAISERROR Error Message may differ because of the SQL Server string format.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0049¶
Multiple Line If Body translation planned to be delivered in the future.
备注
Some parts in the output code are omitted for clarity reasons.
严重性¶
中
描述¶
Most of the cases inIF statements that contain a Begin ... End block inside their body are supported. This is a successful scenario (no SSC-EWI-TS0049 generated).
代码示例¶
输入代码:¶
Generated Code:¶
备注
In a general code example (Like the on top) the conversion is done successfully. But there are some edge cases where the "IF" statement is not converted and the EWI will be generated.
手动支持¶
情况 1:单个语句¶
For these cases, the transformation would be straightforward, since the transformed statement would appear in a select clause
情况 2:多个语句¶
For cases in which multiple statements are being transformed, we should transform the N Statement, and use it as the source table for the N+1 Statement.
情况 3:多组语句¶
For these cases, it will be necessary to replicate a transformation for each set statement.
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0055¶
Default constraint was commented out and may have been added to a table definition.
备注
This EWI is deprecated, please refer to SSC-FDM-TS0020 documentation.
严重性¶
中
描述¶
This EWI is added when the default constraint is present in an Alter Table statement.
Currently, there is no support for that constraint. A workaround available to transform it, is when the table is previously defined to the Alter Table, in this way we identify the references, and the default constraint is unified on the table definition; otherwise, the constraint is only commented out.
代码示例¶
输入代码:¶
Generated Code:¶
备注
If all the content of the Alter Table is invalid, the Alter Table will be commented out.
已知问题¶
When different default constraints are declared over the same column, only the first will be reflected on the Create Table Statement.
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0056¶
A MASKING POLICY was created as a substitute for MASKED WITH.
备注
This EWI is deprecated, please refer to SSC-FDM-TS0021 documentation
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when the Alter Table statement contains a MASKED WITH clause. The reason this is added is to inform that an approximate MASKING POLICY was created as a substitute for the MASKED WITH function.
代码示例¶
输入代码:¶
Generated Code:¶
备注
The MASKING POLICY will be created previous to the ALTER TABLE statement. And it is expected to have and approximate behaviour. Some tweaks might be needed in regards to roles and user privileges. <!-- TODO: You can relate to Broken link broken-reference "mention" for further details.>
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0057¶
The user must previously define the masking role.
备注
This EWI is deprecated, please refer to SSC-FDM-TS0022 documentation
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This is EWI occurs when a MASKING POLICY is created and a role or privilege must be linked to it so the data masking could work properly.
代码示例¶
输入代码¶
Generated Code:¶
备注
As shown on line 6, there is a placeholder where the defined roles can be placed. There is room for one or several values separated by commas. Also, here, the use of single quotes is mandatory for each of the values.
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0060¶
Datetime interval not supported by Snowflake.
严重性¶
中
描述¶
This EWI is added when one of the following time parts is used as a parameter for a date-related function because they are not supported in Snowflake. For more information go to 'supported date time parts (Date & Time Functions | Snowflake Documentation).
代码示例¶
输入代码¶
Generated Code:¶
Best Practices¶
An UDF could be created to manually extract unsupported time parts in Snowflake.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0061¶
ALTER COLUMN not supported
严重性¶
中
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added whenever there is an unsupported ALTER COLUMN statement
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0063¶
Time zone not supported in Snowflake.
严重性¶
关键
描述¶
This EWI is added when there are Time zones that are not supported in Snowflake
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
A user defined function can be created to support multiple timezones.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0067¶
Invalid parameters in OPENXML table-valued function.
严重性¶
Critical
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when there are invalid parameters in the OPENXML, specifically when the XML path cannot be accessed.
To avoid this EWI, please send the explicit node path through the parameters.
输入代码:¶
Generated Code:¶
输入代码(显式参数)¶
Generated Code (Explicit parameter)¶
Best Practices¶
Try to see if the path can be explicitly passed as a parameter.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0070¶
CURRENT_TIMESTAMP in At Time Zone statement may have a different behavior in certain cases.
备注
This EWI is deprecated, please refer to SSC-FDM-TS0024 documentation.
描述¶
This EWI is added when the At Time Zone has the CURRENT_TIMESTAMP. This is because the result may have different results in some instances.
The main difference is that in SQL Server, CURRENT_TIMESTAMP returns the current system date and time in the server time zone and in Snowflake CURRENT_TIMESTAMP returns the current date and time in the UTC (Coordinated Universal Time) time zone.
输入代码:¶
Sql Server¶
Result¶
2024-02-08 16:52:55.317 -10:00
Generated Code:¶
Snowflake¶
Result¶
2024-02-08 06:53:46.994 -1000
Best Practices¶
This is an example if you want to keep the same format in Snowflake.
SQL Server¶
Result¶
2024-02-08 16:33:49.143 -10:00
In Snowflake you can use ALTER SESSION to change the default time zone. For example:
Snowflake¶
Result¶
2024-02-08 16:33:49.143
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0072¶
RETURN statement will be ignored due to previous RETURN statement
严重性¶
Low
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added when SELECT statements and OUPUT parameters should be returned. In this case, the resultsets from the SELECT statements are prioritized.
输入代码:¶
Generated Code:¶
Best Practices¶
Remove the RETURN statement that should be ignored.
If you need more support, you can email us at snowconvert-support@snowflake.com
相关 EWI¶
SSC-FDM-0020: Multiple result sets are returned in temporary tables;
SSC-EWI-TS0073¶
Error message could be different in snowflake
备注
This EWI is deprecated, please refer to SSC-FDM-TS0023 documentation
严重性¶
低
描述¶
This EWI is added in the transformation of ERROR_MESSAGE(). The exact message of the error could change in Snowflake.
输入代码:¶
Generated Code¶
建议¶
If you need more support, you can email us at snowconvert-support@snowflake.com.
SSC-EWI-TS0074¶
Cast result may be different from TRY_CAST/TRY_CONVERT function due to missing dependencies
严重性¶
低
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
This EWI is added in the transformation of TRY_CAST and TRY_CONVERT functions. The exact result of these functions may change in Snowflake due to missing dependencies (SnowConvert AI couldn't resolve some data types). This could be because the dependency was not in the source code.
输入代码:¶
Generated Code¶
建议¶
If you need more support, you can email us at snowconvert-support@snowflake.com.
SSC-EWI-TS0075¶
Built In Procedure Not Supported
严重性¶
中
描述¶
Translation for built-in procedures is not currently supported.
示例代码¶
输入代码:¶
Generated Code:¶
Best Practices¶
No end-user actions are required.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0076¶
Default Parameters May Need To Be Reordered
备注
This EWI is deprecated. SnowConvert AI now automatically reorders default parameters to the end of the parameter list. Please refer to SSC-FDM-0041 for the updated behavior.
严重性¶
中
描述¶
Default parameters may need to be reordered. Snowflake only supports default parameters at the end of the parameters declarations.
示例代码¶
输入代码:¶
Generated Code:¶
Best Practices¶
No end-user actions are required.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0077¶
Collation Not Supported
严重性¶
低
描述¶
This message is shown when there is a collate clause that is not supported in Snowflake.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
No additional user actions are required.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0078¶
Default value not allowed in Snowflake.
严重性¶
中
描述¶
This error is added to the code when expressions like function calls, variable names, or named constants follow the default option.
Snowflake only supports explicit constants like numbers or strings.
代码示例¶
输入代码:¶
Generated Code:¶
¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0079¶
Database console command is not supported
严重性¶
中
描述¶
This EWI is added when SnowConvert AI finds a DBCC statement inside the input code.
Most DBCC statements are not supported in Snowflake.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
No additional user actions are required; it is just informative.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0080¶
Changing the execution context at runtime is not supported in Snowflake
严重性¶
高
描述¶
Users in SQL Server can use the command EXECUTE AS to temporarily change the execution context, this modifies the execution privileges and affects the results of context-dependent functions like USER_NAME(). The REVERT command can be used to restore the context previous to the last EXECUTE AS.
Snowflake only supports the definition of an execution context in procedures, using either the CREATE PROCEDURE or ALTER PROCEDURE statements. Changing the context at runtime is not supported.
代码示例¶
输入代码:
输出代码:
Best Practices¶
Refactor the code so it works without having to switch the context.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0081¶
Using a full join in a delete statement is not supported
描述¶
When transforming the DELETE statement, SnowConvert AI extracts the table references found in the FROM clause of the statement and moves them to the USING clause of the Snowflake delete statement.
The following EWI warns the user about the limitations of the outer join (+) syntax in Snowflake. To preserve the LEFT and RIGHT JOINs used in the original code, outer join syntax (+) is added to the conditions to indicate such behavior. However, in Snowflake, the (+) syntax can't be used to indicate FULL JOINs. For more information, see Joins in the WHERE clause.
Example code¶
Input Code :¶
Generated Code:¶
Best Practices¶
Check the logic of your FULL JOIN, it might be possible to rewrite it as other type of JOIN. For example, the code included in the example code is essentially the same as a LEFT JOIN:
Input:
Output:
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0082¶
CROSS APPLY has been converted to LEFT OUTER JOIN and requires manual validation.
描述¶
Manual validation is required because the conversion from CROSS APPLY to LEFT OUTER JOIN can lead to incorrect results or unexpected behavior in Snowflake. While the two functions might seem similar, they handle certain situations differently, especially when the subquery has no matches or the subquery is correlated with the outer table.
Example code¶
Setup Data¶
Input Code :¶
Generated Code:¶
Best Practices¶
Key Scenarios Where LEFT OUTER JOIN May Fail¶
Filtering Behavior: If the original
CROSS APPLYwas intended to filter out rows from the main table that have no matches in the subquery, aLEFT OUTER JOINwill not replicate this behavior. Instead, it will include those rows withNULLvalues for the joined columns, which may not be the intended result.Correlated Subqueries:
CROSS APPLYis specifically designed to support correlated subqueries, where the subquery references columns from the outer query. A standardLEFT OUTER JOINdoes not support this pattern in the same way. Attempting to convert a correlatedCROSS APPLYto aLEFT OUTER JOINcan lead to syntax errors, Cartesian products (duplicate rows), or logically incorrect results.Result Set Differences: The semantics of
CROSS APPLYandLEFT OUTER JOINdiffer, especially when the subquery returns no rows.CROSS APPLYwill exclude such rows from the result, whileLEFT OUTER JOINwill include them withNULLvalues.
Recommendation: Always review and test the output of queries where CROSS APPLY has been converted to LEFT OUTER JOIN to ensure correctness.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0083¶
Error Message¶
ROLLBACK TRANSACTION requires the appropriate setup to work as intended.
严重性¶
Low
描述¶
This EWI is generated when a ROLLBACK TRANSACTION statement is encountered, indicating that SnowConvert has successfully transformed the statement into a Snowflake-compatible format. However, the transformation requires manual verification because Snowflake's transaction rollback behavior differs significantly from SQL Server's ROLLBACK TRANSACTION functionality.
示例代码¶
Input (SQL Server):¶
Output (Snowflake Scripting):¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0085¶
INSERT WITH EXECUTE statement requires manual review.
严重性¶
中
描述¶
This issue is generated when SnowConvert AI encounters an INSERT ... EXECUTE statement that cannot be automatically transformed. In SQL Server, INSERT ... EXEC inserts the result set of a stored procedure or dynamic SQL into a table. Snowflake does not support this syntax directly. When the statement appears at the top level (outside a stored procedure), SnowConvert AI cannot apply its standard transformation pattern and flags the statement for manual review.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Rewrite the logic using Snowflake Scripting: call the procedure separately, capture its result with
RESULT_SCAN(LAST_QUERY_ID()), and thenINSERT INTO ... SELECTfrom the result set.If the procedure returns a fixed schema, consider using a temporary table or
TABLE()function to capture the output.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0086¶
OPENQUERY is not supported in Snowflake.
严重性¶
高
描述¶
This issue is generated when SnowConvert AI encounters an OPENQUERY function. In SQL Server, OPENQUERY executes a pass-through query on a linked server and returns the result as a table. Snowflake does not have an equivalent linked server or OPENQUERY mechanism. The statement is preserved as-is with an EWI marker for manual migration.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Replace
OPENQUERYwith Snowflake external tables, external stages, or data sharing to access data from external sources.If the linked server points to another database, consider migrating that data into Snowflake or using Snowflake's connector ecosystem (e.g., Snowflake Connector for Oracle).
For real-time access patterns, evaluate Snowflake External Network Access or External Functions.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0087¶
GOTO is not supported in Snowflake.
严重性¶
高
描述¶
This issue is generated when SnowConvert AI encounters a GOTO statement inside a stored procedure. SQL Server supports GOTO for unconditional jumps to labeled statements within a procedure. Snowflake Scripting does not support GOTO or labeled jump targets. The GOTO statement is preserved with an EWI marker, and the associated labels also receive a separate EWI (SSC-EWI-TS0045).
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Refactor
GOTO-based control flow into structured constructs such asIF/ELSE,CASE,LOOP, or by splitting the procedure into smaller procedures.For simple pass/fail patterns like the example above, replace the
GOTOlogic with anIF/ELSEIF/ELSEblock.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0088¶
Unsupported sequence options were removed during conversion.
严重性¶
低
描述¶
This issue is generated when SnowConvert AI encounters a CREATE SEQUENCE statement with options that are not supported in Snowflake, such as MINVALUE, MAXVALUE, or CYCLE. These options are removed during conversion because Snowflake sequences only support START WITH and INCREMENT BY. The EWI message lists the specific options that were removed.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If your application relies on
CYCLEbehavior, implement a wrapper UDF that resets the sequence value when it exceeds a threshold.If
MINVALUEorMAXVALUEbounds are critical, add application-level validation or a Snowflake task to monitor sequence values.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0089¶
SET statement is not supported in Snowflake.
严重性¶
低
描述¶
This issue is generated when SnowConvert AI encounters a SET statement that changes a session option not supported in Snowflake and whose non-default value cannot be replicated. For example, SET CONCAT_NULL_YIELDS_NULL OFF changes SQL Server's NULL concatenation behavior, but Snowflake always treats NULL || value as NULL (equivalent to CONCAT_NULL_YIELDS_NULL ON). Similarly, SET NUMERIC_ROUNDABORT ON raises errors on precision loss, which Snowflake does not support. The original statement is preserved with an EWI marker.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Review the downstream code that depends on this
SEToption. ForCONCAT_NULL_YIELDS_NULL OFF, replaceNULLconcatenation patterns with explicitNVL()orCOALESCE()calls to handle NULL values.For
NUMERIC_ROUNDABORT ON, add explicit rounding or precision checks in the application logic.If you need more support, you can email us at snowconvert-support@snowflake.com
Related EWIs¶
SSC-FDM-TS0037: SET statement with equivalent default behavior in Snowflake (e.g.,
SET CONCAT_NULL_YIELDS_NULL ON).
SSC-EWI-TS0090¶
Agent Job step uses an unsupported subsystem and requires manual migration.
严重性¶
中
描述¶
This issue is generated when SnowConvert AI encounters a SQL Server Agent Job step that uses a subsystem other than TSQL or SSIS (e.g., CmdExec, PowerShell, ANALYSISCOMMAND). These subsystems execute operating system commands or external tools that have no direct equivalent in Snowflake. The original sp_add_jobstep call is preserved with an EWI marker, and the step is not included in the generated Snowflake Task orchestration.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
For
CmdExecorPowerShellsteps, evaluate whether the logic can be rewritten as a Snowflake stored procedure, external function, or Snowflake task with a SQL body.For SSIS steps, use SnowConvert AI's built-in ETL-to-dbt migration, which automatically generates orchestrator stored procedures.
Consider using Snowflake External Functions or Snowpark for operations that require external compute.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0091¶
Agent Job notification procedure requires manual setup of a Snowflake notification integration.
严重性¶
中
描述¶
This issue is generated when SnowConvert AI encounters a SQL Server Agent notification procedure such as sp_send_dbmail, sp_notify_operator, or similar email/alert procedures within an Agent Job context. These procedures rely on SQL Server's Database Mail or Operator subsystem, which has no direct equivalent in Snowflake. A Snowflake notification integration must be manually configured to replicate this functionality.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Set up a Snowflake Notification Integration with an email provider or cloud messaging service (AWS SNS, Azure Event Grid, GCP Pub/Sub).
Use
SYSTEM$SEND_EMAIL()in Snowflake to send email notifications from stored procedures and tasks.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0092¶
Agent Job procedure references a dynamic job name that cannot be resolved statically.
严重性¶
中
描述¶
This issue is generated when SnowConvert AI encounters an Agent Job management procedure (sp_start_job, sp_stop_job, sp_delete_job, sp_update_job) where the @job_name parameter is a variable rather than a string literal. Because the job name cannot be resolved at conversion time, SnowConvert AI cannot determine which Snowflake Task to reference. The original statement is preserved with an EWI marker for manual resolution.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
If the job name is known at design time, replace the variable with a string literal so SnowConvert AI can resolve it to the corresponding Snowflake Task (e.g.,
EXECUTE TASK TASK_ETL_DAILY_LOAD).If the job name is truly dynamic, use
EXECUTE IMMEDIATEto build theEXECUTE TASKorALTER TASKstatement dynamically in Snowflake Scripting.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0093¶
Agent Job procedure is not supported.
严重性¶
低
描述¶
This issue is generated when SnowConvert AI encounters a SQL Server Agent Job system procedure that does not have a supported translation to Snowflake. This includes procedures like sp_update_jobstep, sp_add_jobserver, and sp_update_job (when used without the @enabled parameter). These procedures manage Agent Job metadata that has no equivalent in Snowflake's Task framework. The original statement is preserved with an EWI marker.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Review whether the procedure's functionality is still needed in the Snowflake environment. Many Agent Job metadata operations (renaming steps, assigning servers) are not applicable in Snowflake's Task model.
If the procedure modifies job scheduling or enablement, use
ALTER TASKin Snowflake instead.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0094¶
Error Message¶
WAITFOR DELAY variable may contain a time string incompatible with SYSTEM$WAIT.
严重性¶
Medium
描述¶
This EWI is generated when a WAITFOR DELAY statement uses a variable or parameter expression instead of a literal time value. The statement is transformed to CALL SYSTEM$WAIT(), which expects a numeric value representing seconds (or milliseconds). However, the variable may hold a time string in 'HH:MM:SS' format, which is incompatible with SYSTEM$WAIT.
For more information about SYSTEM$WAIT, see the Snowflake documentation.
代码示例¶
输入代码:¶
Generated Code:¶
Best Practices¶
Ensure the variable passed to
SYSTEM$WAITcontains a numeric value in seconds, not a time string in'HH:MM:SS'format.If the variable holds a time string, convert it to seconds before passing it to
SYSTEM$WAIT.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0095¶
SCOPE_IDENTITY() called without a preceding INSERT to an identity table in the same scope.
严重性¶
High
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
SnowConvert AI was unable to determine the target table for SCOPE_IDENTITY(). No preceding INSERT to an identity table found in the same scope.
This EWI is generated when SCOPE_IDENTITY() is called without a preceding INSERT statement to a table with an IDENTITY column in the same procedural scope. In SQL Server, SCOPE_IDENTITY() returns the last identity value inserted in the current scope, but without a detectable INSERT, SnowConvert AI cannot generate the appropriate time-travel query.
The function call is kept as-is with this EWI, requiring manual review to determine the correct implementation.
代码示例¶
Input Code (SQL Server):¶
Generated Code (Snowflake):¶
Best Practices¶
Review the stored procedure logic to identify where the INSERT statement occurs
If the INSERT is in a different scope (e.g., nested block), refactor the code to make the INSERT detectable
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0096¶
SCOPE_IDENTITY() references a table that cannot be resolved in the symbol table.
严重性¶
High
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
SnowConvert AI was unable to resolve the target table for SCOPE_IDENTITY(). Missing table definition.
This EWI is generated when SCOPE_IDENTITY() follows an INSERT statement, but the target table cannot be resolved in the symbol table. This may occur when:
The table is defined in an external file not included in the conversion
The table name uses dynamic SQL or is otherwise unresolvable
The table definition is missing or incomplete
Without a resolvable table reference, SnowConvert AI cannot determine which identity column to query in the generated time-travel query.
代码示例¶
Input Code (SQL Server):¶
Generated Code (Snowflake):¶
Best Practices¶
Ensure all table definitions are included in the conversion input
Verify that the table name in the INSERT statement matches the table definition
If the table is external, provide the schema definition or manually implement the identity retrieval logic
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0097¶
SCOPE_IDENTITY() references a table without an identifiable identity column.
严重性¶
High
备注
Some parts of the output code are omitted for clarity reasons.
描述¶
SnowConvert AI was unable to identify the identity column for SCOPE_IDENTITY(). Missing column definition.
This EWI is generated when SCOPE_IDENTITY() follows an INSERT statement to a table that exists in the symbol table but does not have an IDENTITY column defined. In SQL Server, SCOPE_IDENTITY() only returns values for tables with identity columns. Without an identifiable identity column, SnowConvert AI cannot generate the appropriate MAX(identity_column) query for the time-travel transformation.
代码示例¶
Input Code (SQL Server):¶
Generated Code (Snowflake):¶
Best Practices¶
Verify that the table definition includes an IDENTITY column specification
If the table should have an identity column, add the IDENTITY constraint to the CREATE TABLE statement before conversion
If the table should not use SCOPE_IDENTITY(), refactor the code to use a different method for retrieving the inserted ID
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-TS0098¶
CONVERT with a non-literal style cannot be mapped to a Snowflake format string.
严重性¶
Medium
描述¶
This EWI is generated when the third argument of CONVERT is a variable or expression instead of a literal style code. SnowConvert AI can map literal style values to Snowflake format strings for TO_DATE and TO_TIMESTAMP, but when the style is dynamic it cannot determine the correct format at conversion time. In those cases SnowConvert AI falls back to CAST.
代码示例¶
Input Code (SQL Server):¶
Generated Code (Snowflake SQL):¶
Best Practices¶
Replace the dynamic style argument with a known literal format whenever possible.
If the style varies at runtime, rewrite the expression manually using the correct
TO_DATE,TO_TIMESTAMP, or conditional logic in Snowflake.If you need more support, you can email us at snowconvert-support@snowflake.com