how to convert a key value pair in to a columns based up on key

One Star

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.
One Star

Re: how to convert a key value pair in to a columns based up on key

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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now