QuestionQ93

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of these code blocks writes the DataFrame storesDF to the file path filePath as text files?

Explanation

Spark’s DataFrameWriter.text(path) method writes a DataFrame as UTF-8 text files at the specified path. Accessing the writer through storesDF.write therefore gives the valid form storesDF.write.text(filePath).

Learn more

Community Discussion

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