Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | alexandrem95 |
View: | 225 times |
Download: | 0 times |
of 13
7/27/2019 122528428 Dynamic Lookup Cache
1/13
LabDynamic Lookup
Lab at a Glance................................................................2
Objectives..............................................................2Summary................................................................2Duration.................................................................2
Exercises..........................................................................3
Exercise 1: Create the Mapping.............................3Exercise 2: Create an !un the "or#$%o&............12
PowerCenter 7 Level I Developer Lab Guide 8 - 1
7/27/2019 122528428 Dynamic Lookup Cache
2/13
Lab. Dynamic Lookup
Lab at a Glance
The exercises in this lab are designed to walk the student
through the process of using a Lookup transformation.
Objectives
After completing the lab, the student will be able to use aDynamic Lookup transformation.
Summary
The purpose of this lab is to load an ODS!"#LO$!! table
with records.
The data will be extracted from the !"#LO$!! flat file. The
target table ODS!"#LO$!! table will be used as the lookup
table.
SOURCE% !"#LO$!! flat file
TARGET% ODS!"#LO$!!
The completed mapping should look as follows%
DurationThis lab should take approximately 40minutes.
8- PowerCenter 7 Level I Developer Lab Guide
7/27/2019 122528428 Dynamic Lookup Cache
3/13
Lab. Dynamic Lookup
Exercises
Exercise 1: Create the a!!in"
Ste! 1. #m!ort the source table.
&lear the Source Analy'erworkspace (right)click
anywhere in the workspace and select Clear All*.
&ontinue to work in the assigned student folder and
import the EMP relational source table from the SDBUdatabase schema.
The source should look as follows%
Ste! 2. #m!ort the tar"et.
&lear the +arehouse Designer workspace (right)clickanywhere in the workspace and select Clear All*.
mport theEMPLOYEE_TGT relational database target table
from the TDBUxxdatabase schema.
The target should look as follows%
Sa-e the repository.
PowerCenter 7 Level I Developer Lab Guide 8 - !
7/27/2019 122528428 Dynamic Lookup Cache
4/13
Lab. Dynamic Lookup
Ste! 3. Creatin" a ma!!in".
&reate a mapping called
m_EMP_TGT_DYNAMIC_LOOKUP.
Ste! $. %&& source an& tar"et.
Add the EMP source definition with its respecti-e Source
ualifier to the mapping%
Add the target definitionODS_CUSTOMER_ACTIVE.
Sa-e the repository.
Ste! '. Create a loo(u! trans)ormation.
&lick the Lookup Transfora!"on button. #osition the
pointer in the workspace and click again.
The Sele#! Lookup Ta$le for Lookup Transfora!"ondialog
appears.
Since the EMPLOYEE_TGT tablewhich is imported as atarget.
&lick O%and a Lookup transformation will appear in the
workspace.
/ename the Lookup transformation
8- " PowerCenter 7 Level I Developer Lab Guide
7/27/2019 122528428 Dynamic Lookup Cache
5/13
Lab. Dynamic Lookup
The Designer willautomatically choose theports to compare based on
lkp_EMPLOYEE_TGT.
&opy0link the following ports from Double)click on the
header of lkp_EMPLOYEE_TGT.
EMP_&O
E&AME
'OB
MGR
(IREDATE
SAL
COMM
DEPT&O
The E)"! Transfora!"onsdialog box appears.
&lick on the Con)"!"ontab and click the A)) a ne*
#on)"!"onbutton%
Select EMP&Oand INEMP&Ofor the condition.
&hange the Conne#!"on Infora!"onon the Proper!"estab to
+Sour#e:
PowerCenter 7 Level I Developer Lab Guide 8 - #
7/27/2019 122528428 Dynamic Lookup Cache
6/13
Lab. Dynamic Lookup
the sequential order ofLookup ports and Inputports.
Because the source andlookup tables come fromthe same database(schema) the !"ource
#ariable may be used.
"ake sure that Dynamic Lookup &ache check box and
nsert0!lse update box is checked.
1ow 1ewLookup/ow input row port is added to ports
which is not editable.
0 = In!e,ra!"on Ser-"#e )oes no! up)a!e or "nser!
!.e ro* "n !.e #a#.e/
1 = In!e,ra!"on Ser-"#e "nser!s !.e ro* "n!o !.e
#a#.e/
2 = In!e,ra!"on Ser-"#e up)a!es !.e ro* "n !.e
#a#.e/
8- $ PowerCenter 7 Level I Developer Lab Guide
7/27/2019 122528428 Dynamic Lookup Cache
7/13
Lab. Dynamic Lookup
"ust gi-e associated expression.
While using a dynamic lookup cache, we must associate each
lookup/output port with an input/output port or a sequence ID. The
Integration Service uses the data in the associated port to insert or update
rows in the lookup cache. The Designer associates the input/output ports
with the lookup/output ports used in the lookup condition.
When we select Sequence-ID in the ssociated !ort column, the
Integration Service generates a sequence ID "or each row it inserts into the
lookup cache.
&hange the data type of !"##2 to nteger.Se3uence)dwill be added.
&lick O%to close theE)"! Transfora!"onsdialog box.
Sa-e the repository.
PowerCenter 7 Level I Developer Lab Guide 8 - 7
7/27/2019 122528428 Dynamic Lookup Cache
8/13
Lab. Dynamic Lookup
Ste! *. Create the +outer ,rans)ormationrtr-ELO/EE-,G,
&opy0link the following ports from
lkp_EMPLOYEE_TGT to the router and create tow new
groups 1S!/T and 4#DAT!
&e*LookupRo*
EMP_P%
EMP_&O
E&AME
'OB
MGR
(IREDATE
SAL
COMM
DEPT&O
8- 8 PowerCenter 7 Level I Developer Lab Guide
7/27/2019 122528428 Dynamic Lookup Cache
9/13
Lab. Dynamic Lookup
Ste! 0. Create an u!&ate strate"y trans)ormation.
$se an $pdate "trategytransformation whenkeeping history informationin a table or updating a
table to keep the mostcurrent information.
&reate two 4pdate Strategy transformation and
name it upd_EMP_TGT_INS andupd_EMP_TGT_UPD.
&opy0link the following ports fromrtr!"#LO$!!T5T 1S!/T 5roup toupd_EMP_TGT_INS and Update grup t
upd_EMP_TGT_UPD %
EMP_P%
EMP_&O
PowerCenter 7 Level I Developer Lab Guide 8 - %
7/27/2019 122528428 Dynamic Lookup Cache
10/13
Lab. Dynamic Lookup
E&AME
'OB
MGR
(IREDATE
SAL
COMM
DEPT&O
!dit upd_EMP_TGT_INS.
&lick on the Proper!"estab and add the following
expression in the Up)a!e S!ra!e,0 Express"onfield%DD_INSE!T
6alidate the formula and clickthe O%button to close theExpress"on E)"!orwindow
!dit upd_EMP_TGT_UPD
&lick on the Proper!"estab and add the followingexpression in the Up)a!e S!ra!e,0 Express"onfield%
DD_INSE!T
6alidate the formula and clickthe O%button to close theExpress"on E)"!orwindow.
&lick O%to close the E)"! Transfora!"onwindow.
Sa-e your work.
Ste! . Dra" the tar"et tice into or(s!ace.
/ename the targets as !"#LO$!!T5T1S!/T and!"#LO$!!T5T4#DAT!.
8- 1& PowerCenter 7 Level I Developer Lab Guide
7/27/2019 122528428 Dynamic Lookup Cache
11/13
Lab. Dynamic Lookup
Ste! . Lin( the tar"et &e)inition.
Link manually from upd!"#T5T1S to!"#LO$!!T5T1S!/T and upd!"#T5T4#Dto !"#LO$!!T5T4#DAT!
Sa-e the repository.
PowerCenter 7 Level I Developer Lab Guide 8 - 11
7/27/2019 122528428 Dynamic Lookup Cache
12/13
Lab. Dynamic Lookup
Exercise 2: Create an& +un the 4or()lo
Ste! 1. Create a or()lo.
&reate a workflow called"#_EMPLOYEE_DYNAMIC_LKP.
&reate a session task called $_m_EMP_TGT_DYNAMIC_LOOKUP.
Double)click on the session task. The E)"! Tasksdialogbox appears.
Select the Mapp"n,tab.
n the 1a-igation box, select the source S1_I&VOICE.
4nder Conne#!"ons, click on the down arrow , select
na!"-e_sour#eand click O%.
n the 1a-igation box, select the targetODS_CUSTOMER_ACTIVE.
4nder Conne#!"ons, click on the down arrow ,
select na!"-e_!ar,e!_xxand click O%.
4nder Proper!"es, the Tar,e! loa) !0peshould be
defaulted to &oral. Scroll down to select theTrun#a!e !ar,e! !a$le op!"on.
&lick O%to close the E)"! Tasksdialog box.
Link S!ar!to $_ m_EMP_TGT_DYNAMIC_LOOKUP%
Sa-e, -alidate and start *f_ODS_CUSTOMER_ACTIVE_xx.
"onitor and re-iew the results for $_
m_EMP_TGT_DYNAMIC_LOOKUPin the +orkflow
"onitor.
Ste! 2. 5eri)y results 6 session trans)ormationstatistics.
8- 1 PowerCenter 7 Level I Developer Lab Guide
7/27/2019 122528428 Dynamic Lookup Cache
13/13
Lab. Dynamic Lookup
Ste! $. 5eri)y results.
%ote that only the first fewrows are shown here.