This warning is added to a Common Table Expression (CTE) when SnowConvert did not check for any recursion inside the CTE query definition.
Snowflake SQL supports the RECURSIVE keyword, intended for use along CTE queries that happen to be recursive. SnowConvert currently does not check for that recursion in order to decide if the RECURSIVE keyword should or should not be added to the result, and this warning is shown to make that clear.
Support for this validation might be done in the future as the requirements expand.
-- SOURCE:WITH Sales_CTE (SalesPersonID, NumberOfOrders)AS(SELECT SalesPersonID, 2FROM Sales.SalesOrderHeaderWHERE SalesPersonID IS NOT NULLGROUP BY SalesPersonID)SELECT 2 AS "Average Sales Per Person"FROM Sales_CTE;
-- TRANSFORMED:EXEC(`/*** MSC-WARNING - MSCEWI4007 - PERFORMANCE WARNING - RECURSION FOR CTE NOT CHECKED. MIGHT REQUIRE RECURSIVE KEYWORD ***/WITH Sales_CTE (SalesPersonID, NumberOfOrders)AS(SELECT SalesPersonID,2FROM MYDB.Sales.SalesOrderHeaderWHERE SalesPersonID IS NOT NULLGROUP BY SalesPersonID)SELECT 2 AS "Average Sales Per Person"FROM MYDB.PUBLIC.Sales_CTE`);
Not having the RECURSIVE keyword does not impact the result of the query directly, but may impact the way Snowflake uses resources for its execution. We recommend checking Snowflake's features involving CTEs and contacting us if you would like the RECURSIVE keyword to be automatically added to the CTE queries that support it.