Update Table NO RCP

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
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Update Table NO RCP

Post by oracledba »

Source stage (Flat File):

Target stage (ODBC Connector) Usage:
Write mode = Update; Generate SQL = Yes; Table name = #target_table#

NO RCP with this job..

I have the primary key I want to update on selected in the target ODBC connector stage which matches the primary key in the database table

At runtime, I got the following error: Failed to generate where clause for update statement. No key fields defined in the design schema.

Update is done on a key column and yet this error pops up

Whats the problem here???
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Curious why your table name is parameterized... will all tables being updated by this job have identical metadata?

I'd also be curious if you (as a test) replace the parameter with an actual table name, if the error goes away.
-craig

"You can never have too many knives" -- Logan Nine Fingers
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

tried replacing the parameter with the actual table name and the error doesn't go away (same error)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please verify that each column to be mentioned in the WHERE clause is identified in the metadata as Key
Last edited by ray.wurlod on Thu Mar 26, 2015 7:50 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's generated SQL, so it will only put fields into the WHERE clause when they are marked as Key fields. I'm assuming that is what was meant by 'selected in the target ODBC connector stage' but please verify.

Still curious why the table name is parameterized.
-craig

"You can never have too many knives" -- Logan Nine Fingers
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

each column to be mentioned in the WHERE clause is identified in the metadata as Key which is the reason i am confused that I am getting this error.
Last edited by oracledba on Fri Mar 27, 2015 9:39 am, edited 1 time in total.
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

ok found the error...in the target ODBC connector the table name was referencing an old table since this job was copied from an older job. replaced with the current table name. reran the job with no problems.

Still this error from the log is very misleading and inaccurate. :roll:
Post Reply