get spark context from session code example Example: get spark context from sparksession spark = SparkSession.getOrCreate() spark.sparkContext()