A PCollection is a bag of elements. PCollections can be empty, have only
one element or have many. It is up to you to choose how many elements are
emitted into the PCollection by the upstream transforms.

If you can limit the number of elements to the PCollection that you applied
KafkaIO to to only one element you will have achieved your goal.

On Tue, Sep 11, 2018 at 3:11 PM Mahesh Vangala <[email protected]>
wrote:

> Hello -
>
> I'd like to write a single record to kafka topic through beam.
> However, I only see examples that work with PCollection.
> Any thoughts about how I can approach to this?
> Thank you.
>
> Regards,
> Mahesh
>
> *--*
> *Mahesh Vangala*
> *(Ph) 443-326-1957*
> *(web) mvangala.com <http://mvangala.com>*
>

Reply via email to