Custom Data Flow Component – Credit Card Number Validator 
SQL Services Integration Services (SSIS) provides a wide range of out-of-box components to perform almost any ETL task. In addition, the object model of Integration Services allows you to create re-usable custom components. Different types of custom objects can be developed, including:
- Custom tasks.
- Custom connection managers. Connect to external data sources that are not currently supported.
- Custom log providers. Log package events in formats that are not currently supported.
- Custom enumerators. Support iteration over a set of objects or values formats that are not currently supported.
- Custom Data Flow Components. Can be configured as sources, transformations, or destinations.
In this post, step-by-step instruction is provided to create a Custom SSIS Data Flow Component called Credit Card Number Validator. This component validates Credit Card Numbers using Luhn Mod 10 Algorithm.
What is Credit Card Number Validator?
The Credit Card Number Validator takes in a String/Numeric input and performs a Synchronous, Non-Blocking transformation using Luhn Mod 10 algorithm and determines whether the input is a valid credit card number or not. The output is true if the input is a valid credit card number and false otherwise. The Credit Card Number Validator is a Class Library (a DLL) that will be loaded at design time by BIDS and at run time by the Integration Services runtime.
Step 1: Create a Class Library Project
Create a new project of type Class Library from VS. I’m using C# for this project.
Step 2: Inherit from PipelineComponent Base Class
- Since Credit Card Number Validator is a Data Flow Component, it has to inherit PipelineComponent Base class and override its Design-time and Run-time methods.
- The DTSPipelineComponentAttribute is applied to this class to make it a Transformation type Data Flow Component
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Pipeline; // Contains the managed data flow engine
using Microsoft.SqlServer.Dts.Pipeline.Wrapper; //Contains the primary interop assembly (PIA), or wrapper, for the native data flow engine.
using Microsoft.SqlServer.Dts.Runtime.Wrapper; //Contains the primary interop assembly (PIA), or wrapper, for the native run-time engine.
namespace BennyAustin.SQLServer.SSIS.Extensions
{
[Microsoft.SqlServer.Dts.Pipeline.DtsPipelineComponent(DisplayName = "CCNValidator", Description = "Credit Card Number validation using Luhn Mod 10 algorithm.", ComponentType = ComponentType.Transform)]
public class CCNValidator : PipelineComponent
{
}


July 1, 2009 at 00:12
[...] SSIS components. For the purpose of illustration, the custom SSIS data Flow Component – Credit Card Number Validator is [...]
July 3, 2009 at 00:28
[...] the techniques to debug Design-time and Run-time methods using the Custom Data Flow Component, Credit Card Number Validator as an [...]
August 3, 2009 at 22:09
Source Code and Assembly for Credit Card Number Validator can be downloaded from CodePlex http://ccnv05.codeplex.com/