Page 1 of 1

Conditionally (not) executing a stage in a job?

Posted: Sun May 03, 2009 8:16 pm
by sbass1
Sorry if this has been discussed before. I did search before posting.

I have a job like so:

SEQ1 --> XFM1 --> SEQ2 --> (more downstream XFM's -->)

With the volume of data in SEQ1, plus the code that's running in XFM1, the red bit takes a long time to execute.

In development, when I'm changing the downstream code a lot, this time lag can be onerous. For various reasons, I have to test the downstream code using a full data feed, i.e. not limit the number of rows.

Is there a way to conditionally execute a transform stage. In pseudocode:

If JobParm_SkipStage1 = "YES" then call DSTransformStop() (in XFM1 stage variable)

It so happens the SEQ2 target uses a job parameter for the directory of the output file, so if I just redirect that to /tmp the output from the previous run will be preserved, and the downstream stages will use that as input. I just don't know how to stop the transform without aborting the job. To me, this is just manually coding a restart point within a job.

Hope this is clear.

Thanks,
Scott

Posted: Sun May 03, 2009 10:19 pm
by chulett
No, not really. The only 'conditional execution' of this kind that you have control over is at the link level via constraints. However, when a constraint equates to false such that nothing is passed out the link, the derivations in the link columns do not 'fire' as well, so perhaps you could leverage that in your specific job if the writing of the sequential data can indeed be redirected separately from the reading of the data on the other side. Somewhat equivalent, it seems.

Or just run the red part once and then cut those stages out of the job to a scratch job. Add them back in once all of the 'downstream' work is done. This is the approach I would take in your shoes, FWIW.