SPRKPY1012
pyspark.sql.dataframe.DataFrameStatFunctions.writeTo
This issue code has been deprecated
Message: pyspark.sql.dataframe.DataFrameStatFunctions.writeTo has a workaround
Category: Warning.
Description
This issue appears when the tool detects the usage of pyspark.sql.dataframe.DataFrameStatFunctions.writeTo which has a workaround.
Scenario
Input
For this example the dataframe df is writed to a Spark table "table".
writer = df.writeTo("table")
Output
SMA returns the EWI SPRKPY1012 over the line where DataFrameStatFunctions.writeTo is used, so you can use to identify where to fix.
#EWI: SPRKPY1012 => pyspark.sql.dataframe.DataFrameStatFunctions.writeTo has a workaround, see documentation for more info
writer = df.writeTo("table")
Recomended fix
Use df.write.SaveAsTable() instead.
import df.write as wt
writer = df.write.save_as_table(table)
Additional recommendations
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
Last updated