Oracle Function through Stored Procedure - for few rows only

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
koti9
Participant
Posts: 52
Joined: Wed Nov 09, 2005 10:51 am

Oracle Function through Stored Procedure - for few rows only

Post by koti9 »

Hi,
Did any one ran oracle function through stored procedure stage for few records only, and let other records pass through with out any processing? If yes, Can you tell me how did you do it?


Thanks & Regards
Koti
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

You will need to fork(split) your data into 2 streams - using filter stage or transformer stage with constraints - the rows selected for oracle processing will go through oracle stored proc stage and form one input to a funnel stage
The other rows that dont need oracle function to be executed will be directly input to funnel stage.

The funnel method is up to your choice.

Another way is to have the stored proc stage ( oracle function) consume all rows and write the function call in such a way so that only rows meeting a specific criteria will have the function return a different result , others will return the same output value as input , or a null in the new output column.

HTH
Post Reply