Nine Stars

[resolved] ArrayList - How can I retrieve objects?

When my job looks like this:
tFileInputDelimited > tJavaFlex > tLogRow
My output is:
|-------+-----|
|myMonth|myDay|
|=------+-----|
|05 |31 |
|05 |27 |
'-------+-----'
When I change my job to the following:
tFileInputDelimited > tJavaFlex > tFileList > tIterateToFlow > tMap > tLogRow
How can I use the objects in the ArrayList as a FileMask for the tFileList?
Is this close?
"*2011"+globalMap.get("list.myMonth")+globalMap.get("list.myDay")+".out"
1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars

Re: [resolved] ArrayList - How can I retrieve objects?

Thanks Shong!
I define the ArrayList in the tJavaFlex:
java.util.List
list=new java.util.ArrayList();


Using row2 instead of list for calling the Array items worked great!
"*2011"+((String)globalMap.get("row2.myMonth"))+((String)globalMap.get("row2.myDay"))+"*.out"
2 REPLIES
Community Manager

Re: [resolved] ArrayList - How can I retrieve objects?

Hi
I don't see where you define the ArrayList, I think the job should be:
tFileInputDelimited---row1-->tJavaFlex--row2-->tFlowToIterate--iterate-->tFileList--tIterateToFlow---main--->tMap-->
Assuming the data type of myMonth/myDay is Integer/int, set the filemask of tFileList as: "*2011"+(Integer)globalMap.get("row2.myMonth")+(Integer)globalMap.get("row2.myDay")+".out"
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Nine Stars

Re: [resolved] ArrayList - How can I retrieve objects?

Thanks Shong!
I define the ArrayList in the tJavaFlex:
java.util.List
list=new java.util.ArrayList();


Using row2 instead of list for calling the Array items worked great!
"*2011"+((String)globalMap.get("row2.myMonth"))+((String)globalMap.get("row2.myDay"))+"*.out"