Override SQL selection criteria param thru job seq to job

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
Chandrathdsx
Participant
Posts: 59
Joined: Sat Jul 05, 2008 11:32 am

Override SQL selection criteria param thru job seq to job

Post by Chandrathdsx »

I have a job Get_cust_count to get the total number of customers in a perticular state-cd from a teradata table. I am using Teradata connector stage, the SQL is: Select count(*) from Cust_Address where State_CD = '#STATE#'
I am passing the STATE as job parameter with a default value of 'TX' in the same job Get_cust_count.

Then I created a sequence to run the job Get_cust_count and added the parameter STATE and trying to override the STATE to 'CA' at the runtime of sequence but it is still taking the default value 'TX' that was defined in job.

How do I override the parameter STATE in jobsequence with 'CA' instead of predefined 'TX' that was defined in the job.

Thanks for the help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Create a parameter in the Sequence job for the state and pass it to the PX job's matching parameter in the Job Activity state.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Chandrathdsx
Participant
Posts: 59
Joined: Sat Jul 05, 2008 11:32 am

Post by Chandrathdsx »

chulett wrote:Create a parameter in the Sequence job for the state and pass it to the PX job's matching parameter in the Job Activity state. ...
Thanks Chulett, passing the parameter from seq to job worked. Can I use the same thing in Parameter set and override the value of parameter set from job sequence to PX Job at run time?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As far as I know, yes, but I don't have any personal experience with 8.x or parameter sets yet.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That answer IS yes, the syntax is setname.parametername but, when you use the mouse (Insert Job Parameter), the syntax is managed automatically.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Chandrathdsx
Participant
Posts: 59
Joined: Sat Jul 05, 2008 11:32 am

Post by Chandrathdsx »

ray.wurlod wrote:That answer IS yes, the syntax is setname.parametername but, when you use the mouse (Insert Job Parameter), the syntax is managed automatically. ...
I tried it with defining a paramset xyz.state with the default value as 'TX'. When I am running the job seq with override xyz.state = 'CA', but the output still I see the results of TX. I am using the same parameter set in the job as well in the sequence and I am trying to override the job paramset value from job seq. Please help.... Thanks.
Chandrathdsx
Participant
Posts: 59
Joined: Sat Jul 05, 2008 11:32 am

Post by Chandrathdsx »

Hello Gurus, Any help with overriding the parameter set values in job sequence for the following requirement:
I tried it with defining a paramset xyz.state with the default value as 'TX'. When I am running the job seq with override xyz.state = 'CA', but the output still I see the results of TX. I am using the same parameter set in the job as well in the sequence and I am trying to override the job paramset value from job seq. Please help.... Thank you!.
Jasti
Participant
Posts: 44
Joined: Sat Apr 14, 2007 6:34 am
Location: Hyderabad, India

Post by Jasti »

Please check whether you are passing the correct values(matching parameters of the job sequence) in the Value Expressions to all the parameters(of the job) in your job activity stage.
If everything is fine in the job activity stage then there will be no problem to override the default values of parameters in the job.
In our project for all the jobs we pass the insert,update sqls and keep specifications as parameters from job sequences n I have never faced this issue..!!
Thanks,
Mohan.A.Jasti.
Chandrathdsx
Participant
Posts: 59
Joined: Sat Jul 05, 2008 11:32 am

Post by Chandrathdsx »

Jasti wrote:Please check whether you are passing the correct values(matching parameters of the job sequence) in the Value Expressions to all the parameters(of the job) in your job activity stage.
If everything is fine in the job activity stage then there will be no problem to override the default values of parameters in the job.
In our project for all the jobs we pass the insert,update sqls and keep specifications as parameters from job sequences n I have never faced this issue..!!
.
Hello, Thanks for your reply.. I too never had a problem with Passing the parameters. But, I think I can not pass the parameter set values from job activity to the job parameter set values. Anyone, please confirm.. thank you!
Chen That
Post Reply