tsendmail message

Four Stars

tsendmail message



I need to send the row count of MYSQL table data in an email(tsendmail).


*MY Query : select count(*) as rowcount from employee

*tsendmail : i passed the message as  "total rows"+context.rowcount


* How to get the row count values in email message body. ?

Forteen Stars TRF
Forteen Stars

Re: tsendmail message

tMysqlInput - tFlowToIterate(to create a global variable from the select result)
Now you can reuse this variable anywhere you want, so in the tSendMail component:
"total rows"+(Integer)globalMap.get("row1.yourCountField")
Here I assume that row1 is the flow name after tMySQLOutput and yourCountField is the field that received the result, so the global variable name is based on this assumption.