In this article, we will show you how to apply SSIS Package Configuration using Registry Entry with example. We already explained the list of Package Configurations in our previous article. So, please refer to the Package Configuration to understand the same.
Before we start the SSIS Package Configuration using Registry Entry, You have to add a new entry to the registry. So that you can access it while configuring the package. To open a system registry, Go to the Search Bar and Type Run. Remember, it is dangerous to edit Registry entries. So, I suggest you back up the registry file before you start proceeding.
Type Regedit (Short form of Registry edit) and click OK
Right-click on the HKEY_CURRENT_USER will open the context menu. Please select New and then Key
Assign the key name as per your requirements. Here we assigned Variables as the key name.
Right-click on the Variables key-> New -> String value to add value to the Key
Assign Value as the name of the new string value
Double click on the Value will open a new pop up window. Assign data as Bachelors.
SSIS Package Configuration using Registry Entry
Before we start SSIS Package Configuration using Registry Entry, let me execute the package and see what is it returning.
To configure the package, right-click on the control flow region will open the context menu. Please select the Package Configurations.. option from it
Once you select the Package Configurations.., a new window called Package Configurations Organizer is opened. Please checkmark the Enable Package Configurations to enable the configurations. Next, click on the Add button to add a new Package Configuration using Registry Entry in SSIS.
Clicking the Add button will open a package configuration wizard. The first page is the welcome wizard, and please checkmark Don’t show this page again to avoid this page.
Select Configuration type: This is the page that we have to use to select the configuration type. By default, SSIS selects an XML configuration file. In this example, we are explaining about SSIS package configuration using registry entry. So, let me choose the Registry Entry as the configuration type.
Next, we are specifying the registry key that we created earlier.
Select Target Property: You have to specify the target value here. Here we want to assign this Registry value to package variable (InputEducation) value. It means the default value of InputEducation, i.e., Masters Degree, will replace with the Bachelors at run time.
Let me rename the SSIS package Configuration name as Registry Entry Configuration. And click the Finish button to close the wizard.
Now you can see our newly created Environment variable configuration that holds the Education value.
Let us Run the package to see the result.
From the above screenshot, you can see that it is displaying the records whose Education is Bachelors, and yearly Income is 90000. It means, package variable value (InputEducation) replaced by the Registry key value.