MSCCP0001
The following subquery matches at least one of the patterns considered invalid and may produce compilation errors
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Medium
Description
In Snowflake, there are multiple patterns and elements in a subquery that are not supported and make it not executable. According to the Snowflake documentation on subqueries the following subquery types are supported:
Uncorrelated scalar subqueries in any place that a value expression can be used.
Correlated scalar subqueries in WHERE clauses.
EXISTS, ANY / ALL, and IN subqueries in WHERE clauses. These subqueries can be correlated or uncorrelated.
Please note that the list above is not exhaustive, meaning that a few subqueries that match none of the specified types may still be considered valid.
To help avoid errors, SnowConvert knows a set of subquery patterns that normally invalidate subqueries, this EWI is added to warn the user that the subquery matches at least one of these patterns and therefore may produce errors when compiled in Snowflake.
Code Example
Input Code:
Output Code:
Recommendations
Check the subquery in Snowflake, if it compiles without problems then this EWI can be safely ignored.
Please check the complex patterns section for subqueries inside the assessment report, it contains a list of the patterns that normally invalidate subqueries and their occurrences, it can be used to review the migrated subqueries and why are they considered invalid.
If you need more support, you can email us at snowconvert-support@snowflake.com
Last updated