Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend Folks,
I have a date column in excel. The values are below like format.
Input:
from_Date |
09/06/2018 |
12/06/2018 |
13/06/2018 |
14/06/2018 |
15/06/2018 |
16/06/2018 |
17/06/2018 |
18/06/2018 |
19/06/2018 |
20/06/2018 |
21/06/2018 |
22/06/2018 |
I need to create to_date column and ignore first value then assign remaining values for To_date column.
This is my scenario. I need below output
output:
from_Date | To_Date |
09/06/2018 | 12/06/2018 |
12/06/2018 | 13/06/2018 |
13/06/2018 | 14/06/2018 |
14/06/2018 | 15/06/2018 |
15/06/2018 | 16/06/2018 |
16/06/2018 | 17/06/2018 |
17/06/2018 | 18/06/2018 |
18/06/2018 | 19/06/2018 |
19/06/2018 | 20/06/2018 |
20/06/2018 | 21/06/2018 |
21/06/2018 | 22/06/2018 |
22/06/2018 |
You need to think about this in reverse and get the previous record to achieve this. I answered a very similar question to this here: https://community.talend.com/t5/Design-and-Development/How-to-get-previous-row-tuple-s-value-without...
This solution as it is will naturally lead to your first row having a null date instead of your last row. So you will have to either reverse the order of your rows before you do this and reverse them again afterwards. You can do this with a tSortRow component
Similar to @rhalls solution, sort them into reverse order and use the tMemorizeRow component.