How to replace null(empty) string values with earlier row's values
Hi
I've csv input file with 256 columns. Every two rows have the same EntryID. I need to replace on field in second row from first row example:
Input
RowNumber EntryID TAXRateId
1 1 3
2 1 null
3 2 5
4 2 null
5 3 6
6 3 null
Output after Talend job should look like below:
Output
RowNumber EntryID TAXRateId
1 1 3
2 1 3
3 2 5
4 2 5
5 3 6
6 3 6
Input CSV file have all strings value output also required strings. Input and output file schema have 256 columns.
Any idea how to fast build? Possible only with using tmap?
Thanks in advance for any help
Rafal
kzone Thanks for this info.
I'm trying to use Tmemorizerows and tmap to do this but when I have on tmap this code:
(TAXReclaimCode_tMemorizeRows_1 == null ||
!TAXReclaimCode_tMemorizeRows_1 == null.equals(TAXReclaimCode_tMemorizeRows_1))
? row7.TAXReclaimCode : ""
Talend sending me errors in tmap component.
I'm using string values for this any idea how to fix this.
Kind Regards
Rafal
I think this can also be done with a tMap.
inputfile.xls
\
tMap -->output
/
inputfile.xls
make an inner join on entryId
and filter taxRateID on the first input to not null and on the second input to null
then map fields EntryId and TaxRateId from the first input
and map rowNumber from the second input.