To create a Spark SQL Context, first, start a Spark Session in Scala:
-val spark = SparkSession.builder.getOrCreate()
Then, create a SQL Context from the Spark Session:
-val sqlContext = spark.sqlContext
Now, use the 'sqlContext' variable to implement SQL
If you are looking for an online course to learn Spark, check out this Spark Course by Intellipaat.