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

How to split record into several/multiple row depending upon condition

Hi All,
Please let me know how to split record from input source file to several/multiple row in output file depending upon condition defined in the column data.
For example consider the input source file as given below:-
Name|Age|Count
David|35|3
Sam|40|2
Joe|29|1
Peter|21|0
The column named "Count" consist values as 3,2,1,0. So depending upon these values I should get my output data split into several row
The desired output should be :-
Name|Age|Count
David|35|3
David|35|3
David|35|3
Sam|40|2
Sam|40|2
Joe|29|1
Peter|21|0
I have got 3,2,1,0 records for David,Joe & Peter respectively.
Regards
swabhosa
Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hi,
You can use tLoop component to achieve your goal.
The work flow should be:tfileinputxxx(input)-->tflowtoiterate-->tloop-->tfixedflow-->output
Please see my screenshots for details
Best regards
Sabrina
0683p000009MCsp.png
Anonymous
Not applicable
Author

Hi Sabrina,

Thanks for your solution. It helped me. 


But I want output to be inserted into single file. How I can achieve this task??


Regards Swabhosa
Anonymous
Not applicable
Author

Hi,
Here is a component TalendHelpCenter:tFileOutputDelimited which is used to output data to a delimited file.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Can you please show what setting you did for tFixedFlowInput_2?
Thanks
Rohan