Home Forums Data Warehousing Integration Services Run a child package with its own configuration file from a parent SSIS package RE: Run a child package with its own configuration file from a parent SSIS package

  • wschampheleer (2/22/2010)


    I'm not sure I fully understand your question, but here's nonetheless a first attempt at answering it.

    You are right that you will need an execute package task to run the child package from its parent.

    In the child package, you should use package configurations. The important thing to know here is that package configurations can set a variable or property multiple times where the last setting wins. If a configuration fails (either because the variable or property it is trying to set does not exist or - in the case of a configuration of type "Parent Package Variable" - the parent package variable does not exist), this will give a warning but this will not hinder your package executing.

    Ok, understood. However, if I'm setting up a child package to be run via an execute package task in the parent, I don't get the option to use a particular configuration file. If the parent package overrides the child package then that's fine, I'll just place the same variables in my parent package and place them in the parent's configuration file.

    If the configurations are the same for both packages, you could use the same configuration file (or same configuration filter in case your configurations are stored in a database) for the child and the parent package.

    If the configurations are different, you have several options:

    - use different configuration files (one for the parent and one for the child)

    - use the parent configuration file in both packages, but then overwrite some values with settings specific to the child package using a second configuration file that is specific to the child and that is read after the first one.

    Think I see what you mean here, however, as I can't see how you can apply a configuration file in an execute package task how do you apply the different configuration file to the child? Could it be that in the parent, when you set up package configuration files in the parent (SSIS > Package Configurations...) that you add them in there in order you want them to apply? e.g. if you had a configuration file for the child setting variable var1, and the parent package configuration file sets values for variables var1, var2, var3, then you place two configuration files in there, one for var1 in child and the second to be var1 to var3 in the parent. The var1 in the second configuration (parent) file overwriting the var1 in the first (child config) file?

    If the settings in the child package are different depending on whether it is executed on its own or called from the parent package, you would do as above, but add a final configuration where you overwrite some values using Parent Package Variables. If the child package is executed on its own, the parent variables are not defined and this step will have no effect (you will see a warning though).

    PS: You can turn these warnings off, but you are discouraged to do this in a production environment.