Text file output format in CCA 175

Can we save output file in csv format when asked to save in text file format in CCA 175?

Believe not… why to go with alternate option when there is
saveAsTextFile in rdd or dataframe as format “text”


I just got my score report for the exam I took on 25/09/2020. There were 3 to 4 questions asking for output in A text format. I used DF.WRITE.CSV for all questions and PASSED all of them. So CSV writes a valid text format.


Hello. I have same question. Saving as text file is not so easy as you write, because when you work with data frame or SQL temp view, you must first convert the data to single column data, for example by concatenating data, which you can do I think only if all columns are in string format.

Hi Marcel, thanks for the input here. Really appreciate it.
One question, did any of those questions asked specifically for headers? Or you just used the df.write.format(‘csv’).save(‘path’) directly (with no headers as default)?

Hi Roberto, nope. No questions asking for header. So I used your code : df.write.format(‘csv’).save(‘path’)

actually, just for information purposes, I used df.write.csv(“path”, sep=“XXX”)

most of my questions asked to use \t as delimiter

1 Like

Thanks a lot and congratulations !!