I have requirement and attaching pseudo code for your reference.
How to implement logic in talend. Please let me know if you need more information.
Thanks in advance.
The main component of your Talend job will be tMap: you'll want to define the schemas of file1 and file2 and then join them on the ID field in tMap with an inner join. Feed the output from tMap to whatever component you are using to update the data, and that should take care of the Day 1. Day 2 will use similar logic, but will have a more complex output expression because of your validation rules.