RCP dataset needs to update/delete/insert an Oracle 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
SIHM
Premium Member
Premium Member
Posts: 52
Joined: Fri Oct 18, 2013 3:56 am

RCP dataset needs to update/delete/insert an Oracle stage

Post by SIHM »

I have a generic job. This has a dataset with RCP and a field with the change capture in , a filter stage and an Oracle stage. Using this information, I must either insert update or delete rows in a table.

Given that I don't have the SQL, how can I set the key column so that the stage knows which rows to delete or update.

Are there any functions to do this or must I pass in an SQL statement to the job to do this.

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

Post by ray.wurlod »

This should be available from the table definition you imported from the Oracle table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SIHM
Premium Member
Premium Member
Posts: 52
Joined: Fri Oct 18, 2013 3:56 am

Post by SIHM »

Sorry Ray. I dont understand your answer.

Yes, I can import the schema from the table, but the dataset that I have could contain possibly only 1 field in the case of a delete, x fields for an update and all fields for an insert.

Is there anyway of reading the schema of the dataset at runtime and then passing a parameter in to set one of the fields as a key ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No.

Perhaps you could use a generic name for the key explicitly in DataStage, and create an alias in the database for the key column.
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 »

Perhaps this post might help.
-craig

"You can never have too many knives" -- Logan Nine Fingers
SIHM
Premium Member
Premium Member
Posts: 52
Joined: Fri Oct 18, 2013 3:56 am

Post by SIHM »

Thanks Craig for the post.

Finally I wrote a routine to read the Key columns and non Key columns from the partial schemas available and create SQL from that.
Post Reply