Documente Academic
Documente Profesional
Documente Cultură
s a
) h a
s ฺ comideฺ
Oracle Data a ticIntegrator
G u 11g:
m
le dand e t
n Administration
e
Integration
t
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t Activity Guide - Volume I
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
D64974GC20
Edition 2.0
September 2012
D78956
Author Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
publish, license, post, transmit, or distribute this document in whole or in part without
Denis Gray the express authorization of Oracle.
Christophe Dupupet
The information contained in this document is subject to change without notice. If you
Julien Testut find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
David Allan warranted to be error-free.
Sachin Thatte
Restricted Rights Notice
Viktor Tchemodanov
Gerry Jurrens If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is
Veerabhadra Putrevu applicable:
s a
Editor s
U.S. GOVERNMENT RIGHTS
) h a
m
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or
o
Rashmi Rajagopal
c s ฺc ideฺ
disclose these training materials are restricted by the terms of the applicable Oracle
license agreement and/or the applicable U.S. Government contract.
Vijayalakshmi Narasimhan
a ti G u
Aju Kumar Kumar
Trademark Notice
m
le den t
t e
g h es s Stu
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners.
Gr aphic Designer s
h u
e t hi
Satish Bettegowda
n d a@ o us
Seema Bopaiah
r ฺ p a se t
m a cen
Publisher s
( a l e li
Giri Venugopal da
a n ferab
a P ns
Sumesh Koshy
r Rameshkumar
a
Am on-tr
Srividya
n
Table of Contents
Practices for Lesson 1: Introduction to Integration and Administration ................................................. 1-1
Practices for Lesson 1: Overview............................................................................................................. 1-2
Practice 1-1: Starting the ODI Client ........................................................................................................ 1-3
Practices for Lesson 2: Administering ODI Repositories ........................................................................ 2-1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
h e sSs t u
Practice 6-1: Creating a Model ................................................................................................................ 6-3
Practices for Lesson 7: Organizing ODI Models and Creating
h u g ODI
t h i ....................................... 7-1
Datastores
@ us e
a.....................................................................................
Practices for Lesson 7: Overview............................................................................................................. 7-2
Practice 7-1: Checking Data Quality in the n d
Model
t o
a ...................................................................................... 7-3
Practices for Lesson 8: ODI Interface r ฺ p
Concepts n s e
a............................................................................................................. 8-1
a m l i c e
(
Practices for Lesson 8: Overview
l e
8-2
a n daODI Interface:
Practice 8-1: Creating
r a b Simple Transformations .................................................................. 8-3
Practices for
r for fe Interfaces .......................................................................................... 9-1
PLessonn9:sDesigning
a
Practices
m 9-1: t r a
Lesson 9: Overview ............................................................................................................. 9-2
APracticeo n -Creating ODI Interface: Complex Transformations ............................................................... 9-3
n
Practice 9-2: Creating ODI Interface: Implementing Lookup ...................................................................... 9-22
Practices for Lesson 10: Interfaces: Monitoring and Debugging ............................................................ 10-1
Practices for Lesson 10: Overview ........................................................................................................... 10-2
Practice 10-1: Creating ODI Interface: Exporting a Flat File to a Relational Table ...................................... 10-3
Practices for Lesson 11: Designing Interfaces: Advanced Topics 1 ....................................................... 11-1
Practices for Lesson 11: Overview ........................................................................................................... 11-2
Practice 11-1: Using Native Sequences with ODI Interface ....................................................................... 11-3
Practice 11-2: Using Temporary Indexes ................................................................................................. 11-18
Practice 11-3: Using Data Sets with ODI Interface.................................................................................... 11-28
Practices for Lesson 12: Designing Interfaces: Advanced Topics 2 ....................................................... 12-1
Practices for Lesson 12: Overview ........................................................................................................... 12-2
Practice 12-1: Using Temporary ODI Interfaces ....................................................................................... 12-3
Practice 12-2: Developing a New Knowledge Module ............................................................................... 12-38
Practices for Lesson 13: Using ODI Procedures...................................................................................... 13-1
Practices for Lesson 13: Overview ........................................................................................................... 13-2
Practice 13-1: Creating an ODI Procedure ............................................................................................... 13-3
t i c s uid 19-3
Practices for Lesson 19: Overview ...........................................................................................................
ma ent G
Practice 19-1: Implementing Changed Data Capture ................................................................................
l
e tud e
Practices for Lesson 20: Advanced ODI Administration..........................................................................
t 20-1
e sSs
Practices for Lesson 20: Overview ...........................................................................................................
h 20-2
h u g t h i
Practice 20-1: Setting Up ODI Security .................................................................................................... 20-3
Practice 20-2: Integration with Enterprise Manager@
a and Using ODI
u s eConsole.............................................. 20-22
Practices for Lesson 21: Extending Oraclen
a d
Data Integrator
to with SDK, Web Services, and SOA ............ 21-2 21-1
ฺ p
r ens e
Practices for Lesson 21: Overview ...........................................................................................................
aScenario
( a m
Practice 21-1: Executing an ODI
l icThrough the ODI Public Web Service....................................... 21-3
l e
a nda ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G1:u
Lesson
t e e den
es s Sto
Introduction
h tu Integration
and
h g t hi
u Administration
a@Chapter
us 1e
n d t o
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices Overview
In this practice, you will start up the ODI client, and examine the help system and Start Page.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Overview
In this practice, you start up the ODI client, explore the help system, and examine the links on
the Start Page.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
Assumptions
None
Tasks
1. Start Oracle Data Integrator and explore the help system:
Step Screen/Page Description Choices or Values
a. MS Windows Start Oracle Data Integrator: Start >
Programs > Oracle > Oracle Data
s a
Integrator > ODI Studio.
) a
h the main
com
b. Oracle Data Integrator The ODI client window opens. From
menu, select Help > Table
s ฺ e ฺ
of Contents.
d
i c
atappears. u i
c. Oracle Data Integrator The Help Center
m t GExpand the
nContents tab. Double-
navigation
t e letree ofdthe
e
esOpening
click
h S tuthe Online Help. Observe that
h g another is opens to the right, with details
u aboutthyourpanel
a e
@ usCenter. chosen topic. Close the Help
a d
n e to
d. ฺ p
r ens
Oracle Data Integrator
a From the Help menu, select ODI Forum.
e. ( a
Oracle Data m l
Integrator ic If you have an Internet connection, the Oracle
a l e
a nd ferab ODI Forum web page opens. Scroll through
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
b. a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
d. g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
f.
Topology.
b. Oracle Data Integrator On the Define the Topology tab, examine the
five different categories of information.
Click Create and Connect to your
Repositories.
d a @ use
d. a
Oracle Data Integrator
p n e to Click X to close the Help Center window.
ฺ
ar cens Click X to close the Define the Topology tab,
( a m l i which also closes the Start Page. If you want
a l e
a nd ferab to re-open the Start Page later, you can
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u t h i
b.
a@ o us e
n d
a se t
r ฺ
a cenp
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Amd. on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G2:u
Lesson
t e e den
g h es s StuODI
Administering
h u
Repositories
e t hi
n d a@Chapter
o us 2
t
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices Overview
In this practice, you will use SQL Developer to create database users for Master and Work
Repositories. You will then log in to ODI and connect to these repositories.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
for performing database management and integration tasks on various resources within the
organization. In particular, John is responsible for data loading, transformation, and validation.
To set his ODI environment, he needs to set up security and create Master and Work
Repositories.
Background:
To set up Oracle Data Integrator, first create database users for the Master and Work
Repositories. Then, create the Master Repository, connect to the Master Repository, create the
Work Repository, and then connect to the Work repository.
In this practice, you first use SQL Developer to create the database users for the Master and
s a
) h a
Work Repositories. Then, in ODI, you create and connect to the ODI Master Repository and the
ODI Work Repository.
o m
s ฺc ideฺ
Note: These are practice repositories. In later lessons, you use other Master and Work
c
ati t Gu
Repositories that are partially predefined with source and target objects.
m
t e le den
g h es s Stu
h u
e t hi
data
SQL Developerand
base
-
a@ o us
t
play .
png
r ฺ p
a usercforen s e
m
• Create SNPM1 database
( a li
a
Master Repository l e
a
• Create
d database
nSNPW1 f e r ab user for
a P Repository
rWork n s
r a
Am on-t
n datab0
Oracle Data
24.gif
Integrator
• Create Master Repository
• Create Master Repository connection
“Master Repository Pr 2-1” with SNPM1
as the user
• Create Work Repository
• Create WORKREP_PR2-1 Work
Repository connection with SNPW1 as
the user
2. Create the RDBMS schema or user (Oracle 11g) for the Master Repository.
c. Oracle SQL Developer Expand the Other Users node to verify that
the “snpm1” user account was successfully
created. Minimize SQL Developer.
b.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
comideฺ
successful connection. Click OK. Click Next
s ฺ on the Master Repository Creation Wizard
a tic Gu screen.
d. Master Repository Creation Wizard l e m entwindow, enter the
In theeAuthentication
h e
Supervisor tud as SUNOPSIS. Enter
st SPassword
h ug SUNOPSIS
t s again to confirm the password.
hiNext.
e
a@ o us Note: Usernames and passwords are
Click
n d
a se t
a r ฺ p n case-sensitive in ODI.
a m
Storagelic
e
e.
a (
Password
l e In the Password Storage window, select
b. s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
c.
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
d.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
f.
a nd ferab
a r P ans
Am on-tr
n
4. Connect to the ODI Master Repository by creating a new ODI Master Login:
Step Screen/Page Choices or Values
Description
a. Oracle Data Open the New Gallery by selecting File > New. In the New
Integrator Gallery, in the Categories tree, select ODI. From the Items
list, select Create a New ODI Repository Login. Click OK.
b. Repository Configure the repository connection with the parameters from
Connection this table. To enter the JDBC URL, click the button next to the
Information URL field and select
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Parameter Value
User SUPERVISOR
Password SUNOPSIS
s a
) h a
Database Connection (Master Repository)
Parameter Value
s ฺ comideฺ
a tic Gu
User snpm1
l e m ent
e
st Stud
h e
ug this
Password password
h
d a
Driver u se JDBC Driver
@List Oracle
p a n e to
ฺ
ar ceDriverns
( a m l i Name oracle.jdbc.OracleDriver
l e
a nda ferab
a r P ans Url jdbc:oracle:thin:@localhost:1521:orcl
Am on-t r Note
n • Do not copy and paste in the URL field. This may
cause problems with entering a valid URL string.
Instead, open the drop-down menu and select the
correct driver from the list. Type the correct URL in
the Url field.
• The ODI username (SUPERVISOR) is case-sensitive.
s a
) h a
o m
b.
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
c.
d.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
c.
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
a. Oracle Data Integrator In ODI, click the Topology Navigator tab and then click the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
Repositories panel.
Right-click the Work Repositories node and select New
Work Repository.
The Create Work Repository Wizard opens.
b. Specify ODI Work In the screen that follows, enter the parameters shown in the
Repository Connection following table. Click the Test button. Verify successful
Properties connection and click OK. Click Next.
Parameter Value
s a
Technology Oracle ) h a
ฺ c om eฺ
JDBC s
tic Guid
oracle.jdbc. OracleDriver
Driver a
m ent
e l e
h e st Stud
JDBC Url jdbc:oracle:thin:@localhost:1521:orcl
h u g snpw1t his
User e
a@ o us(not the default snpm1)
n d
a Password t
a r ฺ p n s e password
a m lic e
c. Specify (
ODI Workle
a properties In the Specify ODI Work Repository properties panel, set the
n d a b
P a sfer
Repository ID to “1”. Set the Name to WORKREP_PR2-1. In the
a r a n Password field, enter SUNOPSIS. In the Work Repository
Am on-t r Type field, leave Development unchanged. Click Finish.
n Verify that the newly created Work repository is now in the
work repositories tree view.
Note: The Development type of repository enables
management of design-time objects such as data models
and projects (including interfaces, procedures, and so on). A
development repository also includes the run-time objects
(scenarios and sessions). This type of repository is suitable
for development environments.
d. Create Work Repository In the Confirmation window, click Yes. Enter the Login
Login name: Work Repository Pr 2-1. Click OK.
e. Oracle Data Integrator Expand the Work Repositories node and verify that the Work
repository WORKREP_PR2-1 was created.
s a
) h a
o m
c s ฺc ideฺ
b. m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
d.
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
e
7. Disconnect from the Master Repository and connect to tthe d n
leWork repository:
e
h esChoices S tu
Step Screen/Page
h u g t h is Values
or
Description
d a @ use
a. Oracle Data Integrator nClick thetODI
o menu and select Disconnect “Master
ฺ p
r ensa e
Repository Pr 2-1.”
a
m lic
( a
a able
n d
a sfer
r P
b.a an Data Integrator Click “Connect To Repository.”
Oracle
Am on-tr
n
c. Oracle Data Integrator Select “Work Repository Pr 2-1” from the Login Name
Login drop-down list. In the Password field, enter SUNOPSIS.
Click OK. Click the Designer tab. Collapse the Projects
node. The following ODI Designer screen appears.
You have now successfully created and connected to the
ODI Work repository.
d. Oracle Data Integrator Click ODI menu and select Disconnect Work repository
Pr 2-1.
Note: You will not be using these practice Master and
Work Repositories for the remainder of this course.
s a
) h a
o m
c s ฺc ideฺ
b. m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
c.
d. s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G3:u ODI
Lesson
t e e den
Topology
h S tu
es sConcepts
h g
u 3 thi
Chapter
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
Practices Overview
In this practice, you set up and install an ODI Agent as a background service.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
A common task in ODI is to set up and install an ODI Agent as a service. After the ODI
scenarios are created, they can be scheduled and orchestrated by using an ODI Agent, which is
a lightweight Java process that orchestrates the execution of ODI scenarios. In this practice,
you create and execute an ODI Agent, which will be used in subsequent practices for
orchestration of the execution of ODI objects.
First, you run encode <password> to generate an encrypted password.
You copy and paste that string into the odiparams.bat file that contains ODI agent parameters.
s a
h a
You then switch to ODI, and define a physical agent named localagent. Next, you define a
)
m
logical agent also named localagent, mapping it to the same-named physical agent. You specify
o
s ฺc ideฺ
the Global context as the context in which to make this particular mapping of logical to physical
c
agents.
m ati t Gu
t e le den
In the command window, you execute agent.bat to start the agent that you named localagent.
g h es s Stu
In ODI, you test a connection to your newly created agent.
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
The directions on the following pages will take you through these activities:
1. Run encode oracle1 to generate an encrypted password string
2. Edit odiparams.bat, inserting the encrypted password
3. In ODI, define a physical agent named localagent
4. In ODI, define a logical agent named localagent, mapping it to the physical agent named
localagent for the Global context
5. Execute agent.bat to start an agent named localagent.
6. Verify connection to the newly created agent localagent in ODI
a. MS Windows and Open the Windows Explorer, and navigate to the ODI_HOME
text editor directory, where ODI is installed and open the agent\bin
subdirectory:
(C:\oracle\Middleware\Oracle_ODI1\oracledi\agen
t\bin). Navigate to the odiparams.bat file, right-click this
file, and select Edit to open it with a text editor. Leave this editor
open. You will run a batch file from a Command window and
return to this text editor to copy the results into the
odiparams.bat file.
s a
) h a
Explanation: You need to edit the odiparams.bat file to set
s ฺ comideฺ
the repository connection information for the ODI Agent to use.
The password information is stored as an encrypted string. You
a tic Gu
will generate the encrypted string in a Command window.
l e m ent
t e
sopen, d
tuopen
b. Command Prompt h e
Leave the text editor
g s S
and the Command window
u
h et
(Start > Run > cmd). h i
Change the directory to the
@
a o us
ODI_HOME\agent\bin
d directory:
p n
a se t
C:\oracle\Middleware\Oracle_ODI1\oracledi\agent
r ฺ
a m a c\bin
l i en
c. Command
a ( Promptle To generate the encrypted password string, you will be using
a n ferab
d the agent command, encode <password>. Because your
Am on-tr
command in the Command window and press ENTER:
n encode oracle1
edit settings for other parameters from the following table, save
the odiparams.bat file, and then close it. The agent’s
connectivity is now set up.
Parameter Value
ODI_MASTER_DRIVER oracle.jdbc.OracleDriver
ODI_MASTER_URL jdbc:oracle:thin:@localhost:1521:orcl
s a
ODI_MASTER_USER DEV_ODI_REPO ) h a
ฺ c om eฺ
s
ic encoded
ODI_MASTER_ENCODE Inserttyour u idpassword.
D_PASS a G
m enthet existing password)
(overwrite
e l e
h e st Stud
ug this WORKREP
ODI_SECU_WORK_REP
h
d a @ use
p a nODI_SUPRVISOR_ENC
e to
ฺ ns
ar ceODED_PASS Leave the default value.
m
(a le li
a
nd ferab
P a s
ODI_USER Leave the default value.
m ar tran
A on- ODI_ENCODED_PASS Leave the default value.
n
ODI_JAVA_HOME c:\oracle\Middleware\jdk160_29
Note
• DEV_ODI_REPO is an RDBMS schema/user (Oracle
11g) for the Master Repository. It was pre-created for
this and subsequent practices.
• The Work Repository name is WORKREP.
• Because each time that you encode the password, it
receives different values, your encoded password will
differ from the one provided in the screen.
• Do not change the default value of the ODI_USER and
ODI_ENCODED_PASS parameters. Those parameters
were pre-coded during ODI installation.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
b.
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
c. r P s
a r a n
Am on-t
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
P ns
2. m ar that
Now ra havefile,
tyou generated an encoded password and pasted it into the
-
A odiparams.bat
n
no these ODI agentyoudefinitions,
create
need to create the ODI physical and logical agent definitions. To
perform the following steps:
Step Screen/Page Choices or Values
Description
a. MS Windows If it is not started, start Oracle Data Integrator. Click Connect
ODI Login To Repository. Select DEV_ODI_REPO from the Login Name
drop-down list. Click OK.
b. Topology navigator Click the Topology navigator tab. In the Topology navigator,
select the Physical Architecture panel. Right-click the Agents
node. Select New Agent.
agent has been launched on. Verify that this parameter is set
to localhost.
Port: Listening port used by the agent. By default, this port is
20910. Leave the default value.
Web Application Context: Name of the Web application
corresponding to the Java EE agent deployed on an
application server. For stand-alone agents, this field should be
set to oraclediagent.
Set Maximum number of sessions supported by this agent to
250. Click the Save button. s a
) h a
d. Topology Navigator Now you have to insert a logical agent in ฺ om Architecture,
cLogical e ฺ
c s i d
Local Agent: New
of the Topology navigator tab, m ati the tLogical
and map it to the newly created Physical
click G u At the bottom
agent.
Architecture
tab. Right-click AgentsteandleselectdNewe nLogical Agent. On the
e s
set the S
h the Physical
screen that follows, t
Name
u to localagent. For the
u g
h Frome the
Global context, set h i s
t File menu,Agents column to
@
a otabuthat
localagent.
d s click Save. Close the
p a n
localagent
e t tab open.
you just worked on, leaving the other
ฺ
ar cens localagent
m
(a le li
a.
a
nd ferab
a
a r P ans
Am on-tr
n
c.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
d.
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
3. Now that you have created the agent and defined the ODI physical and logical agents, you
can start the agent directly from the command line. s a
Step Screen/Page Choices or Values ) h a
Description
s ฺ comideฺ
a. Command Prompt a
Switch back to the Command window tic you Gleftuopen at the
ODI_HOME\agent\bin directory m
le den t
t e
t\bin). Executeg es s Stu file by using the following
(C:\oracle\Middleware\Oracle_ODI1\oracledi\agen
h the agent.bat
command:hu
e t hi
d
agent
n a@ us
-NAME=localagent
o
t
a rฺpa ense
b. Services am l icThe agent is now starting. Verify that ODI Agent is successfully
( l e
a nda ferab started. Minimize (do not close) the window Command
Prompt – agent-NAME=localagent.
r P s
a an Note: This command window should remain open during all
Am on-tr labs.
nc. Oracle Data In ODI, in the localagent tab that remains open, click the
Integrator Test icon to verify connection of the agent localagent.
You successfully created and connected to ODI agent. Close
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G4:u
Lesson
t e e den
es s the
Describing
h S tuPhysical and
u g
Logical
h t i
hArchitecture
a@Chapter
us 4e
n d t o
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices Overview
In this practice, you define the work infrastructure in the topology by creating contexts, a data
server, and physical and logical schemas.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
Before you begin working on your ODI projects, you need to describe your ODI infrastructure in
the topology. As a starting point of this practice, you will use the environment provided with the
ODI installation. The infrastructure includes several servers. You need to define the following
new data server and its attached physical schemas.
Data Server: ORACLE_ORCL_LOCAL
Define two of three schemas available in this instance:
s a
Schema Description
) h a
SALES_DEV
purposes s ฺ comideฺ
Schema storing the target tables for development
a tic Gu
SALES_PROD m etarget
Schema storing the production
l e n t tables
e tudODI temporary objects
t to store
sused
STAGING Schema that is
h e S
(not used
h ugin thistpractice)
his
@ uschemas
aphysical s e
Both the SALES_DEV and SALES_PROD
n d
and correspond to the same logicalaschema called t o contain identical table structures
ORACLE_ORCL_LOCAL_SALES. The
a
mapping for this logical schema
p non
rฺdepends sethe context.
a
Note: Completing(these
e
m tasksliisccritical for all subsequent practice sessions.
n d a able
P a sfer
a r an
Am on-tr
n
Your Tasks:
1. If not started, start Oracle Data Integrator and open the DEV_ODI_REPO connection. If
ODI remains open, skip to step 2.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
2. Create a new context:
) h a
m
a. Click the Topology navigator tab, and then click the Contexts tab to expand it.
o
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
b. Click the New Context icon on the Contexts tab, and then select New Context.
c. Enter your context parameters as shown below. The context window should appear as
follows.
Name: Production
Code: PRODUCTION
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
d. Click the Save button. t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a d rab
nanother
a P nsfenew context , repeating the operations:
e. Create
rName:
Am oCode:
n -traDEVELOPMENT
Development
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
c. Click the JDBC tab. Click the h
button
e hiof the JDBC Driver field. In the
uto the right
t
n d a@JDBC
window that appears, select Oracle
o u s and then click OK.
Driver,
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
e. Edit the JDBC URL to have the following:
c s ฺc ideฺ
URL: jdbc:oracle:thin:@localhost:1521:ORCL at
i G u
m
le den t
The JDBC tab should now appear as follows: t e
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
b. In the Test Connection dialog box, click the Test button. In the Information dialog
box that reports a successful connection, click OK.
5. Create a physical schema for the newly created ORACLE_ORCL_LOCAL data server. Name
the physical schema ORACLE_ORCL_LOCAL.SALES_DEV with the following parameters:
• Data Schema: SALES_DEV
• Work Schema: STAGING
• Default check box: Selected
s a
a. a
Expand the Oracle node. Right-click the newly created data server
) h
ORACLE_ORCL_LOCAL, and then select New Physical Schema.
m
o
ฺc ideฺ
c s
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
b. In the new window that appears, select SALES_DEV from the Schema (Schema)
drop-down list, and then select STAGING from the Schema (Work Schema)
drop-down list. Select the Default check box. In the Confirmation window that appears,
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h
c. Expand: Oracle > ORACLE_ORCL_LOCAL.
i
u ThethPhysical schema
a @ s e
a n d to u
ORACLE_ORCL_LOCAL.SALES_DEV appears in the tree view:
a rฺp ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
6. Create a second physical schema for the ORACLE_ORCL_LOCAL data server. Name it
ORACLE_ORCL_LOCAL.SALES_PROD:
• Data Schema: SALES_PROD
• Work Schema: STAGING
• Default Schema: Not selected
b. In the new window that appears, select SALES_PROD from the Schema (Schema)
drop-down list, and then select STAGING from the Schema (Work Schema)
s a
h a
drop-down list. Confirm that the Default check box is not selected, and leave all the
) click
o m
OK. c s ฺc ideฺ
other fields unchanged. Click the Save button . In the Information window,
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
a. In Topology Manager, select the Logical Architecture tab and expand the
Technologies node. Select Oracle, right-click and select New Logical Schema.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
b. Enter the name of the logical schema: ORACLE_ORCL_LOCAL_SALES. To map this
u contexts,
logical schema to physical schemas inhdifferent t h i from the drop-down lists,
a
select the appropriate physicaldschema se context, as shown in the following
@ forueach
a n e to
screen. Click the Save button.
p
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
8. The logical schema FILE_DEMO_SRC is predefined for you and is mapped in the
predefined Global context to a physical schema that represents a subfolder in a file system.
Map FILE_DEMO_SRC to the same physical schemas in the new Development and
Production contexts that you defined earlier.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
b. Repeat the previous stepฺ p for e t logical schemas:
a the following
r
a theclogical s
en schema XML_DIM_GEO should be mapped to the
•
( a m
In XML technology,
l i
d a
physical schema
b e
lXML_GEO_DIM.GEO, as follows. Click the Save button.
n
a sfer a
r P
a an
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
• ug HSQL_DEMO_TARG
In Hypersonic SQL, the logical schema
h t h is should be mapped to
a@ o us e
the physical schema HSQL_LOCALHOST_20002_Default, as follows.
n d
a se t
r ฺ
a cen p
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
9. You have set up ODI agent localagent in Practice 3-1. Now, link the Logical agent to the
Physical agent in all three contexts and test the connection.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
a. In the Physical Architecture, expand the Agents node, and open the Physical agent
localagent. Similarly, open the Logical agent, localagent, in the Logical Architecture.
Ensure that this Logical agent, localagent, is linked to Physical agent localagent in all
three contexts as follows. Save your changes.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G5:u
Lesson
t e e den
Setting
h tu ODI Project
esUps aSNew
h g
u 5 thi
Chapter
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
Practices Overview
In this practice, you create a new ODI project and import Knowledge Modules that will be used
in subsequent practice sessions.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
Now you assume the role of a project leader who is starting an integration project.
You create a project named HandsOnLoads with a folder named HandsOn. You import
knowledge modules for working with three sources (Hypersonic SQL, XML, and File) and one
target (Oracle.)
Note: Completing this practice is critical for all the following practice sessions.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Your Tasks:
1. Create a project, HandsOnLoads, with a folder called HandsOn.
a. In Designer Navigator, click the Projects tab, click the New Project icon, and then
select New Project.
c. Click the Save button to create the project. The project appears in the tree view.
Expand the HandsOnLoads project node.
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
a ฺ
rthe name
d. ODI creates a folder named sthe Name
FirstFolder.
n Double-click this folder. In the editing window
a m lic
that appears, change e in field to HandsOn. Click Save.
(
a able
n d
a sfer
r P
a an
Am on-tr
n
a. Select the HandsOnLoads project node. Right-click, and then select Import > Import
Knowledge Modules.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
c. Select the following knowledge modules that will be used in this project.
ฺ c omUse theฺCtrl
key and scroll down the list to make multiple selections. Be very
t i c s
careful in
u i de your
making
selections, as there are several knowledge modules thatm a similart names.
have G Click OK.
• CKM HSQL l e
te tude n
• CKM Oracle e s
h is S
u g
h IKM Oracleth AW Incremental Update)
• IKM Oracle Incremental Update (not e
d @
a o us
• IKM SQL Control Append n
a se t
• LKM File to SQL rฺp
• LKM SQL(a tom
a
Oracle lic
en
n d a able
P a sfer
a r an
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
e. Check the imported knowledge modules by expandingle
t e e n nodes under
corresponding
d
eshere:
HandsOnLoads > Knowledge Modules, as shown
h S tu
h u g t his
a@ o us e
n d
a se t
r ฺ
a cen p
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
3. Now, look at global knowledge modules. Introduced in ODI 11.1.1.6, global knowledge
modules enable you to share specific knowledge modules across multiple projects.
In previous versions of ODI, knowledge modules were always specific to a project and
could only be used within the project into which they were imported.
s a
used by multiple projects. ) h a
A best practice is to import as global knowledge modules those that will be frequently
o m
c s ฺc ideฺ
- One benefit is that you only need to import the knowledge module once, rather than
import it into each project using it.
m ati t Gu
t e le den
- Another benefit is that if you need to modify the knowledge module, the modification
will propagate to all projects using the knowledge module.
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
c.
select IKM SQL to SQL Control Append. Click OK. ) h a
The Import Knowledge Modules (XML File) window appears. Scroll down the list and
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
d. The Import Report appears, showing IKM SQL to SQL Control Append. Click CLOSE.
s a
) h a
Note: This example is to practice creating global knowledge modules. o mwill not
c You ฺ be
s ฺ e
using this knowledge module in subsequent lab practices.
a tic Guid
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G6:u
Lesson
t e e den
Oracle
h esData tu
Integrator
S Model
u g
Concepts
h t his
a@Chapter
us 6e
n d t o
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices Overview
In this practice, you create the models corresponding to the data, and reverse-engineer the
schemas’ data structures.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
In the previous practice, you configured the schemas containing the application data stored in
the Oracle database. You now create the Oracle Sales Application model corresponding
to this data and reverse-engineer the schemas’ data structures. You also reverse-engineer the
structure of an XML file to a Geographic Information model that you define.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
The ODI startdemo demonstration environment provides databases
a t ic thatG u some
contain
m
of the data used in this course’s practices. Source and target
e den t
data servers, as well as a
demonstration repository data server, are started. tel
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Note: You should keep these three command shell windows running (minimized) for all
remaining lab practices in this course, along with the “localagent” command shell
window.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
3. Reverse-engineer all the tables in this model. a tic Gu
e mReverse
a. Right-click Oracle Sales Application model and selectlthe e n t
Engineer option. If
the Confirmation window appears, click Yes.
e
st Stud
h e
ug process
Note: The progress of the reverse-engineering
h t his is shown on the status bar.
a@ o us e
n d
a se t
r
a cenฺ p
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
-tr table TRG_CUSTOMER (
Am oCreate
n
n CUST_ID NUMERIC(10) not null,
DEAR VARCHAR(4),
CUST_NAME VARCHAR(50),
ADDRESS VARCHAR(100),
CITY_ID NUMERIC(10) not null,
PHONE VARCHAR(50),
AGE NUMERIC(3),
AGE_RANGE VARCHAR(50),
SALES_PERS VARCHAR(50),
CRE_DATE DATE,
UPD_DATE DATE,
constraint PK_TRG_CUSTOMER primary key (CUST_ID),
constraint FK_CUST_CITY foreign key (CITY_ID)
references TRG_CITY (CITY_ID));
s a
5. Reverse-engineer all the tables in this model.
) h a
m
a. In the Models tree view, right-click Geographic Information model and select the
o
Reverse Engineer option.
c s ฺc ideฺ
ati t Gu
Note: The progress of the reverse-engineering process is shown on the status bar.
m
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
6. h a
Open the XML file GEO_DIM.xml corresponding to the XML model that you have reverse-
)
engineered. The file is at the following location:
o m
C:\oracle\Middleware\Oracle_ODI1\oracledi\demo\xml
c s ฺc ideฺ
a. Open Windows Explorer, and go to the
m ati t Gu
t e le den
C:\oracle\Middleware\Oracle_ODI1\oracledi\demo\xml directory.
g h es s Stu
b. Right-click the GEO_DIM.xml file and select Open.
h u
e t hi
c. The XML file opens in Internet Explorer. The file structure appears as shown here:
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
The file hierarchy is GEOGRAPHY_DIM > country > region > city > and so on.
The hierarchy of the XML file is reproduced here. The XML file has been mapped to a
s a
) h a
relational structure, with foreign keys to map the links between the different levels of
hierarchy.
o m
c s ฺc ideฺ
Close the Geographic Information model tab
m ati t .Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G7:u
Lesson
t e e den
es s ODI
Organizing
h S tu Models and
u g
Creating
h t i Datastores
hODI
a@Chapter
us 7e
n d t o
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 1
Practices for Lesson 7: Overview
Practices Overview
In this practice, you check the quality of data in the models and define constraints on these
models.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 2
Practice 7-1: Checking Data Quality in the Model
Background:
After the models are defined, you need to check the quality of the data in these models. In this
practice, you check the quality of data in the models and define constraints on models for the
given sample application.
First, you create a new model, HSQL_ORDERS_APPLICATION, as a duplicate of the model
HSQL_SRC.
You then create a referential constraint on the SRC_CUSTOMER table’s CITY_ID column by
using SRC_CITY as the parent table.
s a
Next, you create a condition constraint on the SRC_CUSTOMER table:
) h a
o m
Length(SRC_CUSTOMER.PHONE) > 6
c s ฺc ideฺ
ati t Gu
Note: Completing this practice is critical for all the following practice sessions.
m
le den
t e
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 3
Your Tasks:
1. Create a new model, HSQL_ORDERS_APPLICATION, as a duplicate of the model
HSQL_SRC.
a. In Designer, open the Models tab. Right-click HSQL_SRC model and select Duplicate
Selection to duplicate the datastore. Click Yes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
b. Open a nCopy f e r ab
d of HSQL_SRC and rename it as HSQL Orders Application. For Code,
a r P
enter n s
HSQL_ORDERS_APPLICATION. Click Save to save the model. If you get a
r a
Am owarning
n -t message, click Yes to finish saving.
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd This
2. Create a Reference ab between
constraint the SRC_CUSTOMER and SRC_CITY datastores in
a f e r
a r P ans
the new model. reference is on the CITY_ID column.
Am on-tr
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 5
a. Expand the HSQL Orders Application model, and expand the SRC_CUSTOMER
datastore.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
h es the S tuReference option.
h u g
b. Select the Constraints node, right-click, and select
t his
New
a@ o us e
n d
a se t
r ฺ
a cenp
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 6
c. From the Table drop-down list, select the SRC_CITY table. The name of the constraint
is automatically generated. Click the Columns tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
d. Click the Add icon, and use drop-down lists to select the CITY_ID column for both
tables of reference. (Note that the Primary Table column is City, which you want to
also change to CITY_ID.) Click Save.
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 7
3. Create a Condition constraint on SRC_CUSTOMER to check that the phone number contains
six or more characters.
a. Select the Constraints node again for SRC_CUSTOMER, right-click, and select the New
Condition option.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 8
On the Oracle Data Integration Information screen, click OK. Click Save to add the
condition, and then close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
-trthe knowledge module CKM HSQL.HandsOnLoads. Click Save. Close the
Amb. oSelect
n
n HSQL Orders Application model tab.
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 9
5. Select the HSQL Orders Application model in the tree view, right-click, and select Control
> Check.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
h escontext
a. In the Execution dialog box, select Development S tu then click OK.
and
h u g t his
a@ o us e
n d
a se t
r ฺ
a cen p
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
b. Click OK when the Information dialog box notifies you that the session has started.
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 10
6. Click the Operator Navigator icon tab . The Operator window appears.
Click the Hierarchical Sessions tab. Expand the All Executions node. Expand the HSQL
Orders Application session. Expand its Steps node. The session should appear complete,
containing steps marked with check marks and warnings, as shown here.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Note: You can optionally review the content of this session and see the different SQL
commands issued to perform the check operations.
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 11
7. Review the errors detected in the SRC_CUSTOMER datastore.
a. Click the Designer navigator tab. On the Models tab, expand the HSQL Orders
Application model, select the SRC_CUSTOMER datastore, right-click, and select
Control > Errors.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a ablists the errors detected in your table. You have one join error and
ndtablefethat
a
P invalid
b. View the r
a rseven a n s phone numbers. Each line also contains the content of the invalid record.
Am on-t r
n
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 12
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G8:u ODI
Lesson
t e e den
Interface
h S tu
es Concepts
h g
u 8 this
Chapter
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
Practice Overview
In this practice, you create simple interfaces, run these interfaces, and verify the execution.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
These interfaces will then be used for the development of his integration project.
Background:
After the models are defined and the quality of the data is verified, you need to create an ODI
Interface to perform transformations. In this practice, you create simple interfaces with one
target table and a single source. You will run these interfaces and check the execution.
In this practice, you create three interfaces. First, you create an interface called INT_8-1,
loading the TRG_COUNTRY datastore in the Oracle Sales Application model with the content of
the SRC_REGION table from the HSQL Orders Application model. This simple interface has no
s a
transformations.
) h a
m
The second interface, INT_8-2, is a duplicate of INT_8-1, to which flow control is activated,
o
and constraints in the target table are checked.
c s ฺc ideฺ
ati t Gu
The third interface, INT_8-3, loads the TRG_COUNTRY datastore in the Oracle Sales
m
t e le den
Application model with the content of the SRC_CITY table from the HSQL Orders Application
g h es s Stu
model. In this interface, flow control is activated, constraints in the target table are checked, and
h e t hi
city population values are transformed from individual to times 1,000.
u
n d a@ o us
Note: Completing this practice is critical for other practice sessions.
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
the HandsOn folder. Select the Interfaces node, right-click, and select the New
Interface option.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
u t
b. In the Interface window, enter INT_8-1has the name
e hofi the interface. Ensure that the
a@theoMapping
Optimization Context is Global.dClick
n us tab.
t
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
2. Run this interface, and check the content of the TRG_COUNTRY table.
a. Expand the Interfaces node, right-click the newly created interface INT_8-1, and then
select Execute.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
h
c. Click the Operator tab to open the ODI Operator esNavigator.
S tuThe Operator window
appears. h u g t his
ato@clicko the e
usRefresh button to view the new
Note: In Operator, you may n d
need t
session.
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
f. A window appears with the loaded data.
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
3. Create an interface called INT_8-2 that loads the TRG_REGION datastore in the Oracle
Sales Application model with the content of the SRC_REGION table from the Orders
Application–HSQL model. You must map the columns of the same name without any
transformation. Ensure that flow control is activated and all constraints in the target table
are checked.
s a
h a
Note: Because this new interface uses the same source as the previous one, you will
)
duplicate it.
o m
s ฺc ideฺ
a. Click the Designer tab. Expand the Projects tab, the HandsOnLoads project, and the
c
ati t Gu
HandsOn folder. Expand the Interfaces node and select INT_8-1. Right-click and
m
t e le den
select Duplicate Selection, and then click Yes in the confirmation box. A copy of your
interface appears.
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m ฺ
c s ฺc idtab.
c. In the Name field, change the name to INT_8-2, and then click the Mapping
e
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
d. Click the “perform layout” button to customize the view of the Source zone. In the
Confirmation window, click Yes.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
h. Click Save to save your p
r ฺ a se t
interface.
m a cen
a
(and check
e i content of the TRG_REGION table.
lthe
a
4. Run this interface, l
nd ferab
a. ClickaExecute.
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
d rab
anInterface
a. InP
r the
s f ewindow, click the Mapping tab. Select the TRG_REGION target
a datastore
r n(click the name of the datastore), right-click, and select Data. A window
awith
Am oappears
- t
n n
the loaded data.
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
6. Create an interface called INT_8-3 that loads the
h
Application model with the content of the SRC_CITY
ug TRG_CITY
t h
table
isfromdatastore
the HSQL
in the Oracle Sales
Orders
a @ u s
Application model. Ensure that flowdcontrol is activated
e and all constraints in the target table
a n t o
a rฺpwhereas
are checked. You need to transform
is “thousands of inhabitants,” e n
the
s e source table unit
city
the
population values because the target table unit
is “inhabitants.”
a m l
( the Designer
a. If not open, click i c
d a b l e and thetab,HandsOn
and click the Projects tab. Expand
HandsOnLoads
a f e r a
nNew Interface.
project folder. Right-click the Interfaces node and
a r P ans
select
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
c. If not open, click the Models tab. In the tree view, expand m ati t Sales
the Oracle G u
Application model. Drag the TRG_CITY datastorete le the tree
from d e n
view to the Target
Datastore zone. The datastore appears in this h s Stu
ezone.
h u g t his
a@ o us e
n d
a se t
r ฺ
a cenp
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
s a
d. a
Expand the HSQL Orders Application model and drag the SRC_CITY datastore from
) h
m
the model tree to the Sources zone of your diagram. Click Yes to perform Automatic
o
Mapping.
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
e. Select the POPULATION column in the target datastore. ) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
f. In the Mapping Properties section of the Property Inspector, in the Implementation
tab, edit the expression to populate the POPULATION column with the number of
thousands of inhabitants rounded to the nearest thousand. Edit the expression to have
the following: FLOOR(SRC_CITY.POPULATION/1000)
Note: You use the FLOOR function to perform rounding.
g. To verify the expression, click Check the Expression in the DBMS button . Click
OK.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
7. Change an HSQL Data Serverฺ
ar version sHSQL
setting,
n to deal with a batch processing compatibility issue
between ODI and them
a latest
l i c e of Demo.
a. In Topology (
a Manager,leclick the Physical Architecture tab, expand Technologies,
n d a b
P a sfer
expand Hypersonic SQL, and double-click the HSQL_LOCALHOST_20001 data
m ar tran
server.
A on-
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
ug thistable.
8. Run this interface, and check the content ofhthe TRG_CITY
a. In the Designer Projects tab, d a
right-click u se INT_8-3, and then select Execute.
@ interface
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
i
huthat eyourthinterface
c. Open the Operator Navigator and@verify session executed
d a u s
successfully:
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G9:u
Lesson
t e e den
Designing
h S tu
es sInterfaces
h g
u 9 thi
Chapter
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
Practices Overview
In Practice 9-1, you create an interface with several sources. In Practice 9-2, you implement a
lookup by using the Interface created in the previous practice, perform execution simulation, and
run the newly created Interface.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
In the previous practices, you learned how to create a simple ODI Interface.
In this practice, you create a more complex interface with several sources to load the
TRG_CUSTOMER datastore in the Oracle Sales Application model with the content of
SRC_CUSTOMER table and the SRC_SALES_PERSON files from different models. You apply
filtering to retrieve only customers with CUST_ID < 105. In addition, you populate the update
date (UPD_DATE) column with the system date in the mapping implementation field.
s a
h a
Note: Completing this practice is critical for all the following practice sessions.
)
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am Tasks:
Your n - tr
no an interface called INT_9-1, loading the TRG_CUSTOMER datastore in the Oracle
1. Create
Sales Application model.
s a
) h a
s ฺ comideฺ
a tic to Development,
b. In the Interface window, enter INT_9-1, set Optimization Context G u
and then click the Mapping tab. m
le den t
t e
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
d. In the Design navigator Models tab, expand the FLAT_FILE_SRC model. Drag the
SRC_SALES_PERSON datastore to the Sources zone of your diagram.
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n tab,eexpand
to the HSQL Orders Application model and
ฺ
e. In the Design navigator Models
ns to the Sources zone of your diagram. Click Yes
ar cdatastore
m
drag the SRC_CUSTOMER e
li If necessary, rearrange the datastores. Your diagram
(a lmapping.
to perform Automatic
a e
d rathebfollowing:
shouldnresemble
a
a r P ansfe
Am on-tr
n
s a.
f. Staying within the Sources zone of your diagram, drag the SALES_PERS_ID
) a
hcolumn
from the SRC_CUSTOMER source datastore to the ID column of the om
SRC_SALES_PERSON datastore. A join appears between thesestwo ฺc sources.
d e ฺ
c
ati t Gu i
m
le den
t e
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
g. Select and drag the CUSTID column from the SRC_CUSTOMERs ฺ comdatastore
source
i d e ฺ to
the CUST_ID column in the TRG_CUSTOMER target datastore. c
ati Inspector u CUST_ID
Select the
m
column in the Target Datastore zone. The CUST_ID –eProperty n t G panel shows
e l e
the mapping.
h e st Stud
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Note: You may find it useful to select the Freeze View button before you perform the
next step.
i. Drag the FIRST_NAME and LAST_NAME columns from the SRC_CUSTOMER
source to the Mapping: CUST_NAME Implementation Tab field, and then edit the
mapping to have the following mapping expression:
INITCAP(SRC_CUSTOMER.FIRST_NAME) || ' ' ||
INITCAP(SRC_CUSTOMER.LAST_NAME)
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
j. Scroll down and select the Staging Area button on the Execute on panel.
Note: If the Thumbnail window is open, close it to extend the Mapping panel
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
l. Select the UPD_DATE column in the Target Datastore zone and enter the SYSDATE in
the Mapping implementation field. Click the UPD_DATE column again, and then select
the Staging Area option from the Execute on panel.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
p. Click the Flow tab. Click SrcSet0 (FILE_GENERIC). In the Source Set Properties,
select LKM File to SQL.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
q. In the Flow tab, click the Target(ORACLE_ORCL_LOCAL) target datastore. In the
Target Properties panel, set the option DELETE_ALL to the value “true” as shown
next. Click the Save button to save the interface.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
2. Run this interface, and check the content of the TRG_CUSTOMER table.
a. In the Projects tab, select interface INT_9-1. Click the Execute button .
b. Click OK in the Execution window, and then click OK when the “Session started”
message appears. Open Operator, and verify that your Interface executed
successfully.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
In the previous practices, you created an interface with several sources to load the
TRG_CUSTOMER datastore in the Oracle Sales Application model with the content of the
SRC_CUSTOMER table and the SRC_SALES_PERSON files from different models. Now, you
implement the lookup to load data in the target according to the age range provided in the
lookup table.
Note: Completing this practice is critical for all the following practice sessions.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Your Tasks:
1. Create an ODI Interface with a new lookup.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stutable
c. In the Lookup Tables Wizard, select the SRC_CUSTOMER d in the Driving Table
pane. In the Lookup Table pane, expand theh
g e
FLAT_FILE_SRC
s model, and then select
i
hu e th and then click Next.
SRC_AGE_GROUP. For alias, enter LKUP_AGE_RANGE,
d @
a o us
p n
a se t
r ฺ
a cen
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
i. In the Flow tab, click the p a n area
Target e to ensure that IKM Selector is set to IKM Oracle
and
ฺ ns INT_9-2.
r theeinterface
Incremental Update.aSave
m
(a le li c
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
P ns Projects tab, select INT_9-2, and then click the icon to execute your
j. arIn the Designer
-tra Select the Simulation check box, and then click OK.
Am ointerface.
n
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
( a
2. Run the INT_9-2 interface andliview the lookup data.
e
a l
b again to run your interface . Click OK. Click OK again.
ndExecute
a. Clickathe f e r abutton
a P Donnot
rNote: s select the Simulation check box.
r a
Am on-t
n
b. Click the Operator tab and verify that your interface INT_9-2 successfully executed.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G10:
Lesson
u
t e e den
h S tu
es s Monitoring
Interfaces: and
u g
Debugging
h t hi
a@Chapter e
us 10
n d t o
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices Overview
In this practice, you create an interface to export a flat file to a relational table, perform
execution simulation, execute the newly created interface, and check quality of data loaded in
the table. You also learn how to filter a log to display errors.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
In the previous practices, you learned how to create ODI Interfaces, which transform data from
one or more relational tables in the source to a relational table in the target.
In this practice, you create from scratch an ODI project and an interface to export data from a
flat file to a relational table, execute and monitor the Interface with ODI, and check data quality.
Note: Completing this practice is critical for all the following practice sessions.
In this practice, you perform the following 10 steps: s a
) h a
1. In Topology Navigator, define the FILE_GENERIC.C:\labs\Files\Flat_files
physical schema. o m
c s ฺc ideฺ
ati t Gu
2. In Topology Navigator, define the FLAT_FILES_SRC logical schema.
m
le den
3. In Designer Navigator, create the Export-FF-RT project.
t e
g h es s Stu
4. In Designer Navigator, create the Flat_File_1 source model.
h u
e t hi
a. Create the SRC_SALES_PERSON datastore.
n d a@ o us
b. Point to the resource: C:\labs\Files\Flat_files\SRC_SALES_PERSON.TXT.
r ฺ p a se t
c. Reverse-engineer and format the data (fixed length positions, data types).
a cen
5. In SQL Developer, create the RDBMS schema ODI_STAGE to host the ODI target
m
( a
datastore.
a l e li
nd ferab
6. In SQL Developer, create the TRG_SALES_PERSON table to serve as the ODI datastore for
a
a r P ans
the target model.
Am on-tr
7. In Topology Navigator, create the ODI target data server, ODI_STAGE; physical schema
ODI_STAGE; and logical schema ODI_STAGE.
n
8. In Designer Navigator, create the ODI target model, Oracle_RDBMS1.
9. Reverse-engineer the model and check the populated TRG_SALES_PERSON datastore
table.
10. Create a new ODI interface to perform the flat file to RDBMS table transformation.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
a
h select
e. Open Logical Architecture, navigate to Technologies > File, right-click File,) and
New Logical Schema.
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
g. Verify that your new Logical schema was added under the File node in the
Technologies tree view.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
g this
h u
b. On the screen that appears, set the Name of the
d a
Name field. The Code field is filled
@ u se project
in automatically.
to Export-FF-RT in the
Click Save, and then close the tab.
p a n project
The newly created Export-FF-RT e tonow appears in the Projects pane.
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
b. On the screen that follows, enter the values provided in the following table. Click the
Reverse Engineer tab. Set the Context to Development. Click the Save icon.
Parameter Value
s a
Name Flat_File_1 ) h a
o m
Technology File
c s ฺc ideฺ
Logical Schema FLAT_FILES_SRC m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
4. Create a new ODI source datastore.
) h a
m
a. Right-click the newly created Flat_File_1 model, and then select New Datastore.
o
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a rOnPtheascreen
n s that appears, set the Name to SRC_SALES_PERSON. Click the button
b.
Am on-t r
n next to the Resource Name field. Navigate to the C:\Labs\Files\Flat_files folder,
and then select the SRC_SALES_PERSON.txt file. Click Open.
c. Click the Files tab. Set the File Format to Fixed, and then click the Columns tab.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
f. After the columns are marked, click each column data to select a column, and then set
the name and data type for each column in the Definition panel to the right, as shown
in the following screens. For the names and data types of each column, refer to this
table. Click OK when you have finished.
s a
Column Name
) h a Data type
C1 SALES_PERSON_ID numeric o m
c s ฺc ideฺ
C2 FIRST_NAME string
m ati t Gu
C3 LAST_NAME t e le den
string
h es string S tu
C4 DATE_HIRED
h u g t his
a@ o us e
n d
a se t
r ฺ
a cen p
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
g. The columns should look as
ฺ p a follows.e t Save to save the model. If the Unlocking
Click
a r
Object window appears, select
e n s
the check box and click OK. Expand Flat_File_1 >
m c
(a le >liColumns and view the newly created columns.
SRC_SALES_PERSON
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ
In the Flat_File_1 model, p a sethet SRC_SALES_PERSON datastore, and then
right-click
h.
m n all tabs as shown next.
aoption.ceClose
select the ViewaData
( l i
d a a b le
n
a sfer
r P
a an
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
5. You must create a schema to host d a
the
@ u
ODI target
e
sdatastore. To create a new RDBMS
a n t o
ฺp nswindow
schema for the ODI datastore, perform
arDeveloper e
the following steps:
a. Open the Oraclem SQL
i c e .You will create the schema by executing the
following SQL(a l
n d a able
commands:
user r<MY_SCHEMA>
create
P a tablespace
s f e identified by <MY_PASS>
a rdefault
a n <MY_TBS> temporary tablespace <MY_TEMP>;
AmNote: n r
t started, you need to start SQL Developer and open the Administrator
If -not
n o
connection (Username: “system”, Password: “oracle1”). Refer to Practice 2-1.
In this command:
• <MY_SCHEMA> corresponds to the name of the schema you want to create:
ODI_STAGE
• <MY_PASS> corresponds to the password that you gave: ODI_STAGE
• <MY_TBS> corresponds to the Oracle tablespace where the data will be stored:
USERS
• <MY_TEMP> corresponds to the temporary default tablespace: TEMP
To create a user, enter the following command. Verify that user account ODI_STAGE
is created successfully.
b. Grant connect privileges to the newly created user account by executing the following
SQL command:
s a
grant connect, resource, create trigger, create view to h
) a
ODI_STAGE;
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
6. Now you need to create a a rnew s e t for the target model. This datastore will be
ฺpaODIndatastore
used within the ODI( a m lTo
Interface. i cecreate a new ODI target datastore, perform the following
steps:
n d a able
a. InP
r
a Developer,
SQL
s f er create a new connection called ODI_STAGE. Enter the username
r anconnection.
a as ODI_STAGE with the password ODI_STAGE. For SID enter ORCL. Click Test to
Am overify - t
n n
the Click the Save button and then click Connect.
s a
h
) the a
b. Create your target table by executing the following SQL commands. Expand
o m ฺ
connection, ODI_STAGE > Tables > TRG_SALES_PERSON, and
c s ฺcverify that
i d ethe
table is created successfully.
m ati t Gu
t e le den
es s Stu
CREATE table "TRG_SALES_PERSON"(
"SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
g h
"FIRST_NAME" VARCHAR2(80), h u
e t hi
"LAST_NAME" VARCHAR2(80), a@ us
n d t o
rฺpNOTa eNULL,
se
"DATE_HIRED" VARCHAR2(80),
"DATE_UPDATED" DATE a
m lic n
constraint (
a a e
"TRG_SALES_PERSON_PK"
l primary key("SALES_PERSON_ID")
)
a nd ferab
a r P ans
Am on-tr
n
7. After you have created the new database target datastore, you need to create a new ODI
target data server and the physical schema. To create the ODI target data server and
physical schema, perform the following steps:
a. In ODI, open ODI Topology Navigator and then select the Physical Architecture tab.
Expand Technologies, right-click Oracle, and select New Data Server.
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
r ens
aNew
b. In the Data Server:m lic enter the values provided in the following table. Click
a le window,
the JDBC a tab.(
a nd ferab
a P ns
r Parameter Value
r a
Am oNamen -t ODI_STAGE
n Instance/dblink (Data Server) ORCL
User ODI_STAGE
Password ODI_STAGE
s a
) h a
s ฺ comideฺ
a tic Gu
c. Click for JDBC Driver. Select Oracle JDBC Driver.
l e m e t
Click OK.nClick for JDBC
Url, select jdbc:oracle:thin:@<host>:<port>:<sid>, e
st andSforthendclick OK. Edit the Url to
tuOracle
read: jdbc:oracle:thin:@localhost:1521:ORCL
g h e s Database.
Note: Do not copy and paste in the JDBC u h i
t This action may cause problems
h Url field.
a @ s e
a n d to u
with entering a valid URL string.
a rฺp ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
d. Click Test Connection. In the window that opens, click Yes to save your data. In the
Information window, click OK. Click Test to verify a successful connection. Click OK.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
f. In the Schema (Schema) and Schema (Work Schema) fields, enter your ODI_STAGE
s
schema. Click the Save button. In the Information window reminding you that no a
h a
context has been specified for this schema, click OK. Close the
)
ODI_STAGE.ODI_STAGE physical schema window. o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
g. In Topology Manager, open the Logical Architecture tab and expand Technologies.
Right-click Oracle technology and then select New Logical Schema.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
nthed logical
r b ODI_STAGE. In all three contexts, connect this logical
aschema
h. Namea f e
P tonsthe ODI_STAGE physical schema as shown here. Click the Save button
a rschema
Am oandn tra close the tabs.
-then
n
8. Create a new ODI target model that will be used within your ODI Interface. To create a new
ODI target model, perform the following steps:
Parameter Value
Name Oracle_RDBMS1
Technology Oracle
s a
Logical Schema ODI_STAGE
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
c. In the Models tab, right-click the Oracle_RDBMS1 model. Select s ฺ comiEngineer.
Reverse
d e ฺ
a
To verify that the TRG_SALES_PERSON datastore is successfullyc
ti reversed,
u expand
m t G
the model as shown here.
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
Pthe screen
b. rOn
a n s that follows, enter the interface name as INT-EXP-FF-RT. In the
r a
Am oArea
n -tDifferentContext
Optimization
From
field, select Development. If selected, deselect the Staging
Target check box. Click the Mapping tab.
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
P thenFIRST_NAME
e. rSelect s column in Target Datastore and edit the mapping to read:
a r a
Am oLtrim(SRC.FIRST_NAME).
n -t In the Execute on section,
column.
This function removes left spaces in the FIRST_NAME
select Staging Area. Repeat this step for columns
n LAST NAME and DATE HIRED. Refer to the mapping implementation provided in the
following table.
Column Mapping implementation
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
-tr your interface, click the Execute button . The following screen appears.
Amj. oTontest
n Retain the defaults and click OK. On the next screen, click OK.
k. Open ODI Operator and verify that your interface was executed successfully. In
Operator, click Session List tab, select All Executions, and the then click the refresh
button . View the execution results for the interface INT-EXP-FF-RT.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent> 30. In addition,
10. Use the Quick Edit feature to enable filtering rows with Sales_Person_ID
e tud the other characters
stname,Sleaving
you capitalize the first letter of each last name and first
in lowercase. h e
a. In the INT-EXP-FF-RT tab, select Quick-Edit h ug tab,thexpand
is Filters section, and then
click the Add Filters icon. a@ o us e
n d
a se t
r
a cenฺ p
( a m li
a l e
a nd ferab
a r P ans
Am on-tr
n
b. Select the SALES_PERSON_ID row, and then click the Launch Expression Editor
s a
icon h a
. In the left panel of the Expression Editor, double-click SALES_PERSON_ID.
Edit the expression to read: SRC.SALES_PERSON_ID > 30. Click OK. m For)Execution
Location, select Staging. Click OK.
c s ฺco ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
d. Repeat the previous step for the column LAST_NAME. Your result is shown in the
following screenshot. Click the Mapping tab and save your interface .
a. In Designer, execute your interface . In the Execution dialog box, click OK. In the
Information dialog box, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
b. Open ODI Operator and verify that the interface executed successfully. Open step 8 –
s a
h a
Integration. Click the Code tab, and view your modifications.
)
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
c. Click the INT_EXP_FF_RT
a ฺ
rfilterederows
tab.
n Insthe Mapping tab, right-click the target datastore and
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
Practices lfor m ati t G11:
Lesson
u
t e e den
Designing
h S tu
es sInterfaces:
u g
Advanced
h t hi Topics 1
a@Chapter e
us 11
n d t o
a rฺpa ense
( a m lic
n d a able
P a sfer
a r an
Am on-tr
n
Practices Overview
In Practice 11-1, you create and use a native sequence for an ODI Interface. In Practice 11-2,
you create temporary indexes for an ODI Interface. In Practice 11-3, you use datasets with an
ODI interface for data transformation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Background:
In this practice, you first use ODI to define the procedure Create_ORCL_SEQ_FAM_ID. You
then execute this procedure, which creates the sequence SEQ_FAMILY_ID in the RDBMS.
Next, you use ODI to create an ODI definition of the native sequence you just created in the
RDBMS, using the same name, SEQ_FAMILY_ID.
Finally, you create and execute the interface INT-11-1 to load the TRG_PROD_FAMILY target
table by using the new native sequence to generate ID numbers for that table. s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
Note: Completing thism practice
n for all the following practice sessions.
a iscecritical
( a l i
d a a b le
Your Tasks: n
a sfer
r P
a traexecute
1. Create and n an ODI procedure that creates an Oracle native sequence.
m
A a. oIfnnot- connected, connect to the DEV_ODI_REPO Work Repository (User:
n SUPERVISOR, Password: SUNOPSIS). Click the Designer tab.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
-trDetails tab, click the Add command button . In the Name field, enter:
Amc. oInnthe
n Create ORCL SEQ. In the Command on Target tab, set the Technology field to
Oracle. In the Schema drop-down list, select ORACLE_ORCL_LOCAL_SALES. In
the Command panel, enter the command, which creates the following sequence. Click
the Save icon to save the procedure. Close the tab. .
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
e. Open SQL Developer and expand: Administrator > Other Users > SALES_DEV >
Sequences. Verify that your sequence SEQ_FAMILY_ID was created in RDBMS.
s
Note: Be sure that you expand the Administrator connection, not ODI_STAGE. a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
b. Name the new sequence SEQ_FAMILY_ID. Select the Native sequence
s ฺ comoption.
i d e ฺ In the
i
atthec u In the
schema field, select ORACLE_ORCL_LOCAL_SALES. Click
m t G
icon.
nselect the native
t e le andlook
window that follows, select the DEVELOPMENT context, then
d e
sequence SEQ_FAMILY_ID. Click OK. Your screen
h e s Stu
should as shown next. Save
the sequence, and then close the tab.
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
3. Create a new interface to load
ฺ p athe Product
e tFamily table by using the Native Sequence.
r s
en New Interface. Enter the new interface name:
a andcselect
a m
a. Right-click Interfaces,
( Optimizationl i
INT_11-1. For
d a b l e Context, select Development. Click the Mapping tab.
P an sfera
m ar tran
A on-
n
s a
) h a
b. In the Models tab, expand the HSQL_SRC model and Oracle Sales Application
Drag the SRC_PRODUCT datastore from the HSQL_SRC models toฺc
om earea
the source
model.
ฺ in
your interface. Drag the TRG_PROD_FAMILY datastore from t i
thec Oracle u i d
Sales
a
mautomatic t G
e l e
Application model to the target area. Click Yes to perform
e n mapping.
h e st Stud
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
ฺ c om eฺ
s
t table. Guid
4. Execute the newly created interface and verify the data in the targetic
a
m . eThe tExecution screen
l
a. Execute Interface INT_11-1 by clicking the Execute button
e e n
appears. Retain the defaults and click OK. On the
then verify execution in the Operator tab. ghe S tudscreen, click OK, and
stInformation
h u
e t his
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
h es s the S u
tTarget
TRG_PROD_FAMILY, and then selecthData.
g
b. In the INT_11-1 tab, select the Mapping tab, right-click
u Verify t h i Datastore
the data inserted in the table.
Close the Data Editor window anda @ u
INT_11-1 e
stab.
a d
n e to
ฺ p
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Now, John needs to load the target product table by using the source product table and the
lookup against the table, which contains the ID numbers generated by the newly created
interface with the native sequence. John also needs to create a temporary index on the source
tables to implement the join on the source.
Background:
In the previous practice, TRG_PROD_FAMILY was a target table. In this practice,
TRG_PROD_FAMILY serves as one of the source tables.
First, you create a new ODI interface, INT-11-2 to load data into the TRG_PRODUCT target
s a
) h a
datastore table in the Oracle Sales Application model. You specify the source tables as
SRC_PRODUCT from the HSQL_SRC model, and TRG_PROD_FAMILY from the Oracle Sales
m
Application model. o
ฺc ideฺ
c s
ati t Gu
TRG_PROD_FAMILY will be used as a lookup table to obtain the ID number generated by the
m
t e le den
previous lesson’s interface that used a sequence to populate the ID number.
g h es s Stu
For the lookup, you create a temporary index to join SRC_PRODUCT and TRG_PROD_FAMILY on
their FAMILY_NAME column.
h u
e t hi
n
TRG_PRODUCT target datastore. d a@ o us
Finally, you execute the interface, view the source code, and examine the inserted rows in the
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Note: Completing this practice is critical for all the following practice sessions.
Your Tasks:
1. Create a new ODI Interface with a temporary index on the source tables.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
-tr the fourth step, Loading – SrcSet0 - Create Temp. Indexes on Work. In
Amc. oDouble-click
n
n the Session Task, select the Code tab. View the source code.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
John creates an interface with multiple data sets to add in a bulk feed of customer data from
another system.
Background:
In this practice, you add a new data set to an interface. Building upon the interface INT_9-2
you created in Lesson 9, you will add a bulk feed of customer data from another system by
adding another data set.
First, you make a copy of interface INT_9-2, naming the copy as INT_11-3. This copy
includes the default data set you defined in INT_9-2.
s a
) h a
Now, you create a new data set, naming it BULK_CUST_DATA. For its source, you specify the
m
TRG_BULK_CUSTOMER datastore from the Oracle Sales Application model.
o
s ฺc ideฺ
You specify the UNION operator to unite this new source of data with the default data set that
c
you specified in INT_9-2.
m ati t Gu
t e le den
Next, you perform an execution simulation to preview the code that will be used for this new
data set with the UNION operator.
g h es s Stu
h u
e t hi
Finally, you execute the interface and verify the rows inserted into the target table.
.
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
Note: Completing this practice is critical for all the following practice sessions.
Your Tasks:
1. Create an ODI interface with multiple data sets.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
s ฺ comideฺ
a tic Gu
l e m ent
e
st Stud
h e
h ug this
d a @ use
p a n e to
ฺ
ar cens
m
(a le li
a
nd ferab
a
a r P ans
Amg. oClick
n r
-tthe
n perform anExecute button . In the Execution dialog box, select the Simulation box to
execution simulation in the Development context. Click OK. In the
Simulation window, scroll down to approximately one third of the way, and view the
simulated code for the data set TRG_BULK_CUSTOMER with the UNION operator as
shown next.
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n
s a
) h a
o m
c s ฺc ideฺ
m ati t Gu
t e le den
g h es s Stu
h u
e t hi
n d a@ o us
r ฺ p a se t
m a cen
a ( a l e li
a nd ferab
a r P ans
Am on-tr
n