Oracle Enterprise Stage Reject Link is not working

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
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Oracle Enterprise Stage Reject Link is not working

Post by sohasaid »

The Oracle enterprise stage performs a strange behavior here. The inserted data into the stage contains redundant data but it's not rejecting them although it inserts only the unique records into the database according to the primary keys? And there're no warning at the job log.

I'm enabling the 'Output Reject Record' option, anything else I've missed?

Regards.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you are using upsert method, then no error would be generated, since the first record does an insert, the second an update.
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

Any Suggestions?
Last edited by sohasaid on Sun Mar 21, 2010 5:00 am, edited 1 time in total.
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

Any Suggestions?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes. Clarify your issue, especially your Write Method setting.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

- Stage is Oracle Enterprise Stage
- The Write Method is 'Upsert'
- Upsert Order is 'Insert then Update'
- Upsert Mode is 'Auro-generted Update & Insert'

The data source table have no physical primary key but the destination have, I need to capture those records which are not inserted.

Regards.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... as Arnd noted right away, any records 'not inserted' get updated. Why? Because that's what you told it to do. And an error is generated only if both actions fail, the insert and then the update.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

chulett wrote: an error is generated only if both actions fail, the insert and then the update.
Got them. I changed the Upsert Mode to 'user-defined Update & Insert' and copied the insert statement to update statement place as I don't expect any updates. And I captured them. :)

Thanks Arnd & chulett for your help.
Regards.
Post Reply