【问题标题】:The external column "y.col1" (598) needs to be removed from the external columns需要从外部列中删除外部列“y.col1”(598)
【发布时间】:2014-08-19 22:34:24
【问题描述】:

我在 sql 命令中从变量中使用以下查询来从两个不同的表中获取数据。

SELECT x.*, y.col1, y.col2
FROM table1 AS x 
INNER JOIN table2 AS y ON y.AccID = x.accID

根据我的业务逻辑,我需要将查询用作变量中的 sql 命令。 当我将 DelayValidation 设置为 True 后运行包时,出现以下错误:

"[OLE source **table1**]] Warning: The external columns for component 
"OLE source" (1) are out of synchronization with the data source columns.
The external column "**col2**" (601) needs to be removed from the external columns.
The external column "**Col1**" (598) needs to be removed from the external columns."..

[SSIS.Pipeline] Error: "component "OLE source **table1** " (1)" failed validation
and returned validation status "VS_NEEDSNEWMETADATA".

【问题讨论】:

    标签: ssis


    【解决方案1】:

    SQL 中的更改影响了 OLE 源组件的设置。您需要重新访问 SQL 输出的列分配。此外,您还必须检查您的目标 SSIS 组件,以查看是否有任何更改也会对其产生影响。每次更改 SQL 时,养成仔细检查 sql-column-to-component-column 分配的习惯。

    Warning: The external columns for component "OLE source" (1) are out of synchronization with the data source columns. 表示检测到您的组件发生了变化。将 DelayValidation 设置为 TRUE 仅意味着在设计时不会进行任何组件验证。

    The external column "**col2**" (601) needs to be removed from the external columns. The external column "**Col1**" (598) needs to be removed from the external columns.".. 将帮助您指出您的作业可能出错的方向。似乎您可能在执行包之前的某个时间减少了列或添加了它们。这就是组件验证的严格性所在——也有可能您只更改了 SQL 命令的大小写(在这种情况下可能是列名),仅此一项就可以触发"VS_NEEDSNEWMETADATA"

    再次检查组件的列分配,如果您更改源组件列设置中的任何部分,它也会影响目标(如果有的话,还会影响其间的其他数据转换)。

    【讨论】:

    • 你提到检查的东西,但我如何让错误消失?似乎不是每次都有一个按钮可以帮助我解决问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-04
    • 2013-05-08
    相关资源
    最近更新 更多