ssis - 如何消除 SSIS 作业中的 'unused output column' 警告?

标签 ssis logging

我正在尝试消除我的 SSIS 进度日志中的一些虚假警告。我收到一堆关于使用原始 SQL 完成工作的任务中未使用列的警告。我有一个数据流负责在加载新数据之前将数据存档在临时表中。数据流如下所示:

+--------------------+
| OLEDB Source task: |
| read staging table |
+--------------------+
          |
          |
+---------------------------+
| OLEDB Command task:       |
| upsert into history table |
+---------------------------+
          |
          |
+---------------------------+
| OLEDB Command task:       |
| delete from staging table |
+---------------------------+

我的“upsert”任务类似于:

--------------------------------------
-- update existing rows first...
update history
set    field1 = s.field1
    ...
from   history h
inner  join staging s
on     h.id = s.id
where  h.last_edit_date <> s.last_edit_date -- only update changed records

-- ... then insert new rows
insert into history
select s.*
from   staging s
join   history h
on     h.id = s.id
where  h.id is null
--------------------------------------

清理任务也是一条SQL命令:

--------------------------------------
delete from staging
--------------------------------------

由于 upsert 任务没有任何输出列定义,我在日志中收到一堆警告:

[DTS.Pipeline] Warning: The output column "product_id" (693) on output 
"OLE DB Source Output" (692) and component "read Piv_product staging table" (681) 
is not subsequently used in the Data Flow task. Removing this unused output column 
can increase Data Flow task performance. 

如何消除对这些列的引用?我尝试了一些不同的任务,但似乎没有一个能让我“吞下”输入列并从任务的输出中抑制它们。我想保持我的日志干净,所以我只看到真正的问题。有什么想法吗?

谢谢!

最佳答案

Union All - 仅选择要通过的列 - 删除任何其他列。

我以为他们会在 2008 年版本中解决这个问题,以允许从管道中修剪/抑制列。

关于ssis - 如何消除 SSIS 作业中的 'unused output column' 警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/266805/

相关文章:

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

ssis - 有没有办法从另一个构建为 "Any CPU"输出的项目中以 32 位运行时运行 SSIS 包?

c# - 根据 SSIS 或 SQL 中的源列自动在目标表中创建列

.net - 如何使用 log4net 将每个线程记录到单独的日志文件

debugging - 如何从hammerhead 获得更详细的调试信息?

c++ - 临时对象创建

python - 问题的扩展 "Python logging multiple files using the same logger"

ssis - 如何使用 SSIS 表达式将 yyyyMMdd 格式的字符串转换为日期?

sql - 无法将 SSIS 项目部署到 SQL Server

python 日志记录在所有程序完成之前不会释放文件