Fetch data using Iterate and send logs by mail

Highlighted
Five Stars

Fetch data using Iterate and send logs by mail

Using below Job  Oracle Input-->Iterate ---> Sending Mail   to multiple mail ids , now i need to send logs of all the users to whom mail has been sent in single mail .Can you help me how can same be achieved .

 

something like below 

 

Oracle Input-----Iterate----SEndng Mail---Log----Sendmail(log file with all details as attachment) 


Accepted Solutions
Employee

Re: Fetch data using Iterate and send logs by mail

Hi,

 

    Could you please try to add the column value from tflowtoiterate? Also set the number of records in trowgenerator as 1.

image.png

 

 

Hope it will help you to resolve your use case :-)

 

Warm Regards,

 

Nikhil Thampi


All Replies
Seven Stars JGM
Seven Stars

Re: Fetch data using Iterate and send logs by mail

one easy way to accomplish this is to copy and paste your original query/send mail part and simply remove the iterate to gather all rows into a single email message.
Five Stars

Re: Fetch data using Iterate and send logs by mail

JGM i can do that , but then 1 by 1 mail wont' go to user .

Overall first i need to fetch records 1 by 1 and send mail using iterate and then i need to send all those records by mail to users for there information that mail to all these users has been sent .

Five Stars

Re: Fetch data using Iterate and send logs by mail

can any one guide me on this 

Employee

Re: Fetch data using Iterate and send logs by mail

Hi,

 

     Could you please try below way?

image.png

 

  Since we are using On component ok, it will allow the trowgenerator to push records to target file each time. Please fix 1 record in trowgenerator and select append option in the delimited file. 

 

   I have added a tSleep to make sure that we will give some 10 to 20 seconds delay to complete writing the last record to file.

 

   You can use tSendmail to publish the file which will have details of all the records for whom mail was sent.

 

If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome :-)

 

Warm Regards,

 

Nikhil Thampi

 

 

Five Stars

Re: Fetch data using Iterate and send logs by mail

Nikhil thats great but can you give me how can i populate  field using trowgenerator ,eg. i have 1 value as emailid coming in frm DB and getting passed to sendmail how can i capture same in trowgenerator and then to outputdelimited .  Thanks for your response and guidance 

Employee

Re: Fetch data using Iterate and send logs by mail

Hi,

 

    Could you please try to add the column value from tflowtoiterate? Also set the number of records in trowgenerator as 1.

image.png

 

 

Hope it will help you to resolve your use case :-)

 

Warm Regards,

 

Nikhil Thampi

Five Stars

Re: Fetch data using Iterate and send logs by mail

Kudos Nikhil Work like a Charm

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads