WITH DEFAULT
Translation reference to convert Teradata WITH DEFAULT clause in column definitions to Snowflake
Last updated
Translation reference to convert Teradata WITH DEFAULT clause in column definitions to Snowflake
Last updated
Some parts in the output code are omitted for clarity reasons.
Teradata's WITH DEFAULT
clause sets a system-default value to columns that are inserted with no values. This value is typically the equivalent of zero or empty.
The following table shows Teradata's data types, their corresponding type in Snowflake, and the default value to be set if supported.
Teradata | Snowflake | Default Value |
---|---|---|
As shown in the table in the description table, some types are not supported and no default value will be set when transforming the WITH DEFAULT
clause.
SSC-EWI-0021: Not Supported in Snowflake.
SSC-EWI-0036: Data type converted to another data type.
BLOB[(n)]
BYTE
NOT SUPPORTED
BYTE[(n)]
BYTE
NOT SUPPORTED
VARBYTE[(n)]
BYTE
NOT SUPPORTED
BIGINT
BIGINT
0
BYTEINT
BYTEINT
0
DECIMAL [(n[,m])]
DECIMAL
0
DOUBLE PRECISION
DOUBLE PRECISION
0
FLOAT
FLOAT
0
INTEGER
INTEGER
0
NUMBER(n[,m])
NUMBER
0
NUMBER[(*[,m])]
NUMBER
0
NUMERIC [(n[,m])]
NUMERIC
0
REAL
REAL
0
SMALLINT
SMALLINT
0
DATE
DATE
CURRENT_DATE
TIME [(n)]
TIME
CURRENT_TIME
TIMESTAMP [(n)]
TIMESTAMP
CURRENT_TIMESTAMP
TIMESTAMP WITH TIME ZONE
TIMESTAMP_TZ
LOCALTIMESTAMP
INTERVAL DAY [(n)]
VARCHAR(21)
'0DAY'
INTERVAL DAY [(n)] TO HOUR
VARCHAR(21)
'0DAY'
INTERVAL DAY [(n)] TO MINUTE
VARCHAR(21)
'0DAY'
INTERVAL DAY [(n)] TO SECOND
VARCHAR(21)
'0DAY'
INTERVAL HOUR [(n)]
VARCHAR(21)
'0HOUR'
INTERVAL HOUR [(n)] TO MINUTE
VARCHAR(21)
'0HOUR'
INTERVAL HOUR [(n)] TO SECOND
VARCHAR(21)
'0HOUR'
INTERVAL MINUTE [(n)]
VARCHAR(21)
'0MINUTE'
INTERVAL MINUTE [(n)] TO SECOND [(m)]
VARCHAR(21)
'0MINUTE'
INTERVAL MONTH
VARCHAR(21)
'0MONTH'
INTERVAL SECOND [(n,[m])]
VARCHAR(21)
'0SECOND'
INTERVAL YEAR [(n)]
VARCHAR(21)
'0YEAR'
INTERVAL YEAR [(n)] TO MONTH
VARCHAR(21)
'0YEAR'
CHAR[(n)]
CHAR
''
CHARACTER(n) CHARACTER SET GRAPHIC
-
NOT SUPPORTED
CLOB
-
NOT SUPPORTED
CHAR VARYING(n)
VARCHAR
''
LONG VARCHAR
-
NOT SUPPORTED
LONG VARCHAR CHARACTER SET GRAPHIC
-
NOT SUPPORTED
VARCHAR(n)
VARCHAR
''
VARCHAR(n) CHARACTER SET GRAPHIC
-
NOT SUPPORTED
PERIOD(DATE)
VARCHAR(24)
NOT SUPPORTED
PERIOD(TIME [(n)])
VARCHAR(24)
NOT SUPPORTED
PERIOD(TIMESTAMP [(n)])
VARCHAR(24)
NOT SUPPORTED