Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

unpivot or tunite option

Input file

ID,firstName1, firstName2, firstName3 , LastName1, LastName2, LastName3, Amount1,Amount2,Amount3, Date

1,FN1,FN2,FN3,LN1,LN2,LN3,10,20,30,3/24/2020

 

Output file

ID , Number , firstName , LastName , Amount , Date

1, 1, FN1, LN1, 10, 3/24/2020

1, 2, FN2, LN2, 20, 3/24/2020

1, 3, FN3, LN3, 30, 3/24/2020

 

Please share which components to use.

Labels (2)
5 Replies
manodwhb
Champion II
Champion II

One way is you need to read mutipule times use tmap or tjavarow and get requireed columns and then use tunite to union.
Anonymous
Not applicable
Author

if I read multiple times it will affect performance and tunite can not join branches separated from same source/link

manodwhb
Champion II
Champion II

Yes it will impact the performance, read that and use replicate and then use the thasouputs . then you read the data using thashinputs and then you can use tunite component to do union all operation.
Anonymous
Not applicable
Author

thanks instead of using hashfile component, can we do unpivot stage?

manodwhb
Champion II
Champion II

With unpivot component you will not achieve this scenario.