Update Script component on fly

  • Hi,

    In my SSIS Project I am using Script component, below is the code.

    I am referring 100 of table using single Data Flow Task, every table have different numbers of column.

    I want to refresh the columns in input column tab with selected in script component transformation.

    as you can see in code the column are static means table have 8 column.

    what if the next table have 10 column .

    I want to do it dynamically on fly.

    Code:-

    Public Class ScriptMain

    Inherits UserComponent

    Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider()

    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)

    Dim columnContents As Byte() = UnicodeEncoding.Unicode.GetBytes(Row.Col001 + Row.Col002 + Row.Col003 + Row.Col004 + Row.Col005 + Row.Col006 + Row.Col007 + Row.Col008)

    System.Windows.Forms.MessageBox.Show(columnContents.ToString())

    Dim hash As Byte() = md5.ComputeHash(columnContents)

    Dim hashString As String = Convert.ToBase64String(hash, Base64FormattingOptions.None)

    Row.RowChecksum = hashString

    End Sub

    End Class

    Please help me to achieve my requirement.

    Regards,

    Vipin jha

  • This is not possible with SSIS out of the box.

    Metadata cannot change dynamically while running the package.

    You can either purchase 3rd party components, or you can generate your packages with code, such as BIML.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply