Import Statements
Transformed import statement sample:
A Pyspark import statement with equivalence to Snowpark can be directly transformed by the Conversion Tool.
Input Code:
from pyspark.sql.dataframe import DataFrame
Output Code:
from snowflake.snowpark.dataframe import DataFrame
Non transformed import statement sample:
A Pyspark import statement with no equivalence to Snowpark can not be transformed by the Conversion Tool, so it proceeds as follows:
The tool generates an EWI based on the specific issue.
The non-transformed line code is changed to a commented line.
The Conversion Tool replaces the statement with a keyword: “pass.”
Input Code:
from pyspark.sql.catalog.Catalog import dropGlobalTempView
Output Code:
#EWI: SPRKPY1002 => pyspark.sql.catalog.Catalog.dropGlobalTempView is not supported
#from pyspark.sql.catalog.Catalog import dropGlobalTempView
pass
Last updated
Was this helpful?