SSC-FDM-TD0006

View With Check Option Not Supported.

Description

This message is shown when SnowConvert finds a view with the WITH CHECK OPTION clause. Which is not supported in Snowflake, so it is commented out from the code.

This clause works with updatable views that can be used to execute INSERT and UPDATE commands over the view and internally update the table associated with the view.

The clause is used to restrict the rows that will be affected by the command using the WHERE clause in the view.

For more details see the documentation about the clause functionality.

Example code

Input code:

IN -> Teradata_01.sql
REPLACE VIEW VIEWWITHOPTIONTEST AS
LOCKING ROW FOR ACCESS
SELECT 
    *        
FROM SOMETABLE
WHERE app_id = 'SUPPLIER'
WITH CHECK OPTION;

Output code:

OUT -> Teradata_01.sql
CREATE OR REPLACE VIEW VIEWWITHOPTIONTEST
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
AS
SELECT
    *
FROM
    SOMETABLE
WHERE app_id = 'SUPPLIER'
--    --** SSC-FDM-TD0006 - VIEW WITH OPTION NOT SUPPORTED IN SNOWFLAKE **
--    WITH CHECK OPTION
                     ;

Recommendations

Last updated