我正在尝试消除 SSIS 进度日志中的一些虚假警告。我收到一堆关于使用原始 SQL 完成工作的任务中未使用列的警告。我有一个数据流,负责在加载新数据之前将数据归档到临时表中。数据流如下所示:
+--------------------+
| OLEDB Source task: |
| read staging table |
+--------------------+
|
|
+---------------------------+
| OLEDB Command task: |
| upsert into history table |
+---------------------------+
|
|
+---------------------------+
| OLEDB Command task: |
| delete from staging table |
+---------------------------+
我的“更新插入”任务是这样的:
--------------------------------------
-- 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.
如何消除对这些列的引用?我尝试过添加几个不同的任务,但似乎没有一个任务能让我“吞掉”输入列并从任务的输出中抑制它们。我想保持我的日志干净,这样我就只能看到真正的问题。有任何想法吗?
Thanks!
Union All - 仅选择您想要通过的列 - 删除任何其他列。
我认为他们会在 2008 版本中解决这个问题,以允许从管道中修剪/抑制列。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)