Four Stars

Compose new Columns From Fixed Number of Types

Hey all,

 

I want to convert the following csv-file.

 

COUNTRY,CODE,SEX,TIME,VALUE
Czech Republic,CZ,Female,2011,5326794
Czech Republic,CZ,Male,2011,5109766
Czech Republic,CZ,Total,2011,10436560

in order to obtain the following

COUNTRY,CODE,TIME,Female_Value,Total_Value,Male_Value
Czech Republic,CZ,2011,5326794,10436560,5109766

Hence, I want to flatten the schema based on a fixed number of specific types (here "Male", "Female" and "Total").

Could anyone help me? I tried to perform a Self-Join with the tJoin component but it did not work in the desired way.
Thank you very much.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ten Stars

Re: Compose new Columns From Fixed Number of Types

you first have to split female and male before merge results

Francois Denis

Don't forget to tag when it's "solved"!

1 REPLY
Ten Stars

Re: Compose new Columns From Fixed Number of Types

you first have to split female and male before merge results

Francois Denis

Don't forget to tag when it's "solved"!