Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Haresh
Contributor
Contributor

How to group together results after processing into one tSendMail component and trigger the email at once rather than for each iteration

The job design has various components in it and for each iteration i have a specific value called rowcount for each of the files that i am storing in a context variable called context.rowcount and lets assume there are 10 files and i want to print or store the 10 rowcounts for all the 10 files together at once in the body of the tsendmail component and trigger the email alert at once rather than triggering email at the end of each iteration.Can somebody please help because if i create a separate subjob for tsendmail it wont retrieve the global or context variable results.

Labels (5)
3 Replies
Anonymous
Not applicable

Can you share what results you are trying to send or another idea may be instead of streaming your results or batching them to the tSendmail component is first send all results to a file and then send the file as an attachment on the tSendmail as the results are for an end user anyways. The issue is that the send mail component when in a flow will react like all components and will start its consomuption of the input data in whatever fashion you forward to it .ie steam, iterate, batch. See the following scenario in the guides that may help:

 

But under the attachments just choose your current file name with all of the results grouped together that you want your email component to send to your user or user group.

https://help.talend.com/r/I49EJnTkP8xEFh5Np3Rlcw/Rv823qJB_BAy1P2jHtVe~A

Haresh
Contributor
Contributor
Author

@Evan Teitelbaum​ thanks for the response,but the requirement here is that i am looking to print all the results of iteration in the output which is the body of the tsendmail component at once and i dont want it in the form of an attachment,Everything must go in the body of the email at once

 

The body reads like this:

"+context.filename+" -->= "+context.firstname+" rowcount="+context.rowcount+"

 

so at each iteration the result will be like

filename1.txt-->=tom rowcount=1

filename2.txt-->=jason rowcount=7

 

& so on

The job flow looks like the below and each tjava will produce different results for the context variables

0693p00000AU5yhAAD.pngI have tried multiple options including tbufferoutput-->tbufferinput-->tsendmail in between but still wont work at all,please suggest as this is really important and i cant seem to figure out a way?

RVeitch_84
Creator
Creator

Did you ever figure this out as I'm trying to do the same thing?