July 26, 2010 at 2:11 pm
Hi all,
I have a requirement to update rows and lookup on updated rows, can this be done using SSIS , kind of dynamic lookup , I am using SSIS 2008...
thanks
Thanks [/font]
July 27, 2010 at 2:18 am
Please provide more detail - your requirement is difficult to understand. An example would help.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 27, 2010 at 11:02 am
Hi,
Here is the requirement in detail.
I have to lookup a table address and I am adding addresses in the same DATA FLOW TASK, so when the address is added for an account number, and the same account number comes again in the flow from my source ,the lookup should know that it is there now...
and should be able to look ip up now, and not add again an address.
Hope its clear.
Thanks [/font]
July 27, 2010 at 2:44 pm
So your DF contains duplicates? Why not get rid of them early in the DF and save yourself the trouble? If not, what happens when the lookup is successful? How is your source data ordered?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 27, 2010 at 2:54 pm
Hey Phil,
Actually the requirement is to lookup the updated rows...and dont update them if they are already updated, but since lookup cache the rows, I dont think this can happen, I will have to find some other way to do this....
Thanks [/font]
July 27, 2010 at 10:22 pm
an idea: use no cashing instead of full precaching, the default caching type
No caching, in which the reference dataset is accessed by each row in the rowset. To configure a Lookup transformation to use no caching, on the Advanced tab of the Lookup Transformation Editor, select Enable memory restriction and clear all other options .
July 28, 2010 at 1:34 am
ameda16 (7/27/2010)
an idea: use no cashing instead of full precaching, the default caching typeNo caching, in which the reference dataset is accessed by each row in the rowset. To configure a Lookup transformation to use no caching, on the Advanced tab of the Lookup Transformation Editor, select Enable memory restriction and clear all other options .
While that sounds that it might work, it also sounds very inefficient! Maybe the poster should consider using a staging table so that this can all be done using set-based updates.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 28, 2010 at 12:03 pm
I agree that the no-caching solution would be terribly inefficient.
I also think we need to remember rows in the pipeline that haven't been into the later stages of the process.
A row in the same internal batch that has dupes will not be detected because when the lookup occurs the updates have not been written yet. This may not be an issue in what you are describing but it is something to be aware of.
A more set based operation would be much more efficient.
CEWII
June 29, 2011 at 9:33 am
Hi,
I am also having the same issue where I have to lookup the updated rows...and don't update them if they are already updated. I know I can't use No Cache but would like to do that in the SSIS package. Any help will be appreciated.
Thanks.
June 29, 2011 at 9:46 am
hemani2000 (6/29/2011)
Hi,-- where I have to lookup the updated rows...and don't update them if they are already updated. --
Please try re-reading this & maybe you'll realise why I don't know what you mean 🙂
Can you provide an example to illustrate?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
June 29, 2011 at 10:12 am
I have 2 tables Staging and Master. I would like to add a new row in the Master if the data from staging table does not exists in Master. Staging table might have duplicate data, so I don't want to add the duplicate data in the Master.
I have 2 lookups, First on Id, FirstName_Soundex and LastName_Soudex and if there are records with no match then another lookup on LastName and FirstName.
Staging Table : Id, FirstName,FirstName_Soundex, LastName and LastName_Soundex
Master Table : Id, FirstName,FirstName_Soundex, LastName and LastName_Soundex
My main question is how can I avoid adding duplicate data into Master from Staging? and I don't want to remove duplicate records from Staging.
June 29, 2011 at 12:56 pm
Let me see if I understand. Your staging table is either a superset or roughly the same as the master table correct? the staging table can have duplicates. Are the duplicates EXACTLY the same? If not how do you choose the right one?
Also, are you sure it is 2005 because the no match output is not available in 2005, it was added in 2008 if I remember correctly. Also does your process do updates or just inserts?
CEWII
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply