Databricks Certified Associate Developer for Apache Spark — Question 127

The code block shown below should write DataFrame storesDF to file path filePath as parquet and partition by values in column division. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.

Code block:

storesDF.__1__.__2__(__3__).__4__(__5__)

Answer options

Correct answer: B

Explanation

The correct answer is B because it uses the appropriate method 'write' to initiate the write operation, 'partitionBy' to specify the column for partitioning, and 'parquet' as the format. Option A incorrectly uses 'path' instead of 'parquet', while C and D use 'col(