Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in Big Data Hadoop & Spark by (6.5k points)

Can anyone tell me how to create a Spark Session?

1 Answer

0 votes
by (11.3k points)

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.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...