SSC-EWI-0012

Severity

High

Description

This error appears when there is an unexpected end of the statement in the source code

Example Code

Input Code:

IN -> Teradata_01.sql
CREATE VOLATILE SET TABLE VOLATILETABLE
(
    COL1                    INTEGER,
    COL2                    INTEGER,
    COL3                    INTEGER
)
ON COMMIT PRESERVE ROWS;
UPDATE TABLE2 as T2
SET T2.COL1 + VOLATILETABLE.COL1
WHERE T2.COL2 = VOLATILETABLE.COL2
    AND T2.COL3 = VOLATILETABLE.COL3
    AND     T2.COL4 = ( SELECT MAX(T3.COL1) 
                                   FROM
                                   TABLE3 T3
                                   WHERE T3.COL1 = T2.COL1);

Output Code:

OUT -> Teradata_01.sql
--** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
CREATE OR REPLACE TEMPORARY TABLE VOLATILETABLE
(
    COL1 INTEGER,
    COL2 INTEGER,
    COL3 INTEGER
)
--    --** SSC-FDM-0008 - ON COMMIT NOT SUPPORTED **
--ON COMMIT PRESERVE ROWS
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"teradata"}}'
;

--** SSC-FDM-0007 - MISSING DEPENDENT OBJECTS "TABLE2", "TABLE3" **
UPDATE TABLE2 AS T2
    SET
        --** SSC-FDM-0025 - UNEXPECTED END OF STATEMENT. PLEASE CHECK THE LINE 9 OF ORIGINAL SOURCE CODE. **
        T2.COL1 + VOLATILETABLE.COL1
    FROM
        VOLATILETABLE
        WHERE T2.COL2 = _VOLATILETABLE.COL2
            AND T2.COL3 = _VOLATILETABLE.COL3
            AND     T2.COL4 = (
                SELECT
                    MAX(T3.COL1)
                                                  FROM
                    TABLE3 T3
                                                  WHERE T3.COL1 = T2.COL1);

Recommendation

  • Check if the source code is incomplete or if the statement that is being converted ends correctly.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated