dataframe.saveasTextFile, saves only the data in a delimited format. How do I save the dataframe with headers in JAVA.
dataframe.saveasTextFile
sourceRufFrame.toJavaRDD(
With Spark 2.x,
df.write.option("header", "true").csv("path")
Cheers