SSC-FDM-0012

Constraint in default expression is not supported.

Description

This message is added when there is a Constraint constraintName used in a default expression of a Column Definition. Since Constraint in Snowflake is not supported when used in a default expression, it is removed along with its constraintName and a warning is added.

Example Code

Input Code

IN -> SqlServer_01.sql
CREATE TABLE TABLE1 ( 
COL1 VARCHAR (10) CONSTRAINT constraintName DEFAULT ('0') NOT NULL 
);

Output Code

OUT -> SqlServer_01.sql
CREATE OR REPLACE TABLE TABLE1 (
COL1 VARCHAR(10)
                 --** SSC-FDM-0012 - CONSTRAINT IN DEFAULT EXPRESSION IS NOT SUPPORTED IN SNOWFLAKE **
                 DEFAULT ('0') NOT NULL
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"transact"}}'
;

Recommendations

Last updated