Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning Guys,
I have a file looks like bellow and i want to merge all rows which have the same ID (first column) in a single row.
ID Test_1 Date_test_1 Test_2 Date_test_2 Test_3 Date_test_3 1 yes 06/09/2017 4 no yes 20/04/2004 4 01/10/2000 yes 17/05/1982 1 no 02/02/2015
I try to use tAggregateRow component but it does not help in my situation; because colums can contain or not data and i have not function to extract it.
I want to get an output like bellow.
I also see on this link : https://help.talend.com/reader/ZndcSsDNtKg8FpNIRCdjag/jPZNgHRF5ad4KUp4Mpvzkg
Which suggest to use component tSurviveFields but it does not present on Studio and not on talend Exchange
ID Test_1 Date_test_1 Test_2 Date_test_2 Test_3 Date_test_3 1 yes 06/09/2017 no 02/02/2015 4 no 01/10/2000 yes 20/04/2004 yes 17/05/1982
Thank you for help,
Hello TRF,
Trying to import your job in my studio, i get this message
Hi,
You probably use a version prior mine.
I use Talend Open Studio for Data Integration Version 6.4.1.
Let me know your version?
Hello TRF,
Yes you are right, i have a prior vesion than yours.
I use 6.3.1
Thanks,
Here is the job redesigned with version 6.3.1.
I got the same result as with 6.4.1.
Hi TRF,
I confirm that your job work fine.
I know now why it does not work, it is very strange but i mean it regards the component tFileInputDelimited.
You know i just replace component tFixedFlowInput to tFileInputDelimited and i don't get good result.
I post this job here, you can check it. I use the same input file that i put in my post
And you need to change file path.
Thanks,
The reason is that fields are empty ("") when they come from tFileInputDelimited instead of null.
Try to include a tJavaRow after tFileInputDelimited to replace empty strings by null using this example:
output_row.Organization_Name = input_row.Organization_Name.equals("") ? null : input_row.Organization_Name.equals("")
Hello TRF,
You are a great guy, you are a professor.
Big respect and thank you very much for help.
It resolves.
Hello TRF,
Yes you saw correctly, i leave in Paris and you ?