SPRKPY1080
pyspark.SparkContext
Message: The value of SparkContext is replaced with 'session' variable.
Category: Warning
Description
Spark context is stored into a variable called session that creates a Snowpark Session.
Scenario
Input
This snippet describes a SparkContext
# Input Code
from pyspark import SparkContext
from pyspark.sql import SparkSession
def example1():
sc = SparkContext("local[*]", "TestApp")
sc.setLogLevel("ALL")
sc.setLogLevel("DEBUG")Output
In this output code SMA has replaced the PySpark.SparkContext by a SparkSession , Note that SMA also add a template to replace the connection in the "connection.json" file and then load this configuration on the connection_parameter variable.
Recommended fix
The configuration file "connection.json" must be updated with the required connection information:
Additional recommendations
For more support, you can email us at [email protected] or post an issue in the SMA.
Last updated
