Teradata

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Teradata Unsupported Cases

1. Continue Mode Handler

The CONTINUE HANDLER in Teradata allows the execution to be resumed after an error happens. Unfortunately, this functionality is not supported in Snowflake.

Input Code:

DECLARE CONTINUE HANDLER FOR ERROR_EXISTS
    INSERT INTO DATAWAREHOUSE.PUBLIC.Proc_Error_Table
        VALUES ('spSample4', 'Failed to Insert Row');

Output Code:

/*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'CONTINUE MODE HANDLER' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
/*	DECLARE CONTINUE HANDLER FOR ERROR_EXISTS
      	INSERT INTO DATAWAREHOUSE.PUBLIC.Proc_Error_Table 
            VALUES ('spSample4', 'Failed to Insert Row');*/

2. Dynamic Result Sets

In Teradata, the Dynamic Result Sets are used to return a range of 0 to 15 (inclusive) result sets from a single procedure. This behavior is not supported by Snowflake Scripting since Snowflake Scripting only allows to return one result set per procedure. The Dynamic Result Sets declarations are commented out during the translation.

Input Code:

REPLACE PROCEDURE SampleProcedure()
DYNAMIC RESULT SETS 2
BEGIN 
   -- Procedure body
END;

Output Code:

CREATE OR REPLACE PROCEDURE PUBLIC.SampleProcedure ()
RETURNS VARCHAR
-- ** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'DYNAMIC RESULT SETS' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING **
--DYNAMIC RESULT SETS 2
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
   -- Procedure body
$$;

3. Out Parameters

In Teradata, the OUT Parameters are used to return values thru the parameters. This behavior is not supported by Snowflake Scripting.

Input Code:

REPLACE PROCEDURE SampleProcedure (OUT Param1 VARCHAR) 
BEGIN
 -- Procedure body
END;

Output Code:

CREATE OR REPLACE PROCEDURE PUBLIC.SampleProcedure (/*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'OUT PARAMETERS' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
Param1 STRING)
RETURNS VARCHAR
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
   BEGIN
      -- Procedure body
   END;
$$;

Last updated