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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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