问题描述
我正在处理一个包含源,大约80个查找和1个目标的包。
I am working on a package that contains a Source, about 80 lookups and 1 destination.
源表中的数据不够一致,因此我的包经常失败。
The data in the source table is not consistent enough and hence my package fails very often.
有没有一种方法可以转移在将它们插入目标表时给出的所有行?
Is there a way by which I can transfer all the rows which are giving at the time of inserting them in destination table?
例如我在Source中有5行,其中第1行和第4行会出错。现在的结果应该是第2,第3和第5应该到达目的地,但是第1和第4应该存储在某个平面文件或db表中。
For eg. I have 5 rows in Source and out of which 1st and 4th will give error. Now the result should be that 2nd, 3rd and 5th should go in destination but 1st and 4th should be stored in some flat file or a db table.
在此先感谢
推荐答案
您可以创建第二个 OLE DB目标
并指向红色箭头从您的数据转换
任务到此目的地。然后在数据转换
任务中选择配置错误输出,然后选择重定向行
作为所有错误/截断的选项。完成新的目的地映射,您已完成:正确的数据现在应到达第一个目的地(绿色箭头),错误的数据应到达第二个目的地(红色箭头)。
You can create a second OLE DB Destination
and direct the red arrow from your Data Conversion
task to this destination. Then choose Configure Error Output in your Data Conversion
task and choose Redirect row
as an option for all Errors/Truncations. Finish the new destination mapping and you're done: data that is correct should now go to your first destination (green arrow) and incorrect data should go to your second destination (red arrow).
这篇关于ETL SSIS:将错误行重定向到单独的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!