Anda di halaman 1dari 2

Dynamic Lookup Cache

Let's think about this scenario. You are loading your target table through a mapping.
Inside the mapping you have a Lookup and in the Lookup, you are actually looking up
the same target table you are loading. You may ask me, "So? What's the big deal? We all
do it uite o!ten...". "nd yes you are right.
#here is no "big deal" because In!ormatica $generally% caches the lookup table in the very
beginning o! the mapping, so &hatever record getting inserted to the target table through
the mapping, &ill have no e!!ect on the Lookup cache. #he lookup &ill still hold the
previously cached data, even i! the underlying target table is changing.
'ut &hat i! you &ant your Lookup cache to get updated as and &hen the target table is
changing? What i! you &ant your lookup cache to al&ays sho& the e(act snapshot o! the
data in your target table at that point in time? )learly this reuirement &ill not be
!ull!illed in case you use a static cache. You &ill need a dynamic cache to handle this.
But why on earth someone will need a dynamic cache?
To understand this, let's next understand a static cache scenario.
Dynamic Lookup Cache Scenario
*otice in the previous e(ample I mentioned that your source table is an +,'-S table.
#his ensures that your source table does not have any duplicate record. What i! you had a
!lat !ile as source &ith many duplicate records? Would the scenario be same? *o, see the
belo& illustration.
Image. " Scenario illustrating the use o! dynamic lookup cache
/ere are some more e(amples &hen you may consider using dynamic lookup,
0pdating a master customer table &ith both ne& and updated customer
in!ormation as sho&n above
Loading data into a slo&ly changing dimension table and a !act table at the same
time. +emember, you typically lookup the dimension &hile loading to !act. So
you load dimension table be!ore loading !act table. 'ut using dynamic lookup,
you can load both simultaneously.
Loading data !rom a !ile &ith many duplicate records and to eliminate duplicate
records in target by updating a duplicate ro& i.e. keeping the most recent ro& or
the initial ro&
Loading the same data !rom multiple sources using a single mapping. 1ust
consider the previous +etail business e(ample. I! you have more than one shops
and Linda has visited t&o o! your shops !or the !irst time, customer record Linda
&ill come t&ice during the same load.