Upsert is not working in Netezza Connector stage

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you correctly marked key columns as "Key" in your metadata?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
crystal_pup
Participant
Posts: 62
Joined: Thu Feb 08, 2007 6:01 am
Location: Pune

Post by crystal_pup »

We are using Netezza Connector Stage for upsert purpose and it works correctly. In our case, we used the property "Update then Insert" and specified the Key columns and the Update columns in the connector stage.
Sagnik Mukherjee
Participant
Posts: 14
Joined: Wed Jul 25, 2012 5:29 am
Location: Mumbai

Post by Sagnik Mukherjee »

Hi,

When I hardcoded the name of primary key columns(comma separated) and updated colunms(comma separated) in netezza connector stage, then its working fine.
But when I passed the same columns on runtime as parameter(mentioning two parameter name for primary key cols and update cols in NZ connector stage),
Its throwing error.

Error:-

Netezza_Connector_76: The following key column(s): PRTR_ID, OFFR_ID, OFFR_VSN_NO, OFFR_TYPE_CD were not found in the link schema (CC_NZMetadataHelper::validateColumnsAgainstLinkSchema, file CC_NZMetadataHelper.cpp, line 2942)


I have tried with many options(like using "" on column name). Though getting same error.
Dont get understand why the same job is not working while the only change is parameterized the column names and pass it on runtime.
Please suggest.
Sagnik
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

So your problem isn't that the Netezza Upsert doesn't work but that you don't have the right syntax for passing in key column names as job parameters. It seems to be finding the four columns in the UPSERT statement but not finding them on the input link to the stage. Are the columns present on the column list with the key attribute checked? Are you using RCP instead? Maybe the Netezza stage has a higher level of metadata validation than the ODBC stage.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

vmcburney wrote:Maybe the Netezza stage has a higher level of metadata validation than the ODBC stage.
Doesn't every other stage? I seem to recall that ODBC was the only stage that didn't seem to care if you bound all of the columns into the SQL or not. Comes in handy sometimes (a trick Ernie taught me back in the day) but not an expectation you can take to other stages.
-craig

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