ssis - 捕获坏行
你好,你能帮我解决这个问题吗?有没有办法获取 ssis 中发生错误的行?我有一个包含 10k 多条记录的平面文件,这些记录是通过“平面文件源”读取的。 现在,错误输出默认为错误列、错误代码和“flatfilesourceerroroutputcolumn” - 我使用脚本组件来处理它。但这三个输入(到脚本组件)都不够用户友好。所以我想获得像发生错误的行的第一个列值(这是唯一标识符)的输出。我怎样才能添加它?
HI, Can you help me to figure this out? Is there a way to get the row in which error occured in ssis? I have this flat file with some 10k + records which is being read via a 'flatfilesource'.
Right now the error output defaults to error-column, error-code, and 'flatfilesourceerroroutputcolumn' - and i use a script-component to handle it. But none of these three inputs (to script component) are user-friendly enough. So i want to get an output like the first column-value(this is a unique identifier) of the row in which error occured. How can I add that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 SSIS 中调试此问题时,您可以在脚本处理错误的路径上添加数据查看器。该路径包含错误所在的原始行的所有列。
如果您想处理 SSIS 错误并用它执行其他操作,您可以将错误输出从平面文件源定向到多播,然后将一个流发送到文件、表或其他内容(Recordset 目标)并且用于存储 Recordset 的对象上的后续 foreach 循环将允许您在错误行上逐行执行操作。
While debugging this in SSIS, you can add a Data Viewer on the path to where your script handles error. This path has all the columns of the original row where your error is.
If you want to handle your SSIS errors and also do something else with it, you can direct the error output from your flat file source to a Multicast and then send one stream down to a file, a table, or something else ( a Recordset destination and a subsequent foreach loop on the object used to store the Recordset will let you do stuff on a row-by-row basis on the errored row(s)).