如何从tsendmail组件talend中的tlogrow获取table结果(多行)

How to get the table results(multiple rows) from tlogrow in tsendmail component talend

我有一个数据库查询,我想 return tsendmail 组件中的多行表格格式结果(一行接一行)并显示在电子邮件中:

我尝试使用 tbufferouput/input,但它只是 return 自 tjavarow 用新值覆盖每个最新 运行 以来的最后一条记录,但我想获得所有结果在一封电子邮件中一次,在这种情况下一次 9 行

您可以在 tSendMail 之前使用 tJavaRow 将结果累积到单个变量中。

context.cumulateResult=context.cumulateResult+input_row.row1+" "+input_row.row2 etc

然后在 tSendMail 中您可以将内容设置为 context.cumulateResult(您也可以使用全局变量而不是上下文变量)。