SPRKPY1025
pyspark.sql.functions.ntile
This issue code has been deprecated
Message: pyspark.sql.functions.ntile has a workaround, see documentation for more info
Category: Warning
Description
This issue appears when the SMA detects a use of the pyspark.sql.functions.ntile function, which has a workaround.
Scenario
Input
Below is an example of a use of the pyspark.sql.functions.ntile
function that generates this EWI. In this example, the ntile
function is used to divide the rows into 3 buckets.
Output
The SMA adds the EWI SPRKPY1025
to the output code to let you know that this function is not directly supported by Snowpark, but it has a workaround.
Recommended fix
Snowpark has an equivalent ntile function, however, the argument pass to it should be a column. As a workaround, you can convert the literal argument into a column using the snowflake.snowpark.functions.lit function.
Additional recommendations
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
Last updated