option while loading to database

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
sdfasih
Participant
Posts: 39
Joined: Wed May 24, 2006 7:22 pm

option while loading to database

Post by sdfasih »

Hi ,
I would like to know what update action I should select while loading data into data base when data already exist should not be deleted and we are running jobs parallely to load data into the database.

Is it update existing or insert new rows?

Thanx.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

I don't think you can load data into the same table through different jobs at the sametime. However, the answer to your question is , if you don't delete the table and yet update the table you need to perform updates for the already existing rows and insert for new rows. You will have to define two seperate links , one for updates and one for inserts to achieve good performance. What is your target database? Using the Update existing or Insert new rows or viceversa takes a heavy toll on your performance and is not suggested unless your target table has very fews rows..as few as 100-200. IMO
Kris

Where's the "Any" key?-Homer Simpson
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

make all jobs write to text files instead of directly to a database.

write a job to pick all these text files and remove duplicates and then load this file into the table.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What a second here - you seem to be forgetting that databases are designed specifically to enable multiple concurrent accesses and have rules built in place to cater for parallel writes to the same record! You will need to use these rules in order to ensure a successful load and there is no reason to use text files for interim storage.

If you are loading data and do not wish to overwrite (or update) existing records then an "insert" will do the trick; albeit this is not the most efficient way as it generates a database I/O operation and will also generate a failed write which you can handle in the job.
Post Reply