Feedback requested for SSIS Master package design - Running a bunch of Sub-Packages

坚强是说给别人听的谎言 提交于 2019-12-13 08:39:06

问题


Overall, I am looking for feedback regarding two different design options of running a master package.

I have one package that Agent calls that runs a bunch of packages that process data (I think we are up to about 50 now).

The original design was to group packages into smaller chunks called directorates which call the actual packages. Sample below:

A few perceptions I see (and experienced) with this approach is that: 1. Every package has to open (even if it is unnecessary to run ie no file present) 2. #1 adds so much time for the process to complete 3. Runs in parallel for sure

So I developed a new approach which will only run the packages that have the necessary files and logs the attempt if not. It is so much cleaner and you don't need all the file connections for each package to run since you are iterating through them.

I am not sure it runs in parallel (I actually doubt it).

I am adding the dataflow that populates the ADO Object that is being iterated in foreach to demonstrate the files being processed.

Note: Usually in DEV environment there are not many files to be processed, however, when deploying to TEST and PROD there will be most files present to be processed.

Can I get some feedback on these two different approaches?

Anyone that provides productive feedback will recieve upvotes!!!


回答1:


I will go with 2nd approach as its cleaner and easy to debug.

Here are the suggestions to improve 2nd approach :

  • Create a Control table with all package Names, Enable/Disable flag, FileAvailable Flag
  • Create a Poll package which will go through files and sets flag and package flag accordingly
  • Loop through this Control table and run only those are enabled and having file.



回答2:


I would go with modified first approach ie something like Inside package, use Script task to check if files are present in destination or not.

For instance :

  1. Create a Script task and a variable.


  1. Inside script task, write a code similar to the image below(Logic is, if file is found then flag it as true, else flag is false) :


  1. Now constraint the execution of DFT by using this flag as shown below :

Only con is, you'll have to make changes in 50 packages, but this is a one time activity. Your parallel execution will remain intact.



来源:https://stackoverflow.com/questions/45039351/feedback-requested-for-ssis-master-package-design-running-a-bunch-of-sub-packa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!