SSC-EWI-TD0025

Output format not supported.

Severity

Low

Description

This EWI appears when a CAST function specifies an output format not supported by Snowflake scripting.

Code Example

Teradata:

IN -> Teradata_01.sql
CREATE TABLE SAMPLE_TABLE
(
    VARCHAR_TYPE VARCHAR
);

REPLACE VIEW SAMPLE_VIEW 
AS
SELECT
CAST(VARCHAR_TYPE AS FLOAT FORMAT 'ZZZ.ZZZZZ'),
CAST('01:02.030405' AS TIME(1) WITH TIME ZONE FORMAT 'MI:SS.S(6)')
FROM SAMPLE_TABLE;

Snowflake Scripting:

OUT -> Teradata_01.sql
CREATE OR REPLACE TABLE SAMPLE_TABLE
(
    VARCHAR_TYPE VARCHAR
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": {  "major": 0,  "minor": 0,  "patch": "0" }, "attributes": {  "component": "teradata",  "convertedOn": "03/03/2025",  "domain": "test" }}'
;

CREATE OR REPLACE VIEW SAMPLE_VIEW
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": {  "major": 0,  "minor": 0,  "patch": "0" }, "attributes": {  "component": "teradata",  "convertedOn": "03/03/2025",  "domain": "test" }}'
AS
SELECT
    TO_NUMBER(VARCHAR_TYPE, '999.00000', 38, 10) !!!RESOLVE EWI!!! /*** SSC-EWI-TD0025 - OUTPUT FORMAT 'ZZZ.ZZZZZ' NOT SUPPORTED. ***/!!!,
    TO_TIME('01:02.030405', 'MI:SS.FF6') !!!RESOLVE EWI!!! /*** SSC-EWI-TD0025 - OUTPUT FORMAT 'MI:SS.S(6)' NOT SUPPORTED. ***/!!!
    FROM
    SAMPLE_TABLE;

Recommendations

Last updated