You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2016-05-27 07:11:13

mounica_ch
Member
10 posts

mounica_ch said:

Iterating over array collection

Tags: [java]

Hi
I have scenario to iterate through Arraylist .I have list of customercode where i should check the custcode with the table if it exist it should go to the if condition there i m creating a temporary table to do bulk updation,if it doesn't exist it has to go to else part.
how can i solve this issue? i am facing problem while iterating a list.

Offline

#2 2016-05-30 07:57:02

shong
Talend Team


shong said:

Re: Iterating over array collection

Hello 
Get the Arraylist on a tFixedFlowInput, and convert it to a string, link tFixedFlowInput to a tJavaRow or tMap, and remove the character "[","]" on there, then, normalize each custcode with tNormalize component, after completing these steps, the arraylist will becomes mutiple lines, eg:
code1
code2
code3
...
Then, iterate each line with tFlowToIterate, eg:
tFixedFlowInput--main--tJavaRow--main--tNormalized--main--tFlowToIterate--iterate--do a join to check if the custcode exists in the table or not--runIf---do other business processing. 
Regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy