SPRKPY1033
pyspark.sql.functions.asc
This issue code has been deprecated
Message: pyspark.sql.functions.asc 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.asc function, which has a workaround.
Scenarios
The pyspark.sql.functions.asc
function takes either a column object or the name of the column as a string as its parameter. Both scenarios are not supported by Snowpark so this EWI is generated.
Scenario 1
Input
Below is an example of a use of the pyspark.sql.functions.asc
function that takes a column object as parameter.
Output
The SMA adds the EWI SPRKPY1033
to the output code to let you know that the asc
function with a column object parameter is not directly supported by Snowpark, but it has a workaround.
Recommended fix
As a workaround, you can call the snowflake.snowpark.Column.asc function from the column parameter.
Scenario 2
Input
Below is an example of a use of the pyspark.sql.functions.asc
function that takes the name of the column as parameter.
Output
The SMA adds the EWI SPRKPY1033
to the output code to let you know that the asc
function with a column name parameter is not directly supported by Snowpark, but it has a workaround.
Recommended fix
As a workaround, you can convert the string parameter into a column object using the snowflake.snowpark.functions.col function and then call the snowflake.snowpark.Column.asc function.
Additional recommendations
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
Last updated