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
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.
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
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).