October 1, 2019 at 9:41 pm
I have a master/parent package, that calls the child packages in SSIS. The Master package takes the startdate and enddate and get all the dates from the given Startdate and enddate and run the child packages in loop. Example: Startdate = 1/1/2019' and Enddate ='1/10/2019'. SO the Master loops through 9 times meaning 1-9th january data will be loaded from child package to correspoding tables.
Right now i pass the dates manually to loop through. How can i automate the package to take start and enddate?
October 1, 2019 at 10:22 pm
Are you talking about passing in the start and end dates to the master package as parameters?
If so, set them up as, erm, parameters in the master package.
And then, you can pass in the dates without needing to modify the package.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 2, 2019 at 6:34 pm
I think using a child package like this may not be the best performing idea, but here is how you could do it.
First, in the master package, have an Data Flow that would get your range of dates. As a really simple example, I could query a calendar table and return a range of dates. Next, have these dates load into a Recordset Destination.
The recordset uses a local variable of Data Type Object.
After this is done, use a Foreach Loop Container to loop through the recordset and pass the date values to your child package.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply