When I design a ETL package for importing Oracle some data to SQL Server by SQL command, that is “Select data from Oracle in the time duration”, it is successful for me to do it.
If repeat the above step “start debugging”, the same data will be import again. That is duplicated data in database now.
How to resolve this problem? I want
"If Imported data is the same as SQL data and one field is corrected, this record will overwrite the SQL data.”
"If imported data is the same as SQL data but no field is changed,this record will be ignored.”
"If imported data is new,the record will insert directly it into SQL database.”
For the above target, I will correct the original SSIS Package for satisfying the necessity.
(1).Add "Lookup" Data Flow Transformation
In Solution Explorer, select the original SSIS Package as "Package Lookup.dtsx" next to click "Data Flow" tab.
Right-Click the green line between "Data Conversion" and "SQL Server Destination" next to select "Delete" in menu.
Click the Data Flow Transformation as "Lookup" in the left panel
Drag & Paste it to the empty space of Data Flow Task.
Click green arrow in Data Conversion
Drag & Paste it to Lookup
So does that it will create a green line between Data Conversion and Lookup
Click a green arrow in Lookup
Drag & Paste it to SQL Server Destination
When you release mouse, the "Input Output Selection" Windows will show up.
In Output field, select "Lookup No Match Output"
Click OK button
The Data Flow will be built now.
沒有留言:
張貼留言