Page 1 of 1

Target Update Action - Need Clarification

Posted: Thu Sep 13, 2007 9:42 pm
by DS_SUPPORT
I am trying to create a server job with two streams (Incremental and Destructive). I am having a Jobparameter which will tell whether it is Incremental Load or Destructive Load.

So From a Transformer I am having two links, I put the constraint for Link1 as Incremental and for the Second Link , I have put the Constarint as Destructive.

I am using the DRS stage as my Target Stage as we may need to connect to different Databases. For Link 1 , I have Set the Target Action as "Insert Else Update" and for the Second Link , I have put the Target Action as "Truncate and Insert". But the Problem is , Even when i Choose the Incremental in the Jobparameter, it is still Truncating the target Table, But no rows are going through the Second Link. I hope when Intializing the Job itself, the Truncate is happening. Is this the expected Behaviour or is there something wrong with my Code.

For overcoming this, I can write a simple server job , which will get the Tablename as parameter and Truncate it.

But I want to know, Is this is the expected behaviour or is there some thing wrong in my designing.

Posted: Thu Sep 13, 2007 9:50 pm
by chulett
That is the expected behaviour. The truncation happens when the stage is 'opened' and the connection is established to the database, regardless of any rows actually going down the link.