Is there no other way than
https://stackoverflow.com/a/44956702 ?

On Thu, 11 Aug 2022 at 1:00 AM, Shivam Singhal <shivamsinghal5...@gmail.com>
wrote:

> I have a PCollection of type KV<String, Byte[]> where each key in those
> KVs is unique.
>
> I would like to split all those KV pairs into batches. This new
> PCollection will be of type PCollection<Iterable<KV<String, Byte[]>>>>
> where the iterable’s length can be configured.
>
>
> I know there is a PTransform called GroupIntoBatches but it batches based
> in the keys which is not my usecase.
>
> Will be great if someone could help in this.
>
> Thanks,
> Shivam Singhal
>

Reply via email to