handling row length in SSIS

  • I have created a SSIS package in BIDS for loading data from text file. I have bad rows where the last column is absent, and I need to reject those. The rows supposedly should have fixed length, and the way to solve this, as I see it, is to redirect rows to good/bad  destinations based on row length.<script></script>

    I see nothing in BIDS data flow components expressions or system variables handling row lenth. So come a Script task. I saw the Row object in samples of VB.Net scipts, and it has size property, which may be a solution.

    Can you help with a sample of routine doing that? Also, is there any web site with a good reference to all VB.Net classes, their methods and properties?

    Thanks in advnce

    Vladimir Kievsky

  • One way to do this is a script task. In the script, you'll have something like this:

            Public Overrides Sub ProcessInputRow(ByVal Row as rowInBuffer)

     

    In that function, you can use this to get or test row length:

        Row.FullRow.Length

     

    Hope this helps.

     

    Bill

     

     

  • Thanks. I was able to go by using RaggedRight. Still, it was tricky: I needed to set row delimiter, it is a property without value by default.

     

  • Have considered using Len function in ssis ? Just curious .

  • Bill McDonough (2/2/2007)


    One way to do this is a script task. In the script, you'll have something like this:

    PublicOverrides Sub ProcessInputRow(ByVal Row as rowInBuffer)

    In that function, you can usethis toget or test row length:

    Row.FullRow.Length

    Hope this helps.

    Bill

    You are referring to a Script Component. Script Tasks are valid only in control flows.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 5 posts - 1 through 4 (of 4 total)

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