0 votes
28 views

Syntax to create a DataFrame based on the content of a JSON file
1. spark.textfile("examples/src/main/resources/data.json")
2. spark.read("examples/src/main/resources/data.json")
3. spark.read.json("examples/src/main/resources/data.json")
4. spark.json("examples/src/main/resources/data.json")

by (185k points)

1 Answer

0 votes

Syntax to create a DataFrame based on the content of a JSON file
1. spark.textfile("examples/src/main/resources/data.json")
2. spark.read("examples/src/main/resources/data.json")
3. spark.read.json("examples/src/main/resources/data.json")
4. spark.json("examples/src/main/resources/data.json")

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

🔗Reference : W3school.com

🔗Source: Interview Questions and Answers

🔗Reference: Javatpoint.com

by (185k points)

Related questions

0 votes
1 answer 19 views
19 views asked Oct 22, 2020 in Technology by JackTerrance (185k points)
0 votes
1 answer 20 views
20 views asked Oct 22, 2020 in Technology by JackTerrance (185k points)
0 votes
2 answers 37 views
0 votes
1 answer 80 views
0 votes
1 answer 26 views
0 votes
1 answer 22 views
22 views asked Jan 11 in Technology by JackTerrance (185k points)
0 votes
1 answer 21 views
21 views asked Jan 11 in Technology by JackTerrance (185k points)
0 votes
2 answers 29 views
29 views asked Oct 22, 2020 in Technology by JackTerrance (185k points)
0 votes
1 answer 17 views
17 views asked Oct 22, 2020 in Technology by JackTerrance (185k points)
0 votes
2 answers 29 views
0 votes
1 answer 14 views
14 views asked Oct 22, 2020 in Technology by JackTerrance (185k points)
0 votes
1 answer 56 views
56 views asked Oct 22, 2020 in Technology by JackTerrance (185k points)
0 votes
1 answer 20 views
0 votes
1 answer 24 views
0 votes
1 answer 23 views
...