This article covers how to achieve dynamic lookup in Talend and get the updated data in the target.
In order to get the new data after join execution we can use Reload at each row lookup model in tmap. The lookup data flow will update constantly and load the new lookup data for each record of main flow.
Create a job in Talend tool. In this example used the employee and state tables to demonstrate dynamic lookup logic. Connect the employee data as Main input and state data as lookup input to the tMap.
In tMap configure the Lookup model to Reload at each row and join the primary key of empid from employee table with empid from state table. In tMap output fetch the columns whatever needed in the output.
Run the job and update the value of any column of the lookup table. For example, after running the job, updated the state table of the column city from ‘Boston’ to ‘Olympia’ for empid=95
In output table -employee_tgt for the empid=95 we have got the latest data ie city=Olympia.