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

Certified Associate Developer for Apache Spark 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?

Show Answer
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

1 comment
Sign in to comment
Sowwy1Option: D
Apr 1, 2024

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