Insert,update,insert/update on same table in same job

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sriram_bcl
Participant
Posts: 5
Joined: Sun Dec 30, 2012 11:56 pm

Insert,update,insert/update on same table in same job

Post by sriram_bcl »

I have one job where in Server edition doing four operations on same table in same job i.e insert,update,insert/update,update with four different links with different filter conditions.

To implement same logic in PX, I am not able to do. I am getting unique constraint violation error. Please suggest is there any way to resolve this.
Sriram@BCL
manumace
Participant
Posts: 4
Joined: Mon Jan 11, 2010 9:29 am

Re: Insert,update,insert/update on same table in same job

Post by manumace »

Hi,

If the server job is working fine and Parallel is throwing error, then the issue could be "an update record is trying in insert mode". Can you please verify the data with a peak or trace mode.

Hope you have marked the Key column properly.

Regards,
Manu
manumace
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

Post by chandra.shekhar@tcs.com »

I think it is a better practice to do all inserts in 1 job and updates(or upserts) in other job to avoid locking at the table.
Thanx and Regards,
ETL User
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm curious, does the Server job use four links to a single target?
-craig

"You can never have too many knives" -- Logan Nine Fingers
123gopal
Participant
Posts: 16
Joined: Sat Feb 09, 2013 11:41 am
Location: chennai

Re: Insert,update,insert/update on same table in same job

Post by 123gopal »

1.in ds8.5 separately SCD Stage is there otherwise can be use Slowly changing dimension(SCD) Concept types
SCD1-Insert new records and replace the orginal records
SCD2-insert new records and update the existing records and we can maintain the old records also
SCD3-insert new records and no trace of old records
mgplk
sjfearnside
Premium Member
Premium Member
Posts: 278
Joined: Wed Oct 03, 2007 8:45 am

Post by sjfearnside »

It sounds like the parallel job is trying to perform concurrent updates to the table resulting in conflicts. Try setting the DB stage performing the changes to the table to sequential mode and try the job again to see if that resolves the issue.
Post Reply