Target Update Action - Need Clarification

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Target Update Action - Need Clarification

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply