DataframeWriter tuning options

Partitioning management is a critical factor in optimized performance because too few partitions may result in underused resources and too many partitions may result in too many resources for managing small tasks. Partitioning your data more evenly helps avoid these problems. Because partitioning is pushed down to the data in the output files during the DataFrameWriter .save() call, repartitioning occurs when writing files.

Option
Description
Value type
Example value

write.partitionBy.columns

Partitions the output by the given columns on the file system. See the Spark API documentation for more information.

Comma separated strings

column1, column2

write.bucketBy.columns

Buckets the output by the given columns. See the Spark API documentation for more information.

Comma separated strings

column1, column2

write.sortBy.columns

Sorts the output in each bucket by the given columns. See the Spark API documentation for more information.

Comma separated strings

column1, column2

write.bucketBy.numBuckets

Buckets the output by the given columns. See the Spark API documentation for more information.

Integer

5

Last updated

Was this helpful?