How to update a row using Netezza

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
hiteshm
Participant
Posts: 20
Joined: Tue May 10, 2005 5:32 am

How to update a row using Netezza

Post by hiteshm »

Hi,

I've just started a new project for a client using DataStage v8.0, using Netezza as the target databse.

I am new to Netezza, but apprantly they are unable to update an exisitng row in a Netezza table. I've searched the documentation, I can only see Append, Create, Replace and Truncate options.

Am I missing something obvious or does the Netezza stage not allow any updates?

Any suggestions would be appreciated.

Rgds

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

Post by ray.wurlod »

It's the stage that does not permit updates, while your Write Method is set to use direct writes - effectively bulk load. Experiment with other values of Write Method and Write Mode properties, and you will probably encounter some form of Upsert being available.

I also have not used this stage type - the above is based on how other Enterprise stage types work. If the Netezza Enterprise stage does not have an Upsert (which I would find very surprising) there is always the ODBC Enterprise stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Althaf6553
Participant
Posts: 64
Joined: Wed Sep 26, 2007 6:52 am
Location: Syracuse ,NY

Post by Althaf6553 »

just use odbce nterprise as target stage and instead of write u can find upsert mode //then u ll have different options such as insert only, update only, insert and update ...etc then u can carry out updation in netezza
Althaf
hiteshm
Participant
Posts: 20
Joined: Tue May 10, 2005 5:32 am

Post by hiteshm »

Thank you for you suggestions Ray and Althaf.

But what is the difference between the ODBC Connector and ODBC Enterprise stage in v.8. Both seem to allow option to updates.
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Post by shawn_ramsey »

Hitesh,

You do not (I really mean DO NOT) want to use the ODBC stage to do an update in Netezza. Netezza has no indexes and the ODBC issues singleton updates. The combination of the two with results in significantly poor performance (we had a table that was updating at a speed of 1 row every 15 seconds).

You have 2 options.
1) Talk to IBM and get the new Netezza stage. We have done a lot of work with them to resolve these performance issues and they have added the ability to bulk update as well as a bulk extract to the stage.

2) If you cannot update the stage, you can bulk load the data into a staging table and do an update SQL statement after the load.
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
Post Reply