SSIS inserting duplicates

  • Hi,

    I have an SSI package where I get data from source table, lookup for surrogate key in destination db and inserting into destination DB. While doing this, if we could not find some data in the destination DB, we insert dummy data into destinationDB for generating surrogate key and again lookup for surrogate key in destination db for that missing data. then union all these both data and finally insert into destination DB into another dimension table.

    Now the problem is sometimes we are getting data inserted twice(exactly duplicate).

  • [font="Comic Sans MS"]

    Can you be more specific on the workflow? Are you using sql query/sp anywhere or integration service components all the way?

    [/font]

    [font="Comic Sans MS"]--
    Sabya[/font]

  • Here you are using Lookup Cascading Pattern. Please make sure the following:

    1. First Lookup -- Setup the cache property to FULL Cache. This will have 2 outputs for you. 1 All exact match records and second rejected records.

    All Exact match records direct them to UNION ALL task.

    2. For Rejected records in Setp1 -- map it to second look up and set its properties to partial Cache.

    All matches redirect them to UNION All Task.

    3. Rejected records in Step 2 -- Map it to NO Cache lookup

    All matches redirect them to UNION All task

    Rejected records created a surrogate key in the lookup and then update the record and redirect output to UNION all.

    It would be nice if you could give a image of your current SSIS package for further inputs.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply