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.
Parameters defined in the Parameters Tab of the Sub Job
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.
Test Parameters Step should be excluded from run when testing the main job or when promoting to production.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.