Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

madhao
2012-04-27 13:02:05

Hi,
I was designing a similar package.I have a issue

tLogCatcher--main-->tLogRow--main-->tJavaRow
   |
onsubjobok
   |
tSendMail

Here tJavaRow is used to build the message of the mail.

I used this flow but it sends 2 mails instead of one if there are multiple(2) errors.I need only only mail to come to my inbox irrespective of number of errors with all the error messages.


I guess this is happening because tLogCatcher gets called whenever there is a error and not at the end to log all errors.Do we have any workaround for this ??

pedro
2012-04-23 07:00:24

Hi

If you have read all tutorials and download [TalendOpenStudio_Components_RG_50b_EN.pdf], for special requirements or questions you might post new topic at Talend Community here where people shares experience, scenarios and advanced instructions.

Besides, Talend are building a knowledge base for troubleshooting and users guides.
It will come soon.

Regards,
Pedro

dbmc
2012-04-20 19:22:52

OK, I've taken the suggestions and they work just fine.

A followup question: I think I've read all the documentation, but I didn't see any place this kind of job design issue is discussed, analyzed or solutions suggested. Is there some document that I missed? Or is the best way to proceed to simply to post questions here (after searching the forum for existing solutions, of course)? How does a new Talend developer learn this?

shong
2012-04-19 08:33:03

Hi
You can store the result to context variables or global variables first, and then get its value on tSendMail component, for example:

...other subjobs...
   |
onsubjobok
   |
tWebServiceInput--main--tJavaRow_1
   |
tSendMail_1

tLogCatcher--main--tJavaRow_2
   |
onsubjobok
   |
tSendMail_2

on tJavaRow_1, store the result returned by the web service into a global variable.

globalMap.put("key1", input_row.result);

//result is the column name.

on tSendMail_1, define the message as below:

"Hello admin, this is the result returned by the web service "+(String)globalMap.get("key1")

Using the same way to handle the log captured by tLogCapture.

Best regards
Shong

pedro
2012-04-19 05:30:21

Hi

What do you mean 'effectively'?

You just want to use one tSendMail? Or you want to delete all tLogRow?
Use tFileOutputDelimited to generate two log files and attach them in tSendMail.

Regards,
Pedro

dbmc
2012-04-19 02:01:14

I have a job that pulls data from one database, does some reformating then calls a web service to insert the data into a different database. In other words, a fairly typical ETL job. I would like to email two logs to an admin. One log comes from the tWebServiceInput that calls the web service to add the data. The tWebServiceInput connects to a tLogRow to collect the results and that works fine. The second log is generated by a tLogCatcher for the exceptions and errors. It also connects to a tLogRow. The 2 tLogRows each connect to a tSendMail.

The problem: is there is an easy way in tSendMail to effectively say, mail the stuff that the tLogRow is sending you?

Many Thanks.

Board footer

Powered by FluxBB