my code is:
import pyspark
from pyspark.sql import SparkSession
from pyspark.conf import SparkConf
from pyspark import SparkContext
spark = SparkSession.builder \
.master("local") \
.appName("pyspark_uygulama") \
.getOrCreate()
sc = spark.sparkContext()
sc
and I get this error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-2fb21ed9bfcc> in <module>
9 .getOrCreate()
10
---> 11 sc = spark.sparkContext()
12 sc
TypeError: 'SparkContext' object is not callable
First, I changed the spark.SparkContext() to spark.sparkContext() it didn't work(it solved another problem). I update my java development kit to the newest. It didn't solve the error either. Any advice?