Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS inserting duplicates


SSIS inserting duplicates

Author
Message
giribabugeda-633679
giribabugeda-633679
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
Points: 42 Visits: 110
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).
sabyasm
sabyasm
Old Hand
Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)

Group: General Forum Members
Points: 360 Visits: 524

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


--
Sabya

SSIS_NewBi
SSIS_NewBi
Valued Member
Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)

Group: General Forum Members
Points: 60 Visits: 118
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search