+1 vote
in Spark Sql by

Syntax to create a DataFrame based on the content of a JSON file 

(i)spark.textfile("examples/src/main/resources/data.json") 

(ii)spark.read("examples/src/main/resources/data.json") 

(iii)spark.read.json("examples/src/main/resources/data.json") 

(iv)spark.json("examples/src/main/resources/data.json") 

1 Answer

0 votes
by

Correct answer option is spark.read.json("examples/src/main/resources/data.json") 

Related questions

+1 vote
asked Jun 30, 2019 in Spark Sql by anonymous
+1 vote
asked Jun 30, 2019 in Spark Sql by anonymous
...