Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
talendtester
Creator III
Creator III

[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"
Labels (3)
1 Solution

Accepted Solutions
talendtester
Creator III
Creator III
Author

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"

View solution in original post

2 Replies
Anonymous
Not applicable

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
talendtester
Creator III
Creator III
Author

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"