How do I resolve the "unused output column" warnings in SSIS jobs?

I am trying to get rid of some false warnings in my SSIS runtime log. I get a bunch of warnings about unused columns in tasks that use raw SQL to do their job. I have a data stream responsible for archiving data in a staging table before loading new data. The data stream is as follows:

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

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

The cleanup task is also an SQL command:

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

Since the upsert task has no output column definitions, I get 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. 

? , , , "" . , , . ?

!

+3
6

Union All - , , - .

, 2008, / .

+5

, MSDN:

Script 1 2; ; Script .

, .

- , OLEDB, SQL 2 , OLEDB, , , , , , - . . , .

+2

, , .

- . ( OLEDB Source: | | ) , .

.

, , , , .

+1

. . .

" " :

, , , :

  • . , , . , .
  • . , . , . , , , . . , , , .
  • . SSIS - , . , , , "--".
  • , . , , . , ETL , , , , . , , , . .
  • . , . , , " " OLEDB oledb. , ( ).
+1

, , SSIS " ". , , upsert, , - .

, , .

DataFlows , . UPSERT, Lookup ( TableDifference), OLEDB Destination (BULK INSERT) OLEDB ( UPDATE), OLDEB "UPDATE ".

, DataFlow - , Execute SQL SQL UPSERT (, ) SP.

OLEDBCommand , UPDATE INSERT Lookup - . .

0

DataFlow Task "upsert". Execute SQL Task . DataFlow Task sql-.

upserts, , Cade, , , OLE DB Destination ( ), , oledb . , .

0
source

Source: https://habr.com/ru/post/1699179/


All Articles