MSCEWI3102
For Loop With Float Number As Bound May Not Behave Correctly In Snowflake Scripting
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Low
Description
Snowflake Scripting only allows an INTEGER
or an expression that evaluates to an INTEGER
as a bound for the FOR LOOP
condition. Floating numbers will be rounded up or down and alter the original bound.
The lower bound will be rounded to the closest integer number. For example:
3.1 -> 3, 6.7 -> 7, 4.5 -> 5
However the upper bound will be truncated to the closest lower integer. For example:
3.1 -> 3, 6.7 -> 6, 4.5 -> 4
Example Code
Input Code:
Output Code:
Recommendations
Rewrite the FOR LOOP condition so it uses integers.
If you need more support, you can email us at snowconvert-support@snowflake.com
Last updated