I have a directory containing a bunch of deflate compressed CSV files that are around 500mb. I would like to split them into smaller deflate compressed CSV files. For example I have 3 500mb files and I would like them to become 15 100mb files after the write. I am currently doing something like this:
spark.read.csv("/input/path")
.repartition(15)
.write.option("compression", "deflate").csv("output/path")
But this causes a whole unnecessary shuffle. Is there a way to get it to write 15 files without going through all this trouble?