We need to import a Spark session so that we can create the Spark session, the gateway of our Spark app:
import org.apache.spark.sql.SparkSession val spark: SparkSession = SparkSession .builder() .appName("MovieSimilarityApp") .master("local[*]") .config("spark.sql.warehouse.dir", "E:/Exp/") .getOrCreate()