MSCEWI4048

Alter Table translation planned to be delivered in the future.

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

Severity

Medium

Description

This EWI is added when SnowConvert detects instances of ALTER TABLE statements. The ALTER TABLE is supported by Snowflake, but its transformation is not supported by SnowConvert at this moment. This kind of statements should be migrated manually if there are ocurrences in the source code.

Code Example

Input Code:

ALTER TABLE MyTable ALTER COLUMN NullCOl NVARCHAR(20) NOT NULL;

Output Code:

-- ** MSC-ERROR - MSCEWI4048 - TRANSLATION FOR ALTER TABLE IS PLANNED TO BE DELIVERED IN THE FUTURE **
--ALTER TABLE PUBLIC.MyTable
--ALTER COLUMN NullCOl VARCHAR(20) NOT NULL;

Recommendations

  • Use a regular expression in order to match the ALTER TABLE pattern and remove the invalid syntax in Snowflake. For example:

ALTER\s+TABLE\s+(.*?)\s*ADD\s+CONSTRAINT(.*?)DEFAULT(.*)FOR\s+(.*)

Last updated