tPivotToOutputDelimited doubt

One Star

tPivotToOutputDelimited doubt

Hi,
 I have a input file and the required pivoted output file mentioned below I am not having a pivot function in the database and cannot go with a case statement  can this be achieved through tPivotToOutputDelimited
INPUT
subject;student name;student marks;grade
Maths;Ashwin Reddy;67;A
Science;Ashwin Reddy;55;B
English;Ashwin Reddy;88;c
Computers;Ashwin Reddy;92;D
Maths;Vinay Shukla;82;E
Science;Vinay Shukla;66;F
English;Vinay Shukla;90;G
Computers;Vinay Shukla;85;H
Maths;Sangeeta Thomas;72;I
Science;Sangeeta Thomas;56;J
English;Sangeeta Thomas;44;K
Computers;Sangeeta Thomas;54;L
OUTPUT REQUIRED
student_name;Maths_marks;Science_marks;English_marks;Computers_marks;Maths_grade;Science_grade;English_grade;Computers_grade;
Ashwin Reddy;67;55;88;92;A;B;C;D;
Vinay Shukla;82;66;90;85;E;F;G;H;
Sangeeta Thomas;72;56;44;54;I;J;K;L;
Thanks ,
Koustubh Avadhani
Community Manager

Re: tPivotToOutputDelimited doubt

Hi
Take a look at tDenormalize component. Read the input file two times, denormalize respectively student marks and grade column, and then do an inner join base on student name column. For example:
tFileInputDelimited--main--tFilterColumn-main--tDenormalize-main--tMap--main--tLogRow
                                                                                                      |
                                                                                                   lookup
                                                                                                      |   
                                            tFileInputDelimited--main--tFilterColumn-main--tDenormalize
Best regards
Shong
 
----------------------------------------------------------
Talend | Data Agility for Modern Business