Reputation: 401
We are running the following code to write a table to S3:
dataframe.coalesce(10).write.mode("overwrite").parquet(destination_path)
When I check S3, it has only 1 parquet file. How can I write it to 10 files?
Upvotes: 0
Views: 1598
Reputation: 42422
Use repartition if you want to increase number of partitions. Coalesce only decreases the number.
dataframe.repartition(10).write.mode("overwrite").parquet(destination_path)
Upvotes: 2