• For testing purposes I created a spreadsheet with 3 columns, Column A, B and C each with the values A B C respectively in ~60,000 rows and used this as my data source.

    Using the script below:

    ' Microsoft SQL Server Integration Services Script Component

    ' Write scripts using Microsoft Visual Basic 2008.

    ' ScriptMain is the entry point class of the script.

    Imports System

    Imports System.Data

    Imports System.Math

    Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

    Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

    Imports Microsoft.SqlServer.Dts.Pipeline

    Imports System.Text

    Imports System.Security.Cryptography

    <Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute()> _

    <CLSCompliant(False)> _

    Public Class ScriptMain

    Inherits UserComponent

    Private InputBuffer As PipelineBuffer

    Public Overrides Sub ProcessInput(ByVal InputID As Integer, ByVal Buffer As PipelineBuffer)

    InputBuffer = Buffer

    MyBase.ProcessInput(InputID, Buffer)

    End Sub

    Public Overrides Sub PreExecute()

    MyBase.PreExecute()

    '

    ' Add your code here for preprocessing or remove if not needed

    ''

    End Sub

    Public Overrides Sub PostExecute()

    MyBase.PostExecute()

    '

    ' Add your code here for postprocessing or remove if not needed

    ' You can set read/write variables here, for example:

    ' Me.Variables.MyIntVar = 100

    ''

    End Sub

    Public Overrides Sub InputSource_ProcessInputRow(ByVal Row As InputSourceBuffer)

    Dim counter As Integer = 0

    Dim values As New StringBuilder

    For counter = 0 To inputBuffer.ColumnCount - 1

    Dim value As Object

    value = inputBuffer.Item(counter)

    values.Append(value)

    Next

    Row.Concat = values.ToString

    Row.HashValue = CreateHash(values.ToString())

    End Sub

    Public Shared Function CreateHash(ByVal data As String) As String

    Dim dataToHash As Byte() = (New UnicodeEncoding()).GetBytes(data)

    Dim md5 As MD5 = New MD5CryptoServiceProvider()

    Dim hashedData As Byte() = md5.ComputeHash(dataToHash)

    RNGCryptoServiceProvider.Create().GetBytes(dataToHash)

    Dim s As String = Convert.ToBase64String(hashedData, Base64FormattingOptions.None)

    Return s

    End Function

    End Class

    I get the following results:

    RowRow 1 onwards

    Column AA

    Column BB

    Column CC

    HashValuecWd0tTqSuYUlu6F5oVnMcQ==

    ConcatABC

    RowRow 11167 onwards

    Column AA

    Column BB

    Column CC

    HashValueEP2rhBgzqDEc0qmEjWlQBA==

    ConcatABCcWd0tTqSuYUlu6F5oVnMcQ==ABC

    RowRow 24194 onwards

    Column AA

    Column BB

    Column CC

    HashValuedLHcMhE2RJZ6ew7Jd8oezQ==

    ConcatABCEP2rhBgzqDEc0qmEjWlQBA==ABCcWd0tTqSuYUlu6F5oVnMcQ==ABC

    RowRow 37221 onwards

    Column AA

    Column BB

    Column CC

    HashValue93k+mMDI1x5OoZ0cjtz7Hw==

    ConcatABCdLHcMhE2RJZ6ew7Jd8oezQ==ABCEP2rhBgzqDEc0qmEjWlQBA==ABCcWd0tTqSuYUlu6F5oVnMcQ==ABC

    RowRow 50248 onwards

    Column AA

    Column BB

    Column CC

    HashValueRHGVCjMX9usJb160IvP6RQ==

    ConcatABC93k+mMDI1x5OoZ0cjtz7Hw==ABCdLHcMhE2RJZ6ew7Jd8oezQ==ABCEP2rhBgzqDEc0qmEjWlQBA==ABCcWd0tTqSuYUlu6F5oVnMcQ==ABC

    RowRow 58881 onwards

    Column AA

    Column BB

    Column CC

    HashValuecWd0tTqSuYUlu6F5oVnMcQ==

    ConcatABC

    Looking at the concat results the previous buffers HashValue is getting include in the InputSource for some reason. When I add the line Row.ColumnCount = InputBuffer.ColumnCount the value is 5 for each row even though I've only selected 3 columns as part of InputSource.