exam questions

Exam Certified Associate Developer for Apache Spark All Questions

View all questions & answers for the Certified Associate Developer for Apache Spark exam

Exam Certified Associate Developer for Apache Spark topic 1 question 122 discussion

The code block shown below should read a JSON at the file path filePath into a DataFrame with the specified schema schema. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.

Code block:

__1__.__2__.__3__(__4__).format("csv").__5__(__6__)

  • A. 1. spark
    2. read()
    3. schema
    4. schema
    5. json
    6. filePath
  • B. 1. spark
    2. read()
    3. json
    4. filePath
    5. format
    6. schema
  • C. 1. spark
    2. read()
    3. schema
    4. schema
    5. load
    6. filePath
  • D. 1. spark
    2. read
    3. schema
    4. schema
    5. load
    6. filePath
  • E. 1. spark
    2. read
    3. format
    4. "json"
    5. load
    6. filePath
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Souvik_79
1 week, 4 days ago
Selected Answer: D
Isn't the question incorrect? It should be : __1__.__2__.__3__(__4__).format("json").__5__(__6__) Code : spark.read.schema(schema).format("json").load(filePath)
upvoted 1 times
...
nilave
1 month ago
Selected Answer: D
question is wrong , should be csv
upvoted 1 times
...
PV1995
1 month, 3 weeks ago
Selected Answer: D
D has the right format with everything needed. E is wrong
upvoted 1 times
...
Nina993
3 months, 2 weeks ago
Selected Answer: D
The correct answer is D.
upvoted 1 times
...
nadegetiedjo
9 months, 2 weeks ago
I think that we have an error in the question, the format is CSV so the good answer is D
upvoted 4 times
65bd33e
9 months, 1 week ago
I agree with you correct is D
upvoted 3 times
...
...
SaiPavan10
10 months, 1 week ago
The question itself is bogus.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago