• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tsendmail : how to read output from tMap

#1 2009-07-20 14:51:19

kzone
Member
Company: Synotis
Registered: 2008-07-06
Posts: 909
Website

tsendmail : how to read output from tMap

hi,

I list reporitory and from each file read some properties and count nbre of lines.
Do some treatment (according to filename => email ;etc)
When i output result in a logrow , all is ok :

Code:

|=----------------------------------+---=|
|email                              |nbre|
|=----------------------------------+---=|
|laurent.raulier@landes-mutualite.fr|732 |

But i want to try to send result by mail (tSendMail) , can't retrieve values !!!! (try with context, input_row, out, globalmap... get("") ...)
always a null pointer exception (so no value)

So how can I retrieve email value and nbre (of lines) in tSend mail field !?

Thank for your suggestion
++


Uploaded Images

Last edited by kzone (2009-07-20 14:51:54)


do Svg your graphical language !!!

Offline

#2 2009-07-20 15:18:09

Morbo
Member
Company: Inserm
Registered: 2009-05-14
Posts: 228

Re: tsendmail : how to read output from tMap

Hello,
Did you tried putting a flowToIterate as intermediate component?

Offline

#3 2009-07-20 15:18:17

nkxxDV
Member
Registered: 2009-07-20
Posts: 31

Re: tsendmail : how to read output from tMap

Try and check the "inner join" box in front of "row_2" in your tMap.

Because if you don't, the rows that don't match in the tmap will have an empty "email" field, hence the nullPointerException.

If it doen't solve the problem, you can also try some logic : instead of calling the "email" field, use this kind of syntax : email==null?"error@landes-mutualite.fr":email

Good luck

Offline

#4 2009-07-20 15:35:24

kzone
Member
Company: Synotis
Registered: 2008-07-06
Posts: 909
Website

Re: tsendmail : how to read output from tMap

thanks both of you ,

you're right Morbo (as it 's said in this post.

with a '((String)globalMap.get("out.email"))' in email field !
i've still got some logic "analysis" with flow to retrieve soem value smile

In that case why is the reason I cannot read this value (out.email) directly in a tSenMail !??


Uploaded Images

Last edited by kzone (2009-07-20 15:37:06)


do Svg your graphical language !!!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tsendmail : how to read output from tMap

Board footer

Powered by FluxBB