QuestionQ10

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following code blocks writes the DataFrame storesDF to the file path filePath in JSON format?

Explanation

DataFrame.write provides a DataFrameWriter, whose json(path) method saves the DataFrame in JSON format at the specified path.

Learn more

Community Discussion

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