0 votes
1 view
in Big Data Hadoop & Spark by (5.1k points)

Can anyone tell me how to read a JSON file in Spark Scala?

1 Answer

0 votes
by (11.1k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...