Use the following command to start a new Spark Session from within a script in Scala:
val sparkSession = SparkSession.builder.
master("local")
.appName("spark session example")
.getOrCreate()
Alternatively, you can simply start a new Spark Session using the terminal:
$ spark-shell
If you are looking for an online course to learn Spark, check out this Apache Spark Certification program by Intellipaat.