Validating data using regular expressions in a Script component
In this recipe, you will create a Script Component that will use the regular expressions in the DataProfiling.xml
file to validate the emails of the personal data extracted from a flat file.
Getting ready
This recipe assumes that you successfully completed the Reading data profiling XML results with Script task recipe earlier in this chapter. If you did not complete that recipe, you can prepare an appropriate SSIS package simply by completing step 1 of that recipe.
How to do it...
- Make sure that the
RegExValidation.dtsx
package is active in the control flow designer. - Right-click in the empty canvas of the
Connection Managers
pane at the bottom of the SSDT window and selectNew Flat File Connection...
from the shortcut menu. - Use the
Flat File Connection Manager Editor
to create a new connection manager, and on theGeneral
page enterPersonData
into the Connection manager name textbox. - To determine the
File name
property, clickBrowse...