BookmarkSubscribeRSS Feed
TapioKalmi
SAS Employee

In DI Studio we have nice tool for different kind of iterations in a job: Loop transformation.

You can put some process steps in a loop, or you can drop a job into a loop. If you drop a job, you may define also job parameters which are delivered from the main job to the sub job via loop transformation logic. The details to do this kind of implementation can be found from the DI Studio documentation. But how to make testing of this kind of sub job as easy as possible? You would like to test the sub job independently at modular level without any main job. And when the main job is missing, there are not any call parameters coming in.

Those parameters are macro variable values, so the easiest way is to add some code to initialize the macro variable values.  But that code should be in use only in module testing and excluded from the run in all the other cases. The best way is to put one User Written Code Step into the job. Please find below some screenshots of Santa’s Sample to jobs.

Main Job

main_job.jpg

Parameters defined in the Parameters Tab of the Sub Job

parameters.jpg

Testing with parameters without main job

Test Parameters Step is in use only when testing the sub job without any main job. It has only the macro variable initialization commands.

test1.jpg

test2.jpg

Test Parameters Step should be excluded from run when testing the main job or when promoting to production.

exclude1.jpg

exclude2.jpg

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

Discussion stats
  • 0 replies
  • 468 views
  • 4 likes
  • 1 in conversation