You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beam.apache.org by Marco Mistroni <mm...@gmail.com> on 2020/04/15 20:45:34 UTC

Sending email from Apache Beam

HI all
  i am planning to end my Apache Beam workflow by sending an email..
so basically i have N elements that gets processed and transformed, and at
the end i would like to send an email whose content are the elements i have
processed.
Could anyone advise on how to do it? and if it is a  malpractice?
At the moment i am stuck at the point where i want to combine all the
elements in one big text, and i need a Transform that given N element it
will just return One big text, similar to a python's reduce function

Is there such a Transform in Beam?

thanks
 Marco

Re: Sending email from Apache Beam

Posted by Kyle Weaver <kc...@google.com>.
The easiest way is to do something like this (assuming you are using
Python):

CombineGlobally(lambda elements: ','.join(elements))

For more info on Combines, check out the programming guide:
https://beam.apache.org/documentation/programming-guide/#core-beam-transforms

On Wed, Apr 15, 2020 at 4:45 PM Marco Mistroni <mm...@gmail.com> wrote:

> HI all
>   i am planning to end my Apache Beam workflow by sending an email..
> so basically i have N elements that gets processed and transformed, and at
> the end i would like to send an email whose content are the elements i have
> processed.
> Could anyone advise on how to do it? and if it is a  malpractice?
> At the moment i am stuck at the point where i want to combine all the
> elements in one big text, and i need a Transform that given N element it
> will just return One big text, similar to a python's reduce function
>
> Is there such a Transform in Beam?
>
> thanks
>  Marco
>
>
>
>
>
>