PySpark referenceClassesDataFrameWriterV2clusterByOn this pageclusterBy (DataFrameWriterV2) Clusters the data by the given columns to optimize query performance. Syntax clusterBy(col, *cols) Parameters ParameterTypeDescriptioncolstrThe first clustering column.*colsstr, optionalAdditional clustering columns. Returns DataFrameWriterV2