How to merge all part files in a folder created by SPARK data frame and rename as folder name in scala
问题 Hi i have output of my spark data frame which creates folder structure and creates so may part files . Now i have to merge all part files inside the folder and rename that one file as folder path name . This is how i do partition df.write.partitionBy("DataPartition","PartitionYear") .format("csv") .option("nullValue", "") .option("header", "true")/ .option("codec", "gzip") .save("hdfs:///user/zeppelin/FinancialLineItem/output") It creates folder structure like this hdfs:///user/zeppelin