Passing inputs to a SP Stage from another 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
harsh_cs31
Participant
Posts: 9
Joined: Fri Jul 17, 2009 11:42 am

Passing inputs to a SP Stage from another stage

Post by harsh_cs31 »

Hey,
I'm working on huge sets of data and to load the entire table from the source does not makes sense.
I can write a query to get the required records only but I want to use as little SQL as I can.
I want to write a sp that will have a certain input param which can be passed by say, an ODBC stage.
Based on this input my sp will return the required dataset.
Is there any way to incorporate this?

Regards,
Harsh
suresh.angadi
Participant
Posts: 17
Joined: Tue Jun 23, 2009 6:44 pm

Re: Passing inputs to a SP Stage from another stage

Post by suresh.angadi »

Hi Harsh,

you can use the custom SQL along with parametrization and use the arry size as 1000 and transaction size to 10000.

Regards
Suresh
harsh_cs31 wrote:Hey,
I'm working on huge sets of data and to load the entire table from the source does not makes sense.
I can write a query to get the required records only but I want to use as little SQL as I can.
I want to write a sp that will have a certain input param which can be passed by say, an ODBC stage.
Based on this input my sp will return the required dataset.
Is there any way to incorporate this?

Regards,
Harsh
Suresh Angadi
suresh.angadi
Participant
Posts: 17
Joined: Tue Jun 23, 2009 6:44 pm

Re: Passing inputs to a SP Stage from another stage

Post by suresh.angadi »

Hi Harsh,

you can use the custom SQL along with parametrization and use the arry size as 1000 and transaction size to 10000.

Regards
Suresh
harsh_cs31 wrote:Hey,
I'm working on huge sets of data and to load the entire table from the source does not makes sense.
I can write a query to get the required records only but I want to use as little SQL as I can.
I want to write a sp that will have a certain input param which can be passed by say, an ODBC stage.
Based on this input my sp will return the required dataset.
Is there any way to incorporate this?

Regards,
Harsh
Suresh Angadi
Grace J.
Participant
Posts: 22
Joined: Mon Nov 03, 2008 5:34 am

Post by Grace J. »

In the syntax tab of Stage properties of SP stage, set the procedure type to "Transform". Then in the Parameters tab set the input and output parameters as u need...In the Input properties tab, click on "Forward row data" and "Execute Procedure for each row"
harsh_cs31
Participant
Posts: 9
Joined: Fri Jul 17, 2009 11:42 am

Thanks a lot

Post by harsh_cs31 »

Hey,
Thanks Grace
It sure helped
Post Reply