HiveContext
The transformation consists of replacing an HiveContext call with the parameter used in the pyspark function. The variable spark_context is transformed from a HiveContext instance to a Snowpark Session instance, making it understandable using Snowflake. Note that the transformation generates an EWI specifying that the import statement is not required.
Input Code:
from pyspark.sql.context import HiveContext
hive_context = HiveContext(spark_context)
Output Code:
#EWI: SPRKPY1008 => pyspark.sql.context.HiveContext is not required
#from pyspark.sql.context import HiveContext
pass
hive_context = spark_context#EWI: SPRKPY1008 => pyspark.sql.context.HiveContext is not required
Last updated
Was this helpful?