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 176 discussion

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

Code block:
__1__.__2__.__3__(__4__)

  • A. 1.spark
    2. read()
    3. parquet
    4. filePath
  • B. 1. spark
    2. read()
    3. load
    4. filePath
  • C. 1. spark
    2. read
    3. load
    4. filePath, source = "parquet"
  • D. 1. storesDF
    2. read()
    3. load
    4. filePath
  • E. 1. spark
    2. read
    3. load
    4. filePath
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

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: E
The correct answer is: E. 1. spark 2. read 3. load 4. filePath Explanation: spark.read: This creates a DataFrameReader object for reading data. load(): This method is used to load data from a file, and when the file is in Parquet format, it can automatically infer the format without explicitly specifying it.
upvoted 1 times
...
5effea7
6 months, 4 weeks ago
Selected Answer: E
It's E. read is a property of spark, not a method, so that makes the choice C or E. In C the parameter source is being assigned "parquet". Parquet is the format. So C is wrong. E is correct, because the default format is parquet.
upvoted 1 times
...
Sowwy1
10 months ago
E. 1. spark 2. read 3. load 4. filePath
upvoted 2 times
...
azure_bimonster
12 months ago
Selected Answer: E
To me E is most likely correct Syntax: spark.read.load(filePath)
upvoted 2 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