Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I just noticed last week that the tJava component has an iterate flow. Has anyone used this before? Is there an example of how to use it? Please note that I am not talking about the tJavaFlex component.
Just for clarification I am adding this photo and I modified the subject
Notice how it is the tJava Component that has the iterate flow
No, whatever is in the tjava component would just run first. There would be no way to control the iteration from there.
@Red,can you the below link may be usefull.
http://bekwam.blogspot.in/2012/08/iterating-over-java-collection-with.html
Hi,
Just like other components, use the iterate connection to connect tJava to a starting component such as tFileInputDelimited or others.
Have a look to the documentation for more details
https://help.talend.com/reader/lChEGrKIFb8DXl9sRsX~~A/UoOiqbEZUVnVX9rFcx02QQ
I am trying to figure out why the tJava component has an iterate flow. Is it possible to use? See the picture that I added for clarification.
It acts similar to a tFlowToIterate. Let's say, you send 10 rows from a table to tJava and print something. You will only see that print once. You then iterate to another tJava where you can then print for each individual value.
I tried to grab row1 and got a null as expected, but after the iterate System.out.println(row1.newColumn) returns the values I wanted.
Can I see how you configured tJava_3? What java does it contain? Are you using java to control it's Iterate flow?
I am doing nothing there, tjava is what it is. tJava is just a placeholder here. It cannot pass anything across but continue a flow. The behavioral benefit of using the iterate function is the ability to capture the row information coming out of your input. Again, this can be achieved using other components. The behavior is part of Talend and the java code it generates. You may be overcomplicating things.
What are you trying to achieve with this?