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