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

Which of the following code blocks writes DataFrame storesDF to file path filePath as parquet and partitions by values in column division?

    Correct Answer: D

    The correct code to write a DataFrame as a parquet file and partition it by values in a column involves using the partitionBy method followed by specifying the file format with parquet. Therefore, the syntax storesDF.write.partitionBy('division').parquet(filePath) is correct.

Discussion
Sowwy1Option: D

Correct is D. storesDF.write.partitionBy("division").parquet(filePath)