Issue with writing DF to textFile - Text Data supports only single column

pyspark

#1

Hi Everyone,

I was working on CCA problem 7 and I was trying to write the output of DF to a textfile as mentioned below

outdf.write.option(“sep”,":").text("/user/krish/problem7/solutionastxt")

I faced the following issue

Traceback (most recent call last):
pyspark.sql.utils.AnalysisException: u’Text data source supports only a single column, and you have 4 columns.;'

Were any one able to convert df to textfile . Appreciate your response

Regards,
K