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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Multiple Rows to single row (on lookup)

is there any additional component to achieve this?
mySqlInput--------------->tMap ----------------------------------> tJavaFlex ---------------------------> tWebservice
^ (puts each item in a List) (parameter: List)
| (lookup, join all matches)
|
mySqlInput
when i try to set onComponent ok connection between tjavaflex an webservice, the request only happens for the last main row. When doing normal main connention, each lookup row gets passed to twebservice (not the complete List) Is there any component that passes the output row on condition (only when the list is filled)?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
In the begining part of tJavaFlex: define a list, eg:
java.util.List list=new java.util.ArrayList();
In the main part of tJavaFlex: add each row to the list, eg:
list.add(row1.columnName);
In the end part of tJavaFlex: put the list to a global variable for use later, eg:
globalMap.put("mylist",list);
in the next subjob, get the list and pass it to tWebservice, the job design looks like:
mySqlInput--------------->tMap ----------------------------------> tJavaFlex
^ (puts each item in a List)
| (lookup, join all matches)
|
mySqlInput
|
onsubjobok
|
tFixedFlowInput--main--tWebservice
on tFixedFlowInput, generate one data flow with one column, let's call it mylist, object type.
key:value
mylist 0683p000009MPcz.png(java.util.Array)globalMap.get("mylist")

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi
In the begining part of tJavaFlex: define a list, eg:
java.util.List list=new java.util.ArrayList();
In the main part of tJavaFlex: add each row to the list, eg:
list.add(row1.columnName);
In the end part of tJavaFlex: put the list to a global variable for use later, eg:
globalMap.put("mylist",list);
in the next subjob, get the list and pass it to tWebservice, the job design looks like:
mySqlInput--------------->tMap ----------------------------------> tJavaFlex
^ (puts each item in a List)
| (lookup, join all matches)
|
mySqlInput
|
onsubjobok
|
tFixedFlowInput--main--tWebservice
on tFixedFlowInput, generate one data flow with one column, let's call it mylist, object type.
key:value
mylist 0683p000009MPcz.png(java.util.Array)globalMap.get("mylist")
Anonymous
Not applicable
Author

Try a tFlowToIterate before the WebService. No guarantees.
Anonymous
Not applicable
Author

Hi
In the begining part of tJavaFlex: define a list, eg:
java.util.List list=new java.util.ArrayList();
In the main part of tJavaFlex: add each row to the list, eg:
list.add(row1.columnName);
In the end part of tJavaFlex: put the list to a global variable for use later, eg:
globalMap.put("mylist",list);
in the next subjob, get the list and pass it to tWebservice, the job design looks like:
mySqlInput--------------->tMap ----------------------------------> tJavaFlex
^ (puts each item in a List)
| (lookup, join all matches)
|
mySqlInput
|
onsubjobok
|
tFixedFlowInput--main--tWebservice
on tFixedFlowInput, generate one data flow with one column, let's call it mylist, object type.
key:value
mylist0683p000009MPcz.png(java.util.Array)globalMap.get("mylist")

shong! talend master! awsome! works as it should, thanks!