Link to home
Start Free TrialLog in
Avatar of gcrickman
gcrickmanFlag for United States of America

asked on

SSIS 2005 push csv import errors to a table

I have created a package to import rows into a table from a CSV flat file. Everything works great. But now I have to push any rows that fail to import to the staging table into a error taable so that I can report which rows failed. I have been successful in pushing those error rows to another flat file but I would like to push to a table if possible.
Avatar of Jason Yousef
Jason Yousef
Flag of United States of America image

Just redirect the error rows to another OLEDB destination. User generated image
Also if you want to redirect the OLEDB destination errors, this article talks about that

http://agilebi.com/jwelch/2008/09/05/error-redirection-with-the-ole-db-destination/
Avatar of gcrickman

ASKER

in your first post how did you add your destination columns to error output line?
When I open the OLE DB DEstination for the Error Output I see this?
 User generated image
So I can't seem to mapp the columns correctly and no way to add the columns
You do that from the flat file source, as in my screen shot and it'll redirect the error rows to the RED output and just connect a normal OLEDB source and map the columns to your separate table.
This is what I see when I click on the OLE DB destination when mappnig the columns.
I think the reason is that the data flow is only sending those three columns and not the source tables columns.
 User generated image
Ok, so you destination table is holding those three columns. I think I get that now.
I was hoping that the destination table would hold the entire row data that errored out from the source. Is there a way I can see that?
No, because it;s an error column, or truncated column, means it task cannot read it, that's why no way to see it.

and it's the same in 2008 too, hopefully they can fix that or get a way around it.

But you could get the error rows ,out of the OLEDB destination because it's already in the pipe.
Ok, i'm thinking again, and I think the only way around it, is to read the file using a script component, that way you could redirect the whole rows to another output.
Cold you explain how I would get the error rows out of the OLEDB destination.
ASKER CERTIFIED SOLUTION
Avatar of Jason Yousef
Jason Yousef
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much. You have been really helpful. I am sure that I will have further questions with this project I am working on.
Sure, anytime...

Also you could e-mail me at huslayer@hotmail.com when you post a question so I can get on it right away...

Thanks
Jason