February 1, 2007 at 6:00 am
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
February 2, 2007 at 7:35 am
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
February 3, 2007 at 10:52 am
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.
July 23, 2013 at 12:08 am
Have considered using Len function in ssis ? Just curious .
July 29, 2013 at 3:22 am
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.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy