Exam Associate-Developer-Apache-Spark-3.5 Topic 1 Question 74 Discussion

Actual exam question for Databricks's Associate-Developer-Apache-Spark-3.5 exam
Question #: 74
Topic #: 1
Which command overwrites an existing JSON file when writing a DataFrame?

Suggested Answer: A Vote an answer

The correct way to overwrite an existing file using the DataFrameWriter is:
df.write.mode("overwrite").json("path/to/file")
Option D is also technically valid, but Option A is the most concise and idiomatic PySpark syntax.

by Nina at Apr 20, 2026, 12:26 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
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.

0
0
0
10