Certified Associate Developer for Apache Spark Exam QuestionsBrowse all questions from this exam

Certified Associate Developer for Apache Spark Exam - Question 112


Which of the following code blocks writes DataFrame storesDF to file path filePath as parquet overwriting any existing files in that location?

Show Answer
Correct Answer: C

To write a DataFrame to a file path in Parquet format while overwriting any existing files, the correct method is using `.write.mode('overwrite').parquet(filePath)`. This method ensures that the mode is set to 'overwrite' and specifies Parquet as the file format.

Discussion

2 comments
Sign in to comment
Sowwy1Option: C
Apr 2, 2024

It's c

SaiPavan10Option: C
Apr 4, 2024

it is C