First a brief background. I have one master package that calls 3 child packages (load to staging, load to DW, process cube).
These 4 packages are stored on the Integration Services MSDB and a SQL Agent job calls the master integration package every 6 hours.
My requirement is to execute the load to staging package every 6 hours (as is happening now) and then the full master package every 24 hours. (so the load to DW and Cube is only executed once a day)
The problem I face, is I have to have only 1 SQL Agent job, calling 1 package (the master package)
So I need some kind of logic that for the first 3 executions of the job, only execute the load to staging package and then on the 4<sup>th</sup> execution load all 3 packages (staging, DW,Cube).
I was thinking of two options, but I don’t like either… so any help would be great
Option 1. Store a counter in a SQL table, ever time the job executes call this counter in a package variable and then depending on the value (either 1,2,3,4) load only staging or load the full process). The counter is reset after 4 executions
Option 2. When executing the job, the master package checks for the time, if between a certain time execute the full process, otherwise only execute load to staging.
If you need any further info, let me know.
Thanks