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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to split one row into multiples rows?

I have the following input:
Row1: Name1, FirstName1, Charge1, Charge2, Charge3, Charge4
Row2: Name2, FirstName2, Charge1, Charge2, Charge3
and I would like the following output:
Row1: Name1, FirstName1, Charge1
Row2: Name1, FirstName1, Charge2
Row3: Name1, FirstName1, Charge3
Row4: Name1, FirstName1, Charge4
Row5: Name2, FirstName2, Charge1
Row6: Name2, FirstName2, Charge2
Row7: Name2, FirstName2, Charge3
It looks like I would have to use the Tnormalize function, but I am not able to get the result expected.
Thanks for your help
Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hello
Before you use the tNormalize, you need to concact the normalize columns with another symbol. Here is a simple scenario:
in.csv:

Name1,FirstName1,Charge1,Charge2,Charge3,Charge4
Name2,FirstName2,Charge1,Charge2,Charge3

tJavaRow_1:
output_row.name = input_row.name;
output_row.firstName = input_row.firstName;
output_row.conn = input_row.c1+"@"+input_row.c2+"@"+input_row.c3+"@"+input_row.c4;

Result:
tarting job forum6611 at 14:30 15/05/2009.
.-----+----------+-------.
| tLogRow_1 |
|=----+----------+------=|
|name |firstName |conn |
|=----+----------+------=|
|Name1|FirstName1|Charge1|
|Name1|FirstName1|Charge2|
|Name1|FirstName1|Charge3|
|Name1|FirstName1|Charge4|
|Name2|FirstName2|Charge1|
|Name2|FirstName2|Charge2|
|Name2|FirstName2|Charge3|
'-----+----------+-------'
Job forum6611 ended at 14:30 15/05/2009.

Best regards
shong
Anonymous
Not applicable
Author

Thanks a lot! Exactly what I needed.
jebiya
Contributor
Contributor

This has helped me as well. Thanks shong
Anonymous
Not applicable
Author

SOURCE:


ID
58
MEMNO
369&370
NAME
Rohit Sharma/Bhupender K
DATE
8 Dec 2014/16 Jan 2014

Target: should be
ID  MAMNO,NAME,DATE
58,369,rohitsharma,8 DEC 2014
59,370,Bhupender K,16 Jan 2014

how can we achieve this by using talend,please any body help me
Anonymous
Not applicable
Author

ID
58
MEMNO
369&370
NAME
Rohit Sharma/Bhupender K
DATE
8 Dec 2014/16 Jan 2014

Target: should be
ID  MAMNO,NAME,DATE
58,369,rohitsharma,8 DEC 2014
59,370,Bhupender K,16 Jan 2014

how can we achieve using talend and mysql
Anonymous
Not applicable
Author