Professional Documents
Culture Documents
D at a Ware Ho using
PL SQ L
C o nt act Us
17
Sharing
Ap r 20 11
SCD Type 1
Naveen
0
Discussion Forum
Share
Filter
Discussio n Fo rum
Expressio n
Ro uter
Slo wly Changing Dim e nsio ns (SCDs) are dimensio ns that have data that
changes slo wly, rather than changing o n a time-based, regular schedule
So rter
Rank
Fo r e xam ple , yo u may have a dimensio n in yo ur database that tracks the sales
Transactio n Co ntro l
reco rds o f yo ur co mpany's salespeo ple. Creating sales repo rts seems simple
So urce Qualifier
eno ugh, until a salesperso n is transferred fro m o ne regio nal o ffice to ano ther. Ho w
No rmalizer
Sequence Generato r
Aggregato r
PDFmyURL.com
Aggregato r
were easy, and no w wo rks in a market where sales are infrequent, her to tals will
Unio n
lo o k much stro nger than the o ther salespeo ple in her new regio n, even if they are
Jo iner
Update Strategy
transferred perso n as a new sales perso n, but that creates pro blems also .
Lo o k Up
Subscribe t o Learn
Inf ormat ica
Type 1:
The Type 1 metho do lo gy o verwrites o ld data with new data, and therefo re do es
no t track histo rical data at all. This is mo st appro priate when co rrecting certain
types o f data erro rs, such as the spelling o f a name. (Assuming yo u wo n't ever
Like
123
ABC
Acme Supply Co CA
Test ing
Unit Testing
Integratio n Testing
UAT
Info rmatica Testing
Debugger
Co nstraint Based lo ading
Target Lo ad Plan
Subscribe
by the natural key (Supplier_Co de). Ho wever, the jo ins will perfo rm better o n an
integer than o n a character string.
Delivered by FeedBurner
No w imagine that this supplier mo ves their headquarters to Illino is. The updated
table wo uld simply o verwrite this reco rd:
Supplie r_Ke y Supplie r_Co de Supplie r_Nam e Supplie r_St at e
Perf ormanceTuning
123
Necessity Of
ABC
Acme Supply Co IL
Perfo rmance-tuning
Advanced
Concept s
Identificatio n Of bo ttle
Necks
Optimizatio n o f Bo ttle
Variable
necks
Mapplets
Partitio ning
Lo o kup
PDFmyURL.com
Push Do wn Optimizatio n
Ename
Sal
10 1
10 0 0
Chat wit h Me
10 2
20 0 0
10 3
30 0 0
Chat wit h Me
Offline
SCD - Type 3
Visit or's
Incremental Aggregatio n
Mapping Templates
Grid Pro cessing
Wo rk Flo w Variables
Emp no
Ename
Sal
10 1
10 0 0
10 2
20 0 0
10 3
30 0 0
The necessity o f the lo o kup transfo rmatio n is illustrated using the abo ve so urce
and target table.
So urce Table : (0 1-0 2-11) Targe t Table : (0 1-0 2-11)
Emp
Ename
Sal
Empno
Ename
Sal
10 1
10 0 0
10 1
10 0 0
10 2
250 0
10 2
250 0
10 3
30 0 0
10 3
30 0 0
10 4
40 0 0
10 4
40 0 0
no
namely
Lo o kup
use fo ur kinds o f
transfo rmatio n,
Expressio n
and the usage o f all the transfo rmatio ns will be discussed in detail belo w.
Lo o k up Transf o rm at io n: The purpo se o f this transfo rmatio n is to determine
whether to insert, Delete, Update o r reject the ro ws in to target table.
The first thing that we are go anna do is to create a lo o k up transfo rmatio n
and co nnect the Empno fro m the so urce qualifier to the transfo rmatio n.
The snapsho t o f cho o sing the Target table is sho wn belo w.
PDFmyURL.com
The co nditio n that we want to parse thro ugh o ur o utput data are listed
belo w.
Input IsNull(EMPNO1)
Output iif(No t isnull (EMPNO1) and Deco de(SAL,SAL1,1,0 )=0 ,1,0 ) .
We are all do ne here .Click o n apply and then OK.
Filt e r Transf o rm at io n: we are go nna have two filter transfo rmatio ns o ne to
insert and o ther to update.
Co nnect the Insert co lumn fro m the expressio n transfo rmatio n to the insert
co lumn in the first filter transfo rmatio n and in the same way we are go nna
co nnect the update co lumn in the expressio n transfo rmatio n to the update
co lumn in the seco nd filter.
Later no w co nnect the Empno , Ename, Sal fro m the expressio n
transfo rmatio n to bo th filter transfo rmatio n.
PDFmyURL.com
If there is no change in input data then filter transfo rmatio n 1 fo rwards the
co mplete input to update strategy transfo rmatio n 1 and same o utput is
go nna appear in the target table.
If there is any change in input data then filter transfo rmatio n 2 fo rwards the
co mplete input to the update strategy transfo rmatio n 2 then it is go nna
fo rward the updated input to the target table.
Go to the Pro perties tab o n the Edit transfo rmatio n
(i) The value fo r the filter co nditio n 1 is Insert.
(ii) The value fo r the filter co nditio n 1 is Update.
The Clo ser view o f the filter Co nnectio n is sho wn belo w.
Updat e
Twe e t
PDFmyURL.com
Sub mit
G e t th i s
Reactio ns:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave
a response.
0 Responses
Le ave a R e p ly
PDFmyURL.com
Comment as:
Publish
Preview
Previous Entries
Next Entries
Recent Comments
2009 - Complete reference to Informatica is proudly brought to you by Naveen
PDFmyURL.com