June 23, 2014 at 2:29 pm
I have an SSIS 2012 package that pulls a text file off of an FTP site into a table and then runs a couple of simple queries. I use a view on this table as the input to a C# script task whose main job is to parse some delimited columns in the data and then output to a different table.
The script works fine if I add a meaningless breakpoint to it. However, if I don't have a breakpoint, I always get the following error when my script task is executed:
OnError,myproject02,myproject02\Administrator,myproject services,{62C2887E-7798-4A6A-8C57-14FA36946B41},{505BB795-5317-46F9-A53B-15A0C14D9A21},6/23/2014 3:31:07 PM,6/23/2014 3:31:07 PM,-1073450910,0x,System.InvalidCastException: Invalid cast from 'DateTime' to 'Single'.
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
OnError,myproject02,myproject02\Administrator,myproject services,{62C2887E-7798-4A6A-8C57-14FA36946B41},{505BB795-5317-46F9-A53B-15A0C14D9A21},6/23/2014 3:31:07 PM,6/23/2014 3:31:07 PM,-1073450974,0x,SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Parse Sales Data" (139) failed with error code 0x80004002 while processing input "Input 0" (149). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
The error is not specific to the input file I use. Also, it occurs even if I comment out all of the code I have written for the script task. All of the code I've written for the task is in Input0_ProcessInputRow. Also, I don't see any place in my code, or even in the output columns, where I am casting a DateTime to a Single.
I'll appreciate any advice on how to get rid of this error.
Regards,
Anil
June 24, 2014 at 12:04 am
Try debugging the old school way. Add messagebox at every line and see how far you get...
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 24, 2014 at 8:42 am
Thanks very much for your reply, Koen.
I added a messagebox at the very top of Input0_ProcessInputRow. I also added one in PreExecute. Unfortunately, the code does not show either messagebox before throwing the error. If I add a breakpoint, I see my messageboxes, but then I don't get an error at all.
Is it possible that the error is being thrown between the time the task is called and the script is entered? If so, I'm wondering why adding the breakpoint would eliminate the issue.
Oddly, the output window says "Information: 0x0 at ...: 372708". The number 372708 is actually one of the data values from the first row of the input file. If I change the input file, it will give me the appropriate number. So it looks like the script is reading the input file.
I'll appreciate it if you have any additional thoughts.
Regards,
Anil
June 24, 2014 at 1:03 pm
Can you check the data types of all the columns in the data flow and compare them with the data types assigned in the input buffer? (you can find this in the properties dialog of the script task)
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 24, 2014 at 3:01 pm
Koen,
Thanks for your advice.
I ended up recreating the entire data flow, and now the error has disappeared. I think I may have run into some strange corner case SQL Server issue. Either that, or possibly my data type changed and, although I reconfigured my output/input types, something behind the scenes wasn't updated.
Not sure what happened, but I think I'm going to let it go.
Best regards,
Anil
June 24, 2014 at 3:09 pm
ag1975 (6/24/2014)
Koen,Thanks for your advice.
I ended up recreating the entire data flow, and now the error has disappeared. I think I may have run into some strange corner case SQL Server issue. Either that, or possibly my data type changed and, although I reconfigured my output/input types, something behind the scenes wasn't updated.
Not sure what happened, but I think I'm going to let it go.
Best regards,
Anil
Alright, glad it worked out.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 6 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