如何消除SSIS作业中的“未使用的输出列"警告? [英] How to eliminate 'unused output column' warnings in SSIS jobs?

查看:96
本文介绍了如何消除SSIS作业中的“未使用的输出列"警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图摆脱SSIS进度日志中的一些虚假警告.我收到一堆关于使用原始SQL进行工作的任务中未使用列的警告.我有一个数据流,负责在加载新数据之前在临时表中存档数据.数据流如下所示:

I'm trying to get rid of some spurious warnings in my SSIS Progress log. I'm getting a bunch of warnings about unused columns in tasks that use raw SQL to do their work. I have a Data Flow responsible for archiving data in a staging table prior to loading new data. The Data Flow looks like this:

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

我的"upsert"任务类似于:

my 'upsert' task is something like:

--------------------------------------
-- 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命令:

The cleanup task is also a SQL command:

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

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

Since the upsert task doesn't have any output column definitions, I'm getting a bunch of warnings in the log:

[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. 

如何消除对这些列的引用?我尝试放入一些不同的任务,但是似乎没有一个让我吞并"输入列并从任务输出中抑制它们.我想保持日志清洁,这样我才可以看到真正的问题.有什么想法吗?

How can I eliminate the references to those columns? I've tried dropping in a few different tasks, but none of them seem to let me 'swallow' the input columns and suppress them from the task's output. I'd like to keep my logs clean so I only see real problems. Any ideas?

谢谢!

推荐答案

全部联合-仅选择要传递的列-删除其他任何列.

Union All - select only the columns you want to pass through - delete any others.

我认为他们将在2008年版本中解决此问题,以允许从管道中修剪/抑制列.

I thought they were going to address this in the 2008 version to allow columns to be trimmed/suppressed from the pipeline.

这篇关于如何消除SSIS作业中的“未使用的输出列"警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆