Netezza Stored Procedure Return Value

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
nvalia
Premium Member
Premium Member
Posts: 180
Joined: Thu May 26, 2005 6:44 am

Netezza Stored Procedure Return Value

Post by nvalia »

Hi All,

Since there is No Direct way of calling a Netezza SP from Datastage as the Stored Procedure stage does not support Netezza yet, so I am calling it from After SQL in a Netezza connector stage and it works thus far.

But I want to capture the return value from the SP and based on which conditionally halt the ETL cycle post this SP run via a Sequence job

How can I do this, has any one achieved this, appreciate any suggestions/solution

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

Post by chulett »

What kind of condition? What you want to do isn't directly possible as far as I know - either the After SQL runs without error and your job succeeds or it "fails" and your job aborts.

You may need to break it out as a separate step in the Sequence, run after the job completes... perhaps called from the command line? Then you should be able to interrogate the results and handle your condition, I would think.
-craig

"You can never have too many knives" -- Logan Nine Fingers
nvalia
Premium Member
Premium Member
Posts: 180
Joined: Thu May 26, 2005 6:44 am

Post by nvalia »

For the scenario where I wanted to use a Return Code to halt the ETL cycle, I am now throwing an Exception in the Stored Procedure itself (instead of using a separate return code) and so now the SP fails conditionally..hencethe job fails and I can then halt the next processes in the Cycle using this in the Trigger condition in the Job Activity Stage
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8)
-craig

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