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

Talend - how to run a block of components in a loop?

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

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

谢谢, 米尔恰

是的,您应该可以这样做,只需在 onComponentOK link 之后添加一个 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"))

使用 'Outline' 视图获取您可以通过组件访问的全局变量。