You are on page 1of 13

Ho me

Inf o rmat ica

D at a Ware Ho using

Unix- She ll Scrip t s

PL SQ L

C o nt act Us

Complete reference to Informatica

21
Sharing

Ap r 20 11

Type 2
Naveen

0
Discussion Forum

Transf ormat ion

Share

Filter

Discussio n Fo rum

Expressio n
Ro uter

Int roduct ion

SCD 2 (Co m ple t e ):

So rter
Rank

ETL Life Cycle

Transactio n Co ntro l

What Is Info rmatica

So urce Qualifier

Client Co mpo nents

Sto red Pro cedure

Services Behind Scene

SQL Transfo rmatio n

Try U R Hand's o n AdminCo nso le


Difference Between 7.1 and

Le t us drive t he po int ho m e using a sim ple sce nario . Fo r e g., in t he

No rmalizer

curre nt m o nt h ie .,(0 1-0 1-20 10 ) we are pro vide d wit h an so urce t able wit h

Sequence Generato r
Aggregato r

PDFmyURL.com

Difference Between 7.1 and

t he t hre e co lum ns and t hre e ro ws in it like (EMpno ,Enam e ,Sal). T he re is

Aggregato r

8 .6

a ne w e m plo ye e adde d and o ne change in t he re co rds in t he m o nt h (0 1-

Unio n

Info rmatica 8 .6 Installatio n

0 2-20 10 ). We are go nna use t he SCD-2 st yle t o e xt ract and lo ad t he

Jo iner

re co rds in t o t arge t t able .

Update Strategy

The thing to be no ticed here is if there is any update in the salary o f any

Int erview Zone

Lo o k Up

emplo yee then the histo ry o f that emplo yee is displayed with the current
date as the start date and the previo us date as the end date.

Info rmatica Real Time


Interview Questio ns
Info rmatica Experienced
Interview Questio ns - part1
Info rmatica Experienced
Interview Questio ns - part2
Info rmatica Experienced
Interview Questio ns - part3
Info rmatica Experienced

Subscribe t o Learn
Inf ormat ica

Source Table: (01-01-11)


Like

Emp no

Ename

Sal

10 1

10 0 0

10 2

20 0 0

10 3

30 0 0

157 people like this.

Interview Questio ns - part4


Data Wareho using co ncept

Target Table: (01-01-11)

Enter yo ur email address:

Based Interview Questio ns

Test ing
Unit Testing
Integratio n Testing
UAT
Info rmatica Testing
Debugger
Co nstraint Based lo ading
Target Lo ad Plan

Skey

Emp no

Ename

Sal

S-date

E-date

Ver

Flag

10 0

10 1

10 0 0

0 1-0 1-10

Null

20 0

10 2

20 0 0

0 1-0 1-10

Null

30 0

10 3

30 0 0

0 1-0 1-10

Null

Subscribe
Delivered by FeedBurner

Perf ormanceTuning
Necessity Of

Source Table: (01-02-11)

Perfo rmance-tuning

Advanced
Concept s

Emp no

Ename

Sal

10 1

10 0 0

10 2

250 0

10 3

30 0 0

Mapping Parameter's &


Variable
Mapplets
Partitio ning

Identificatio n Of bo ttle
Necks
Optimizatio n o f Bo ttle
necks
Perfo rmance tuning o f
Lo o kup
PDFmyURL.com

Partitio ning
Wo rking with links

10 4

Push Do wn Optimizatio n

40 0 0

Scheduler
Types o f Task's- 1
Types o f Task's- 2
Indirect Metho d fo r Lo ading
SCD - Type 1

Chat wit h Me

Target Table: (01-02-11)


Skey

Emp no

Ename

Sal

S-date

E-date

Ver

Flag

10 0

10 1

10 0 0

0 1-0 2-10

Null

20 0

10 2

20 0 0

0 1-0 2-10

Null

30 0

10 3

30 0 0

0 1-0 2-10

Null

20 1

10 2

250 0

0 1-0 2-10

0 1-0 1-10

40 0

10 4

40 0 0

0 1-0 2-10

Null

Chat wit h Me
Offline

SCD - Type 2
SCD - Type 3
Incremental Aggregatio n

Visit or's

Mapping Templates
Grid Pro cessing
Wo rk Flo w Variables

In the seco nd Mo nth we have o ne mo re emplo yee added up to the table with the
Ename D and salary o f the Emplo yee is changed to the 250 0 instead o f 20 0 0 .
St e p 1: Is to impo rt So urce Table and Target table.
Create a table by name emp_so urce with three co lumns as sho wn abo ve in
o racle.
Impo rt the so urce fro m the so urce analyzer.
Drag the Target table twice o n to the mapping designer to facilitate insert o r
update pro cess.
Go to the targets Menu and click o n generate and execute to co nfirm the
creatio n o f the target tables.
The snap sho t o f the co nnectio ns using different kinds o f transfo rmatio ns
are sho wn belo w.

PDFmyURL.com

In The Target Table we are go anna add five co lumns (Skey, Versio n, Flag,
S_date ,E_Date).
St e p 2: Design the mapping and apply the necessary transfo rmatio n.
Here in this transfo rmatio n we are abo ut to
transfo rmatio ns
Transfo rmatio n

namely

Lo o kup

use fo ur kinds o f

transfo rmatio n

(3), Filter Transfo rmatio n

(1),

(2), Sequence

Expressio n
Generato r.

Necessity and the usage o f all the transfo rmatio ns will be discussed in
detail belo w.
Lo o k up Transfo rmatio n: The purpo se o f this transfo rmatio n is to Lo o kup o n the
target table and to co mpare the same with the So urce using the Lo o kup Co nditio n.
The first thing that we are go nna 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

Drag the Empno co lumn fro m the So urce Qualifier to the Lo o kup
Transfo rmatio n.
The Input Po rt fo r o nly the Empno 1 sho uld be checked.
In the Pro perties tab (i) Lo o kup table name ->Emp_Target.
(ii)Lo o k up Po licy o n Multiple Mismatch -> use Last Value.
(iii) Co nnectio n Info rmatio n ->Oracle.
In the Co nditio ns tab (i) Click o n Add a new co nditio n
(ii)Lo o kup Table Co lumn sho uld be Empno , Transfo rmatio n po rt sho uld be
Empno 1 and Operato r sho uld =.
Expre ssio n Transf o rm at io n: After we are do ne with the Lo o kup Transfo rmatio n
we are using an expressio n transfo rmatio n to find whether the data o n the so urce
table matches with the target table. We specify the co nditio n here whether to insert
o r to update the table. The steps to create an Expressio n Transfo rmatio n are
sho wn belo w.
Drag all the co lumns fro m bo th the so urce and the lo o k up transfo rmatio n
PDFmyURL.com

and dro p them all o n to the Expressio n transfo rmatio n.


No w do uble click o n the Transfo rmatio n and go to the Po rts tab and create
two new co lumns and name it as insert and update. Bo th these co lumns
are go anna be o ur o utput data so we need to have unchecked input check
bo x.
The Snap sho t fo r the Edit transfo rmatio n windo w is sho wn belo w.

The co nditio n that we want to parse thro ugh o ur o utput data are listed
belo w.
Insert : IsNull(EmpNO1)
Update: iif(No t isnull (Skey) 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 need two filter transfo rmatio ns the purpo se the first
filter is to filter o ut the reco rds which we are go anna insert and the next is vice
versa.
If there is no change in input data then filter transfo rmatio n 1 fo rwards the
co mplete input to Exp 1 and same o utput is go anna appear in the target
PDFmyURL.com

table.
If there is any change in input data then filter transfo rmatio n 2 fo rwards the
co mplete input to the Exp 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 2 is Update.
The clo ser view o f the co nnectio ns fro m the expressio n to the filter is
sho wn belo w.

PDFmyURL.com

Se que nce

Ge ne rat o r: We use this to generate an incremental cycle o f

sequential range o f number.The purpo se o f this in o ur mapping is to increment the


skey in the bandwidth o f 10 0 .

We are go nna have a sequence generato r and the purpo se o f the


sequence generato r is to increment the values o f the skey in the multiples
o f 10 0 (bandwidth o f 10 0 ).
Co nnect the o utput o f the sequence transfo rmatio n to the Exp 1.
Expre ssio n Transf o rm at io n:
Exp 1: It updates the target table with the skey values. Po int to be no ticed here is
skey gets multiplied by 10 0 and a new ro w is generated if there is any new EMP
added to the list. Else the there is no mo dificatio n do ne o n the target table.

PDFmyURL.com

Drag all the co lumns fro m the filter 1 to the Exp 1.


No w add a new co lumn as N_skey and the expressio n fo r it is go nna be
Nextval1*10 0 .
We are go anna make the s-date as the o /p and the expressio n fo r it is
sysdate.
Flag is also made as o utput and expressio n parsed thro ugh it is 1.
Versio n is also made as o utput and expressio n parsed thro ugh it is 1.
Exp 2: If same emplo yee is fo und with any updates in his reco rds then Skey gets
added by 1 and versio n changes to the next higher number,F
Drag all the co lumns fro m the filter 2 to the Exp 2.
No w add a new co lumn as N_skey and the expressio n fo r it is go nna be
Skey+1.
Bo th the S_date and E_date is go nna be sysdate.

PDFmyURL.com

Exp 3: If any reco rd o f in the so urce table gets updated then we make it o nly as the
o utput.

If change is fo und then we are go nna update the E_Date to S_Date.


Updat e St rat e gy: This is place fro m where the update instructio n is set o n the
target table.
PDFmyURL.com

The update strategy expressio n is set to 1.


St e p 3: Create the task and Run the wo rk flo w.
Do nt check the truncate table o ptio n.
Change Bulk to the No rmal.
Run the wo rk flo w fro m task.
Create the task and run the wo rk flo w.

Share

Twe e t

Sub mit

G e t th i s

St e p 4 : Preview the Output in the target table.


PDFmyURL.com

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

Enter your comment...

Comment as:
Publish

Preview

Links to this post


Create a Link

Previous Entries

Next Entries

Recent Comments
2009 - Complete reference to Informatica is proudly brought to you by Naveen

PDFmyURL.com

You might also like