How to convert a string to a Pcollection and return it in Apache beam

I have an Apache Beam Pipeline written in Python. Currently, one of my ParDo functions generates a string as output:

"ab cd ef gh hi jk"

I want to further process this string as a Pcollection, so that each pair of characters will go through a Ptransform. Is there a way to convert a string to Pcollection in python?

Source: Python Questions

LEAVE A COMMENT