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 read a JSON file in Spark Scala?

1 Answer

0 votes
by (11.3k points)

The following command can be used to read a JSON file using Spark-Scala:

val jsonData = sqlContext.read.json(""path-to-json-file.json"")"

If you are looking for an online course to learn Spark, I recommend this Spark Certification program by Intellipaat.

Related questions

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

Browse Categories

...