Hi Gurus,
Let us study how to create lookup transformation using ODI.
Run th ODI
Open Designer
I have two models namely SRC_SCOTT and TRG_SCOTT
I have EMP and DEPT tables in my SRC_SCOTT model and
I have TRG_EMP_DEPT_OJOIN table in TRG_SCOTT model.
I have to populate TRG_EMP_DEPT_OJOIN table EMP table and lookup on DEPT table.
Create new interface with the name INF_TRG_EMP_DEPT_OJOIN
Drag and drop EMP table from the SRC_SCOTT Model to sources pane
Drag and drop TRG_EMP_DEPT_OJOIN from TRG_SCOTT model to target pane
Create a new lookup by clicking on the Magnified glass button as show below
Select EMP table from the left and DEPT table from the right
Click on next
Select DEPTNO from source and DEPTNO from Lookup
And click on Join
Select staging area
Click on finish
You can see the lookup table under source pane
Clcik on mapping properties of target column DNAME
click on expression editor as shown below
Drag and drop DNAME from lookup table DEPT to the expression space
click apply
click ok
repeat the above steps to map the target column LOC
Click on Flow tab of the interface
Click on staging area
Now you can see the IKM properties
Set FLOW_CONTROL to false
set TRUCATE_TABLE to true
Click on save
right click on interface INF_TRG_EMP_DEPT_OJOIN and click on execute
Open the operator and view the log
Thanks & Regards
WWW.ODIGURUS.COM
Let us study how to create lookup transformation using ODI.
Run th ODI
Open Designer
I have two models namely SRC_SCOTT and TRG_SCOTT
I have EMP and DEPT tables in my SRC_SCOTT model and
I have TRG_EMP_DEPT_OJOIN table in TRG_SCOTT model.
I have to populate TRG_EMP_DEPT_OJOIN table EMP table and lookup on DEPT table.
Create new interface with the name INF_TRG_EMP_DEPT_OJOIN
Drag and drop EMP table from the SRC_SCOTT Model to sources pane
Drag and drop TRG_EMP_DEPT_OJOIN from TRG_SCOTT model to target pane
Create a new lookup by clicking on the Magnified glass button as show below
Select EMP table from the left and DEPT table from the right
Click on next
Select DEPTNO from source and DEPTNO from Lookup
And click on Join
Select staging area
Click on finish
You can see the lookup table under source pane
Clcik on mapping properties of target column DNAME
click on expression editor as shown below
Drag and drop DNAME from lookup table DEPT to the expression space
click apply
click ok
repeat the above steps to map the target column LOC
Click on Flow tab of the interface
Click on staging area
Now you can see the IKM properties
Set FLOW_CONTROL to false
set TRUCATE_TABLE to true
Click on save
right click on interface INF_TRG_EMP_DEPT_OJOIN and click on execute
Open the operator and view the log
Thanks & Regards
WWW.ODIGURUS.COM
Thanks :)
ReplyDeleteCan you show finally SQL-statement?
Which is the advantage of using lookups instead of adding the second datatable and configure a left join?
ReplyDeletewhat are the lkm and ikm's used here??
ReplyDelete