QuestionQ62

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which code block writes the DataFrame storesDF as JSON to the file path filePath, overwriting any files already at that location?

Explanation

DataFrame.write.mode("overwrite").json(filePath) configures the DataFrame writer to overwrite existing output and invokes its JSON writer for the specified path.

Community Discussion

No comments yet. Be the first to start the discussion!