How to get unmatched data between two sources in SSIS Data Flow?

后端 未结 2 1445
轻奢々
轻奢々 2021-01-12 19:26

I have two data sources, one sql table, one flat file (csv). Both sources have exact same columns. Example Data:

Table:

HCN  Name  Surname   DOB
111          


        
相关标签:
2条回答
  • 2021-01-12 19:34

    SOLUTION 1 : LOOKUP:
    You can follows theses steps:

    • add a lookup transformation
      in connection tab, choose your flatfile connexion
      in column tab, drag and drop the Join column in general tab, handle not matching entries by redirect rows
    • Redirect the non matching output to your destination

    SOLUTION 2 : LEFT ANTI JOIN

    You can follows theses steps:

    1 Sort datasets / or modifiy the properties of the source to isSorted = true

    2 Use a LEFT JOIN on the key, and add a new column containing the id of the right side

    3 Add a conditional split condition on right side ID is null

    Then redirect CASE 1 splited data to your destination, you have only rows from the left side without right side correspondance

    0 讨论(0)
  • 2021-01-12 19:38

    Firstly I suggest you to load Flat file data into OLEDB staging table, Which is optional. If you Load flat file data into destination, you can align primary keys for the look up.

    Create a staging table to insert unmatched records, you will only need asynchronous transformation in this case

    Refer Below for Look up Transformation

    Check for Look up Columns:

    Here is example

    0 讨论(0)
提交回复
热议问题