Which of the following code blocks writes DataFrame storesDF to file path filePath as text files?
Show answer and explanation
Correct answer: D
storesDF.write returns a DataFrameWriter, and its text(filePath) method selects the text output format and destination in one call. Therefore storesDF.write.text(filePath) forms the required writer chain. Calling write as a function or using path without selecting a supported output method does not express the same text write.
