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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Iterate csv file and store column value in variable

Hello Talend Team,
I have list of csv file which contain transaction details and I want to find distinct accountid from all of them for second subjob.
for example my csv file contain data like
Tractionfile 1
AccountId TranctionId BalanceAmt
1 112 100.00
2 201 100.00
4 113 200.00
1 114 400.00
Tractionfile 2
AccountId TranctionId BalanceAmt
2 202 200.00
3 564 800.00
1 205 555.00
I want to store only distinct AccountId separated by comma in context variable to use in another subjob.
like
context.variable = "1,2,4,3";
my job desing
tfileList-------iterate---->tFileInputeDelimeter---------->tMap-----tLogRow------>
(want to calcualte context.variable (want to use context.variable value here)
value here )

Please suggest me how to find distinct account id and store it in context variable.
Thank you,
Nitin
Labels (3)
3 Replies
_AnonymousUser
Specialist III
Specialist III

Try tAggregateRow and normalize the output.
Anonymous
Not applicable
Author

Hi dentiston
can you please explain me how do I get my output through tAggregateRow and tnormalize.
Anonymous
Not applicable
Author

Hi
Try this:
tFileList -> tFileInputDelimited -> tUnite -> tFilterColumns -> tDenormalize -> Output
The tUnite unites the iterations into a single flow (much like writing all of the inputs to a single interim file, then reading the interim file again).
Make sure the tDenormalize has "Merge same value" checked - this will get rid of duplicate account ids.
JB