无法从对象转换为整数Talend

时间:2020-06-30 13:16:53

标签: java talend

我在Talend中使用数字序列

如此

if (some condition)
{  output_row.Seq =  Numeric.sequence("S2", globalMap.get("i"), 0); }

else {  globalMap.put("i",Numeric.sequence("S1", 1, 1));
        output_row.Seq = globalMap.get("i"); 

 }

我遇到了麻烦,无法将Object转换为Integer,

我认为 numeric.sequence ("S2", globalMap.get("i"), 0);是如何告诉talend我是整数?

1 个答案:

答案 0 :(得分:1)

只需将其转换为整数:

Numeric.sequence("S2", (Integer)globalMap.get("i"), 0)