尽管记录匹配正确,但 SSIS 查找失败

标签 ssis ssis-2012

错误信息:

Reason: Fail - Row yielded no match during lookup. SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "LKP Staging and Location" failed because error code 0xC020901E occurred, and the error row disposition on "LKP Staging and Location.Outputs[Lookup Match Output]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "LKP Staging and Location" (2) failed with error code 0xC0209029 while processing input "Lookup Input" (16). 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.

我正在从 Excel 中读取数据并将其存储到 Statging 表中。相同的数据存储在另一个名为 Location 的表中。现在,通过使用查找,我正在匹配这两个数据并尝试从 Location 表中获取标识值。

所以数据是一样的,但我不确定为什么会失败。如果没有匹配项,我将无法完成任务。由于相同的数据存储在两个表中,因此应该匹配吗?

该包在开发数据库中成功运行,但同一个包未在 SIT 数据库中运行。

在 Dev 中我使用 SQL 身份验证,在 SIT 中使用 Windows 身份验证。

有什么建议吗?

最佳答案

经过几次分析,我自己找到了答案。 这里要注意两点, 即使两个表中的值相同,如果数据类型不同(第一个表中的 char 和第二个表中的 varchar),也会抛出错误,提示不匹配。

在查找属性中将验证元数据设置为 false。因为它也在验证元数据。如果您确信两个表结构是同步的,就应该这样做。

以上 2 个检查已经解决了我的问题。

关于尽管记录匹配正确,但 SSIS 查找失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27820331/

相关文章:

sql-server - 执行 SSIS 包给出 System.IO.IOException

sql-server - SSIS - 当其他表包含具有特定值的数据时截断表

sql - SSIS - 将 nchar 空字符串转换为 int 时出现表达式计算错误

sql - SSIS:以编程方式生成创建表 DDL

sql-server - 带有来自变量的动态 ConnectionString 的 SSIS 2012 Excel 源

c# - 在 C# 中以编程方式加载 SSIS 包

ssis-2012 - SSIS根据字段内容将输出拆分为多个文件

excel - Azure Data Lake Excel 导出到 CSV 作为同一文件夹/路径

variables - 如何找到SSIS包中所有使用变量的地方?

sql-server - 将字符串转换为 Int SSIS