0
votes

I am inserting data into the database using Spoon transformation. I did a 'merge join' to join input tables. d If I have a data inside the database for a day say '2013-1-5' and if I try to add data for the same day '2013-1-5', instead of deleting previous data from database, it appends.

How can I delete previous data from database instead of appending for a given date when I run transformation?

Thank you!

2

2 Answers

0
votes

Do you want to Delete the data, or replace it with the new data?

To delete - use the delete step.

To update it, use the Update step.

To insert if it doesnt exist, or update if it does, then use Insert/Update - sounds like this is what you really want.

0
votes

hey you can use CDC concept here like:

If new record then insert/update If old record then delete or keep as inactive mode