I am looking for a way to dynamically update parameters in DS 7.5.1.
Here is the scenario:
In my sequence the first job selects max(key). I need to pass the value to the next job and plug it into a surrogate_key_generator to provide the starting value.
If I use a stage variable I can't pass it to the next job. I need to get the value into a parameter that the SKG stage can understand.
I am not talking about parameters on the command line.
I need to get the value returned from the select into a "sequencer level" parameter that will be available to all jobs in the sequence.
I have perused many forums and all I have found are allusions to params on the command line or 'you can't do it'.
I refuse to believe that such a simple concept is not doable in DS.
Thanks,
Dymanic update of parametres/variables
Moderators: chulett, rschirm, roy
Dymanic update of parametres/variables
Keith Tweedly
Well it is certainly doable.
Let the first job be a server job that gets the max and stores it in the USER Status of the job. (Search the forum on how to do that)
Write a simple three/four liner server routine that gets this value back(Again search for it, i have seen it on the forum).
In the derivation portion of parameters of the job activity that calls your parallel job, call the server routine. This way the value will be populated during run time.
Let the first job be a server job that gets the max and stores it in the USER Status of the job. (Search the forum on how to do that)
Write a simple three/four liner server routine that gets this value back(Again search for it, i have seen it on the forum).
In the derivation portion of parameters of the job activity that calls your parallel job, call the server routine. This way the value will be populated during run time.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Premium Member
- Posts: 142
- Joined: Mon Jun 27, 2005 5:31 pm
- Location: Atlanta GA
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
I have a blog post on the same - Surrogate Key Generation in DataStage - An elegant way. If you know to use DataStage Job Control Interfaces specified in Advanced developer guide this will be really helpful.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>