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 convert a key value pair in to a columns based up on key

hello,
i have a data that looks like this 
name:jack
id:1
salary :15000
name:lucy
id:2
salary:16000
name:mat
id:2
salary:12000
here how do i convert this type of data in to columns based up on the keys like name,id,salary,
the out put should look like
id,name,salary
1,jack,15000
2,lucy,16000
3,mat,12000
Are there any component to do this convertion can you please suggest me how to do this 
Thanks.
Labels (2)
1 Reply
TRF
Champion II
Champion II

Hi,
With tJavaRow, add a new column to mark the records which work together (here what the result looks like based on your example):
rank;field;value
1;id;1
1;salary;15000
1;name;jack
2;id;2
2;salary;16000
2;name;lucy
3;id:3
3;salary;12000
3;name;mat

Now, tMap can solve the problem:

Hope this helps,
TRF