• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] ArrayList - How can I retrieve objects?

#1 2011-06-01 02:40:38

talendtester
Member
Registered: 2009-07-15
Posts: 99

[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"

Offline

#2 2011-06-01 03:29:01

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

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


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

Offline

#3 2011-06-02 19:01:23

talendtester
Member
Registered: 2009-07-15
Posts: 99

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"

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] ArrayList - How can I retrieve objects?

Board footer

Powered by FluxBB