I have to insert duplicate columns which empty
Header : , , , xxx, , , YYY, , ,
dataSet.coalesce(1).write().mode(ignore).format(csv).options(header= true,\u0000=false).save(targetPath);
while writing into csv file am getting a issue following below
Caused by: org.apache.spark.sql.AnalysisException: Found duplicate column(s) when inserting into file:/C:/Users/xxx/summaryReport/20190901:
at org.apache.spark.sql.util.SchemaUtils$.checkColumnNameDuplication(SchemaUtils.scala:85)