Talend - 如何在循环中运行一个组件块?

时间:2016-08-09 15:54:31

标签: talend

请告知如何在循环中运行以下组件块? 我突出显示了我需要迭代的URL部分: 它应该是:context.startIndex * 1,context.startIndex * 2,context.startIndex * 3 ...等等,最多100个。

是否可以使用tLoop?请提供方法说明。

谢谢你, 米尔恰

enter image description here

1 个答案:

答案 0 :(得分:1)

是的,您应该可以这样做,只需在onComponentOK链接后添加一个tLoop,然后连接这样的组件:

 tLoop --iterate--> tFixedFlowInput --main--> tRestClient

(tFixedFlow就在这里让你将tLoop连接到tRestClient)

tLoop中的基本设置:from / to / step:1/100/1 在tRestComponent中,您应该使用tLoopComponent提供的globalMap变量:

..startIndex="+context.startIndex*((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION"))

使用“大纲”视图获取可以使用组件访问的全局变量。

相关问题