Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am trying to design a job which will capture Daily power readings. The input file contains data of the daily readings for different power reading meters. The readings of the output have to be updated as the start data and end data .The readings of the previous day reading of a meter should be loaded as start date for that meter for the next day. and the readings will be loaded directly as end data
ie
| INPUT | ||
| Meter_Name | Date | readings |
| A | 20/10/2019 | 100 |
| B | 20/10/2019 | 150 |
| A | 21/10/2019 | 300 |
| B | 21/10/2019 | 250 |
the expected output is
| Meter_Name | Date | Start Data | End Data |
| A | 20/10/2019 | 100 | |
| B | 20/10/2019 | 150 | |
| A | 21/10/2019 | 100 | 300 |
| B | 21/10/2019 | 150 | 250 |
Please suggest a method to implement this logic in Talend job.
Hi,
Its very easy with Talend. Please refer the below screenshots.
You need to read the same file twice for main and lookup flow. In the lookup join condition, you need to join based on meter name and date -1. The function for date -1 is as shown below.
TalendDate.addDate(row1.reading_date,-1,"DD")
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hi,
Its very easy with Talend. Please refer the below screenshots.
You need to read the same file twice for main and lookup flow. In the lookup join condition, you need to join based on meter name and date -1. The function for date -1 is as shown below.
TalendDate.addDate(row1.reading_date,-1,"DD")
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Thanks @nthampi . It worked for me.