In this demonstration will now concentrate on the Lieschen spot.
So far we have done insertions and we have done operations aswell but now will concentrate on illusions.
In fact this is doing both insert and update operations.
So now for deletion I would like to have another beneficial task in.
I will commit this to this and this is going to take it off my deletions.
OK.
Double click on the deletions.
Are dataflow task in there.
What's your source in the scenario.
Is is and only to be source of course my destination is a final destination.
Again I require a lookup transformation here.
OK surprisingly it's quite obvious what we're going to do.
If you remember in the previous example of insert and update the source is the source and place source
in the destination is obviously implies destination.
But now in the deletions case your source is going to be your destination database table.
So what I'm going to do I want to find out
the records which doesn't exist in the source but which do exist in the destination.
That means somebody have deleted it from the source.
Imagine you have a guy called Stephen Smith in them as the employee ID 9.
So what I'm planning to do.
I'm trying to delete this guy from the source table.
So now implies source table doesn't how the 9:3 clock but the destination has got so probably that this
nation is not aware that somebody deleted the card from the source table.
So obviously I should not be having the Mindfreak marking the destination table.
So we want to do that.
So what are we going to do in this scenario.
Are we going to double click on the only source leave the connection manager as destination.
And then my table is implies destination and this is happening in mind and the columns everything is
OK.
So you can now connect these source to the lookup transformation.
Right now the lookup transformation is going to be so stable.
So just like last time I'm going to read that across to no match output and then in the connection I'm
going to change this to my source and the table is in place.
Now the implied source is only having 8 records on like the destination which is mind the Cox columns
and then you can do the lookup configuration by combining employee ID.
The employee.
And so OK so now what happens to the source has got mine the cards and then the destination as the look
up speaks to only 8 records.
So remember that it's no match up
I'm connecting the no match output to my destination.
So what we're supposed to do.
We are supposed to set a flag off is delayed to true in the Samarium So we're not going to really delete
the record mine from the destination table.
In fact we're going to make this as truth.
So let's see how to do that.
Let me correct a couple of things.
In this implementation as you can see we have taken a second dataflow task but deletions and you've
taken a source look up and destination.
So I have to make some changes because I did something wrong here.
I selected my implies this nation table means we are selecting all the cards from the destination table
as sort.
In fact I'm supposed to select only the cards which are not deleted.
So I'm going to use a sequel command here like this.
I'm gonna say select start from implies destination where is deleted is zero or false whatever it is.
Of course at this point of time all the mind that cars have is deleted as here.
OK.
So why did they change that.
That's because the Malzahn you have so many other cards in the destination table.
And some of them have already been my desk true.
So we don't have to really process those records so you can filter other reports.
That's why I changed from the table name to his second command here.
Nice and also by mistake I took the destination as the fact we are supposed to do an operation to that
to use deleted column so I need the command in fact my.
Sorry for that.
Let's connect the look up to the command and look up no match on what will come here.
So now we double click on that to be command and we going to get beat up on this mission that is in
the sequel's command is going to the update.
So take the plane in place and Biscarrat destination set is deleted.
It calls to one employee ID equals to something saying OK.
So whenever never the.
OK let me come to discuss.
OK.
So that's how the command has been configured properly.
So this has got mainly cards and this has got eight the card which doesn't exist in the source.
When you go to be command and for that Richar you have a destination table and to make that the truth.
So what we're expecting the output in this demonstration in the source table doesn't now Stephen Smith
at the destination has got Stephen Smith who's easily it is false but now I'm expecting this to be true.
So that means our deletions are successful.
So let's go ahead and type the serial package and run the package.
Everything is good.
You can see just one red card has gone to mime only to be command up namely cops.
Perfect stop the execution of the package.
Go back to sickle cell for press controller and we should be able to see the mind of the guard.
It is true that means this record has been deleted from the source.
In fact so you're basically using some kind of flag gal. here.
Of course we rammed this package with all three implementations of code insert update and delete.
Yes.
When I ran this package nothing really happened for insertion operations because memory cards in the
employees in both tables are same in no data has changed.
So that's OK only the deletions have worked.
In fact of course 9:4 on the package a package really doesn't know how to do anything because deletions
insertions and operations are in tact.
They are in sync with the source table.
So is solving this demonstration.
I've shown you how we can load data incrementally and how we can make the necessary operations all the
deletions.
In fact this is how we used to do in the earlier versions obstacles with a manual approach.
Of course it's a bit complicated but we have managed it successfully.
That's why Microsoft has lazed in sequels or room 2012 in fact something like CDC components Corales
change data capture.
So I'm going to lead this example in a new approach using this seat as a company and in the next section.