Five Stars

how to create T-SQL Merge in Talend

In T-SQL we use MERGE query to do follwoing 

1. when match - > update the target row 

2. when not match by target - > insert the row 

3. when not match by source -> delete the row or update column ISACTIVE="FALSE" 


How to do this Talend ?

Six Stars

Re: how to create T-SQL Merge in Talend

The tMSSQLOutput/tDBOutput has a lot of this functionality built in.  The setup is just much different.


2018-05-11 11_50_03.png

You can setup your key field(s) in the Component Schema(s). And/or you can control things more explicitly in the Advanced Settings of the tMSSQLOutput/tDBOutput:

2018-05-11 11_51_41.png