Hi Kayal, In general, PCollection is infinite collection of elements. So, there is no only one simple way to do what you are asking and the solution will depend on a case where it’s needed.
Could you give an example why and where in your pipeline you do need this? — Alexey > On 21 Apr 2022, at 06:28, Kayal P <kayalpaarthi...@gmail.com> wrote: > > Hi All, > > I am trying to convert Pcollection<String> to List<String> using Java sdk. > Seems there is combiners.ToList transform available in python sdk. Is there > any similar option available in Java sdk? If not can someone guide me with > right way of doing this? The Pcollection<String> is very small collection > less than 10 items. Thanks in advance. > > Regards, > Kayal