Welcome to MSDN Blogs Sign in | Join | Help

Lookup Pattern: Cascading

The cascading lookup pattern uses two lookup transforms with different cache modes. A common use of this pattern is when your data flow is inserting new rows into your reference table.

The first lookup in the chain is set to Full cache mode. Since it creates its cache before the data flow begins, it will only have the keys that exist before the package was executed.

A second lookup is hooked up to the No Match output of the first, using a Partial Cache mode. This one will pick up any rows that have been added since the data flow began. We hookup any logic needed to generate the key, or insert the row into the database into the No Match output of the second lookup.

Note, you don’t really need that first lookup – you could accomplish the same thing with a single lookup in a partial cache mode. But if you’re processing a good number of rows, and a large number of your keys already exist, the first lookup will improve your overall performance.

image

Make sure that you do not enable the Miss Cache ("Enable cache for rows with no matching entries" on the advanced options page). If you do, the partial cache won't go to the database the next time the key value comes in again.

Published Saturday, November 22, 2008 8:46 PM by mmasson
Filed under:

Comments

# Lookup Patterns

From the Lookup presentation I put together for the MS BI conference in October, here is a series of

Sunday, November 23, 2008 12:20 AM by SSIS Team Blog

# Learn more about Lookup and its new features: A compilation

The SQL Server Integration Services team added valuable new caching options (and scalability) to the

Monday, January 19, 2009 5:21 PM by Douglas Laudenschlager
Anonymous comments are disabled
 
Page view tracker