csv_format_row_clusters_macro adapted to the new format (less memory intensive)