SPRKPY1029
pyspark.sql.readwriter.DataFrameReader.parquet has a workaround
Category
Warning.
Description
This issue appears when the tool detects the usage of pyspark.sql.readwriter.DataFrameReader.parquet which has a workaround.
Input code:
Output code:
Scenario:
parquet(
#Path path: str,
#Options mode: Optional[str], partitionBy: Optional[Union[str, List[str]]], compression: Optional[str] ) A couple of workarounds are possible in this scenario. Path: The first parameter "path" must be a stage to make an equivalence with Snowpark, so is recommended to implement a temporary stage and add each ".parquet" path to the stage, using the prefix "file://", as follows. Source:
Expected:
Options: The additional parameters are also not supported by Snowpark as parameters, but for many of them you can use the "option" function to specify those .parquet parameter as options, as follows: Source:
Expected:
The following options are not supported for Snowpark: compression, datetimeRebaseMode, int96RebaseMode, mergeSchema.