Let's create a Spark session by defining the number of computing cores, the SQL warehouse, and the application name as follows:
val spark = SparkSession
.builder
.master("local[*]")
.config("spark.sql.warehouse.dir", "C:/data/")
.appName(s"LDA")
.getOrCreate()