MSCEWI2025

Output format not supported.

Severity

Low

Description

This warning appears when a CAST function specifies a specific output format and is not supported by Snowflake.

Code Example

Input:

CREATE TABLE SAMPLE_TABLE
(
VARCHAR_TYPE VARCHAR,
CHAR_TYPE CHAR(11),
INTEGER_TYPE INTEGER,
DATE_TYPE DATE,
TIMESTAMP_TYPE TIMESTAMP,
TIME_TYPE TIME,
PERIOD_TYPE PERIOD(DATE)
);
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)'),
CAST('01-12-2020' AS DATE FORMAT 'dd-mm-yyyy')
FROM SAMPLE_TABLE;

Output:

CREATE TABLE PUBLIC.SAMPLE_TABLE
(
VARCHAR_TYPE VARCHAR,
CHAR_TYPE CHAR(11),
INTEGER_TYPE INTEGER,
DATE_TYPE DATE,
TIMESTAMP_TYPE TIMESTAMP,
TIME_TYPE TIME,
PERIOD_TYPE VARCHAR(24) COMMENT 'PERIOD(DATE)' /*** MSC-WARNING - MSCEWI1036 - PERIOD DATA TYPE "PERIOD(DATE)" CONVERTED TO VARCHAR ***/
);
CREATE OR REPLACE VIEW PUBLIC.SAMPLE_VIEW
AS
SELECT
TO_NUMBER(VARCHAR_TYPE, '999.00000', 38, 10) /*** MSC-WARNING - MSCEWI2025 - OUTPUT FORMAT 'ZZZ.ZZZZZ' NOT SUPPORTED. ***/,
TO_TIME('01:02.030405', 'MI:SS.FF6') /*** MSC-WARNING - MSCEWI2025 - OUTPUT FORMAT 'MI:SS.S(6)' NOT SUPPORTED. ***/,
TO_DATE('01-12-2020', 'DD-MM-YYYY') /*** MSC-WARNING - MSCEWI2025 - OUTPUT FORMAT 'dd-mm-yyyy' NOT SUPPORTED. ***/
FROM PUBLIC.SAMPLE_TABLE;

Recommendations

  • Take a look if the output code has functional equivalence with the original code.

  • For more support, you can email us at [email protected] or post a message to our forums. If you have a contract for support with Mobilize.Net, reach out to your sales engineer and they can direct your support needs.