Facing problem and out of ideas on figuring on how to implement parent-child relationship in Talend.
Having a feed file which has data in below format
MemberCode|LastName|FirstName A|SHINE|MICHAEL B|SHINE|MICHELLE C|SHINE|ERIN A|RODRIGUEZ|DAMIAN A|PAVELSKY|STEPHEN B|PAVELSKY|TERESA
(there are many more columns and many more rows - just few rows for reference purpose). LastName and FirstName are self-explanatory. MemberCode denotes the relationship. A will be parent, B or C will be child. For a certain employee record the data will always be in sequential manner - meaning the complete parent-child data will be in continuous rows.
The above data needs to be outputed in below format:
MemberCode|MemberLastName|MemberFirstName|DependentLastName|DependentFirstName A |SHINE |MICHAEL | | B |SHINE |MICHAEL |SHINE |MICHELLE C |SHINE |MICHAEL |SHINE |ERIN A |RODRIGUEZ |DAMIAN | | A |PAVELSKY |STEPHEN | | B |PAVELSKY |STEPHEN |PAVELSKY |TERESA
What I have tried so far:
MemberCode|MemberLastName|MemberFirstName|DependentLastName|DependentFirstName A |SHINE |MICHAEL | | B | | |SHINE |MICHELLE C | | |SHINE |ERIN A |RODRIGUEZ |DAMIAN | | A |PAVELSKY |STEPHEN | | B | | |PAVELSKY |TERESA
How to replicate the value for MemberFirstName and MemberLastName for MemberCode A for the rows having MemberCode B or C. Thanks in advance.
Platform: Talend Open Studio for Data Integration Version: 6.5.1