SPRKPY1031
pyspark.sql.column.Column.contains
Last updated
pyspark.sql.column.Column.contains
Last updated
This issue code has been deprecated since
Message: pyspark.sql.column.Column.contains has a workaround, see documentation for more info
Category: Warning
This issue appears when the SMA detects a use of the function, which has a workaround.
Input
Below is an example of a use of the pyspark.sql.column.Column.contains
function that generates this EWI. In this example, the contains
function is used to filter the rows where the 'City' column contains the substring 'New'.
Output
The SMA adds the EWI SPRKPY1031
to the output code to let you know that this function is not directly supported by Snowpark, but it has a workaround.
Recommended fix
As a workaround, you can use the function by passing the column as the first argument and the element to search as the second argument. If the element to search is a literal value then it should be converted into a column expression using the lit
function.
For more support, you can email us at or post an issue .