Unable to Perform Insert and Update

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
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Unable to Perform Insert and Update

Post by vardhan354 »

Hi Ppl,

Im performing an insert and update to a table from a source table.Ever time when I run the Job, the job is not performing any insert and update,but instead it is performing truncating the table and inserting the data.When I viewed the log,I got the following message.

This update action 'insert or update' is not compatible with parameter array binding. Array Size property will be set to 1.

Im not able to understand what is stopping me to do Insert/Update even though I selected that Option.Please mail me your suggestion asap as Im running on a deadline.

Thanks a lot,

Bye,

V.V.G.
ETL
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

you are specifying the action as " insert new rows or update" or "update existing or insert new". With this, the array size has to be 1 and transaction size to 0. Fix that and you will get rid of that warning message.
About the truncate,
how do you know its truncating the table, is there data already present in the target? if there is and after the job finishes, theres no data then either in the after sql tab you must be providing a delete or truncate command.
Check if you have specified any after sql commands?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Post by vardhan354 »

Thanks D.S Guru!!! Yes, I can get rid of that message.

Here is the situation.The target table is loaded from two different sources 1 and 2 with insert and update action in the same job.Source 1 is empty.

Source1--->Target

Source2--->Target

When I run the job, I observed that there is no record of history i.e, Every time the target is loaded with fresh data.

Run1.

I ran the above job.I could see all the data in the target table.

Run2

I ran onlysource1 (No data)---> Target(has exisiting data before run).As we would assume that the data would be present in target after this run with no changes,surprisingly the table is showing no data.

Please throw u opinion.

Thanks,
V.V.G
ETL
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

did you analyze the before and after tab in the sql tab?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Which stage are you using, ODBC, Oracle OCI, DB2, Informix, Redbrick, etc?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Post by vardhan354 »

Yes,

I have seen the before and after tabs and there are no expressions in them

Looks wierd!!!
ETL
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Post by vardhan354 »

Im connecting to MSSQL server thru DRS stage.
ETL
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Are there triggers on the target table, or anything that would delete rows?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Post by vardhan354 »

How can I check if there are any triggers which are deleting.Im not aware!!!
ETL
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Let me get this straight:

1. job #1 truncates the table and puts data into it
2. job #2 is supposed to insert or update existing data

After running job #1 you have data, but after running job #2 the table is emptied first and then only rows from job #2 are inserted?

Please verify the table is truly being truncated, because I have my suspicions. Please truncate the table, then insert a single row of dummy data. Now run job #2. Check to see if that dummy row is in the table. If it's not there, then you have something weird happening, meaning something is clearing the table.

If the dummy row is still there, then you have to evaluate why you thought the data was being truncated.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Post by vardhan354 »

I thank you all for your suggestions.Since the job being already developed some one, I have no clue of its design.But I found that the table is getting truncated before the data is being loaded in to it and this action was mentioned at the source stage in the before tab.I apolozise for your valuable time in effort for answering me.

Thanks!!!!
ETL
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What we have here is a violation of the "law of least astonishment".

If you design jobs that perform "hidden" tasks - such as via before/after subroutines - place an annotation on the job canvas to alert future developers that invisible behaviour is happening in the job design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply