Está en la página 1de 450

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b) ha
r
c om e
a n as Guid
Oracle Datab ucIntegrator
e n t 11g:
r n am and
Integration S tud
p e this
Administration
a d e@ use
r i n d e Activity
to Guide
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

D64974GC10
Edition 1.0
December 2010
D68949
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Disclaimer

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

The information contained in this document is subject to change without notice. If you 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
warranted to be error-free.

Restricted Rights Notice

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 applicable:

U.S. GOVERNMENT RIGHTS


The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
s a
Trademark Notice
b r ) ha
owners. c om e
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective

a n as Guid
Authors b uc dent
Viktor Tchemodanov, Richard Green
r n am Stu
p e this
Technical Contributors and Reviewers e@ se
a d u
d Denise Gray,
Nagavalli Pataballa, Nancy Greenberg,
t r i n to Jeff Pollock, FX Nicolas,
i el iceUsha
Christophe Dupupet, Art Hetherington,
n ns Ramanathan, Gerry Jurrens,
( da ble l
Phillip Scott, Taj-ul Islam
l
a nie sfera
This
i e l D was
book
t r n
apublished using: Oracle Tutor
n -
Da non
Table of Contents
Practices for Lesson 2 .............................................................................................................................. 1-1
Practices for Lesson 2: Flow of Data........................................................................................................ 1-2
Practice 2-1: Creating and Connecting to ODI Master and Work Repositories ........................................... 1-3
Practices for Lesson 3 .............................................................................................................................. 2-1
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practice 3-1: Setting Up and Installing an ODI Agent ................................................................................ 2-2


Practices for Lesson 4 .............................................................................................................................. 3-1
Practice 4-1: Working with Topology ........................................................................................................ 3-2
Practices for Lesson 5 .............................................................................................................................. 4-1
Practice 5-1: Creating a Model ................................................................................................................ 4-2
Practices for Lesson 6 .............................................................................................................................. 5-1
Practice 6-1: Setting Up a New ODI Project ............................................................................................. 5-2
Practices for Lesson 7 .............................................................................................................................. 6-1
s a
Practice 7-1: Checking Data Quality in the Model ..................................................................................... 6-2

b r ) ha
Practices for Lesson 8 .............................................................................................................................. 7-1

c om e
Practice 8-1: Creating ODI Interface: Simple Transformations .................................................................. 7-2

n as Guid 8-1
Practices for Lesson 9 ..............................................................................................................................
a
b uc dent
Practice 9-1: Creating ODI Interface: Complex Transformations ............................................................... 8-2

a m t u
Practice 9-2: Creating ODI Interface: Implementing Lookup ...................................................................... 8-20

e rn is S
Practices for Lesson 10 ............................................................................................................................
p 9-1
Practice 10-1: Creating ODI Interface: Exporting a Flat @File to asRelational
e h
t Table ...................................... 9-2
d
a to u e
Practices for Lesson 11 ............................................................................................................................ 10-1
i n d
Practice 11-1: Using Native Sequences
Practice 11-2: Using Temporary i e ltr .................................................................................................
Indexes
with
e
ODI
n se
Interface ....................................................................... 10-2
10-15
a
d ble n l i c
l (
Practice 11-3: Using Data Sets with ODI Interface .................................................................................... 10-24

a ie 12 ............................................................................................................................
nUsing
Practices for Lesson
f e ra 11-1
Practice 12-1: s
l D12-2:tDeveloping
an a New Knowledge Module............................................................................... 11-33
Temporary ODI Interfaces ....................................................................................... 11-2
n i e
Practice - r
nofornLesson 13 ............................................................................................................................ 12-1
DaPractices
Practice 13-1: Creating an ODI Procedure ............................................................................................... 12-2
Practices for Lesson 14 ............................................................................................................................ 13-1
Practice 14-1: Creating an ODI Package.................................................................................................. 13-2
Practice 14-2: Using ODI Package with Variables and User Functions ...................................................... 13-13
Practices for Lesson 15 ............................................................................................................................ 14-1
Practice 15-1: Working with ODI Versions................................................................................................ 14-2
Practices for Lesson 16 ............................................................................................................................ 15-1
Practice 16-1: Creating and Scheduling an ODI Scenario ......................................................................... 15-2
Practices for Lesson 17 ............................................................................................................................ 16-1
Practice 17-1: Enforcing Data Quality with ODI Interface .......................................................................... 16-2
Practices for Lesson 18 ............................................................................................................................ 17-1
Practice 18-1: Implementing Changed Data Capture ................................................................................ 17-2
Practices for Lesson 19 ............................................................................................................................ 18-1
Practice 19-1: Setting Up ODI Security .................................................................................................... 18-2
Practice 19-2: Integration with Enterprise Manager and Using ODI Console.............................................. 18-21

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Oracle Data Integrator 11g: Integration and Administration Table of Contents


i
Practices for Lesson 20 ............................................................................................................................ 19-1
Practice 20-1: Executing an ODI Scenario Through the ODI Public Web Service....................................... 19-2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Oracle Data Integrator 11g: Integration and Administration Table of Contents


ii
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 2
n1a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 1
Practices for Lesson 2: Flow of Data
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 2
Practice 2-1: Creating and Connecting to ODI Master and Work
Repositories
Use Case Scenario:
John works as a database administrator for FN Enterprise. In FN Enterprise, John is responsible
for performing database management and integration tasks on various resources within the
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

organization. In particular, John is responsible for data loading, transformation, and validation.
To set his ODI environment, he needs to set up the security with his OD and create Master and
Work repositories.
Background:
The first steps to setting up Oracle Data Integrator are to 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
Work repositories. Then, in ODI you create and connect to the ODI Master Repository and the
s a
ODI Work Repository.
b r
Note: These are practice repositories. In later lessons, you use other Master and Work
) ha
c om e
repositories that are partially predefined with source and target objects.

a n as Guid
b uc dent
r n am Stu
data
base
-

p e this
SQL Developer
e@ use
play .
png

a d
d e to
Create SNPM1 database tuser r i nfor
master repository iel
n c e ns
Create SNPW1
( dadatabase
l e li for
user
l b
nie sfera
work repository
a
i e l D tran
n -
Da non
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

Your Tasks:
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 3
1. The RDBMS used in this practice is Oracle 11g. To connect to your RDBMS, perform the
following steps:
Step Screen/Page Description Choices or Values
a. MS Windows Start the SQL Developer by selecting Start >
Programs > Oracle-OraDb11g_home1 >
Application Development > SQL
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Developer. When SQL Developer starts,


close the Logging Page Log tab.
b. Oracle SQL Developer In Oracle SQL Developer, click + to expand
the connection Administrator. In the window
that follows, enter system in the User name
field, oracle1 in Password, and then click
OK.
a.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
b. t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

2. Create the RDBMS schema or user (Oracle 11g) for the Master repository.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 4
Step Screen/Page Description Choices or Values
a. Oracle SQL Developer Click OK to The RDBMS user/schema can
be created by executing the following SQL
command:
create user snpm1 identified by
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

password
default tablespace users
temporary tablespace temp;
Note: You can find this command in the text
file 2-1.txt located in c:\LABS\Text
folder.
Enter this command and then click the Run
button.
Note: In this command, password is the
s a
b r ) ha
value of password to connect to user snpm1.

c om e
a n as Guid
b. Oracle SQL Developer uc privileges
Grant connect
b e n t to the newly created
r
userm
n
command: S tud the following SQL
a by executing
p e grant
t hisconnect, resource to snpm1;
@
de o us e
d a
l t rin nse t
c. Oracle SQL
n e ice
iDeveloper Expand the Other Users node to verify that
( a
d ble l user snpm1 was successfully created.
l
a. a nie sfera
i e l D tran
n -
Da non

b.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

3. Create the ODI Master repository:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 6
Step Screen/Page Description Choices or Values
a. MS Windows Start Oracle Data Integrator: Start >
Programs > Oracle ODI 11g-Home >
Oracle Data Integrator > ODI Studio.

b. Oracle Data Integrator Open the New Gallery by choosing File >
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

New.
In the New Gallery, in the Categories tree,
select ODI.
Select from the Items list the Master
Repository Creation Wizard. Click OK.
The Master Repository Creation Wizard
appears.

s a
) h a
c. Master Repository Creation Wizard In the Master Repository Creation
select the browse icon of m b r Wizard,
the JDBC Driver
and then select Oracle o e Click
c JDBCidDriver.
OK. Edit the JDBC s
na URL uread:
to
c a
u den t G
jdbc:oracle:thin:@localhost:1521:orcl
m b
r a theSUser
nEnter tu as snpm1 and the Password
p e t h is
as password . Click the Test Connection

a d e@ usebutton and verify successful connection. Click


OK. Click Next on the Master Repository
r i n d e to Creation Wizard screen.
t
el icens
n i
l ( da ble l
d.
a nieMaster
s f e ra
Repository Creation Wizard In the Authentication window, enter the
Supervisor Password as SUNOPSIS. Enter
l D n
a nie on-tra SUNOPSIS again to confirm the password.
Click Next.
D n Note: User names and passwords are case-
sensitive in ODI.

e. Password Storage In the Password Storage window, select


Internal Password Storage, and then click
Finish. When Master Repository is
successfully created, you will see the Oracle
Data Integrator Information message. Click
OK. The ODI Master repository is now
created.

f. Message Verify that ODI Master Repository was


created successfully, and then click OK.

a.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
b.
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
c.
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
f.
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

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 choosing File > New. In the New
Integrator Gallery, in the Categories tree, select ODI. From the Items
list, select Create a New ODI Repository login.

b. Repository Configure the repository connections with the parameters


Connections from the following tables. To enter the JDBC URL, click the
button next to the JDBC URL field and select
jdbc:oracle:thin:@<host>:<port>:<sid>, as shown
in the screen, then edit the URL. Select the Master
Repository only button. Click the Test button. Verify
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 11
Step Screen/Page Choices or Values
Description
successful connection and click OK. Click OK to save the
connection.

Oracle Data Integrator Connection


Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Parameter Value

Login Name Master Repository Pr 2-1

User SUPERVISOR

Password SUNOPSIS
s a
Database Connection (Master Repository)
b r ) ha
Parameter Value
c om e
User a n as Guid
uc dent
snpm1
b
Password password
r n am Stu
p e this
a d e@
Driver se JDBC Driver
List Oracle
u
r i n d e to
t
el iceDriverns
a n i l Name
oracle.jdbc.OracleDriver

i e l (d rable Url
D an nsfe jdbc:oracle:thin:@localhost:1521:orcl

n i el -tra Note: Do not copy and paste in the JDBC URL field. This
Da non 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.
Note: The ODI user name (SUPERVISOR) is case-sensitive.
c. Oracle Data Click Connect to Repository. Select the newly created
Integrator repository connection, Master Repository Pr 2-1, from the
drop-down list. Click OK. The ODI Topology Manager starts.
You are now successfully logged in to the ODI Topology
Manager.

d. Import Service Click the Topology tab. Click the Repositories tab in the left
Description panel of the Topology Manager. Verify that your newly
created Master repository is in the Repositories window.

a.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
c.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

5. Use SQL Developer to create the RDBMS schema/user for the Work repository.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 15
Step Screen/Page Description Choices or Values
a. Oracle SQL Developer If not opened, open SQL Developer. Create
the schema by executing the following SQL
command:
create user snpw1 identified by
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

password
default tablespace users
temporary tablespace temp;
Note: You can find this command in the text
file 2-1.txt located in c:\LABS\Text
folder.
Click Run.

s a
b r ) ha
b. Oracle SQL Developer
c om e Grant connect privileges to the newly created

a n as Guid user by executing the following SQL


command:
b uc dent grant connect, resource to snpw1;

r n am Stu
p e this
c. Oracle SQL Developer de
@ sRun e the following command to verify that
a u
d e to user snpw1 was successfully created and
t r i n
n i el icens shown among other users in the list:

( d a le l select * from all_users;

n i el erab
a.
D a nsf
l
a nie on-tra
D n

b.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c.
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

6. Now that you created the RDBMS schema/user, use ODI Topology Navigator to create the
ODI Work repository:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 17
Step Screen/Page Choices or Values
Description

a. Oracle Data Integrator In ODI, click the Topology Navigator tab and then click to
the Repositories panel.
Right-click the Work Repositories node and select New
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
b r ) ha
Driver
Name c om e
oracle.jdbc.driver.OracleDriver

a n as Guid
uc dent
JDBC Url jdbc:oracle:thin:@localhost:1521:orcl
b
User r n am Stu
snpw1
p e this
a e@ uspassword
Password
d e
r i n d e to
t
el icenInsthe Specify Work Repository properties panel, set the ID
c. n
Specify Work i l to 1. Set the Name to WORKREP_PR2-1. In the Password
( da properties
Repository
l b l e
a nie sfera field, enter SUNOPSIS. In the Work Repository Type field,

e l D ran leave Development unchanged. Click Finish. Verify that


ni -t the newly created Work repository is now in the work
Da non 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 includes also the run-time objects
(scenarios and sessions). This type of repository is suitable
for development environments.

d. Create Work Repository In the Create Work Repository Login window, click Yes.
Login Enter the Login name: Work Repository Pr 2-1, as shown
in the screen. Click OK.

e. Oracle Data Integrator Verify that Work repository WORKREP_PR2-1 was created
and is shown under the Work Repositories node.

a.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
b. c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
c. a nie sfera
i e l D tran
n -
Da non

d.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
e. a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

7. Disconnect from the Master repository and connect to the Work repository:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 21
Step Screen/Page Choices or Values
Description
a. Oracle Data Integrator Click the ODI menu and select Disconnect Master
Repository Pr 2-1.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Oracle Data Integrator Click Connect To Repository.

c. Oracle Data Integrator Select Work Repository Pr 2-1 from the Login Name
Login drop-down list. In the Password field, enter SUNOPSIS.
s a
Click OK. Click the Designer tab. The following ODI
Designer screen appears.
b r ) ha
c om e
You have now successfully created and connected to the
ODI Work repository.
a n as Guid
b uc dent
d. Oracle Data Integrator Click ODI menu n
r am
and selectS tu
Disconnect Work repository
Login Pr 2-1. p e th i s
e @
d o us e
d a
l t rin nse t
a.
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

b.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 22
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2


Chapter 1 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 3
n2a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 1
Practice 3-1: Setting Up and Installing an ODI Agent
Use Case Scenario:
John is responsible for data loading, transformation, and validation. He created Master and
Work repositories. Now he continues setting up his ODI environment by installing an ODI Agent.
Background:
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

A common task that is performed by using ODI is to set up and install 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/paste that string into the odiparams.bat file that contains ODI agent parameters.
You then switch to ODI, and define a physical agent named localagent. Next, you define a
logical agent also named localagent, mapping it to the same-named physical agent. You specify s a
the Global context as the context in which to make this particular mapping of logical to physical
agents. b r ) ha
c om e
In the command window, you execute agent.bat to start the agent that you named localagent.

In ODI, you test connection to your newly created agent.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

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

Your Tasks:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 2
1. Before executing the agent.bat file to create the ODI Agent, you must run the encode
password command to generate an encrypted password and paste it into the
odiparams.bat parameter file. To do so, perform the following steps:
Step Screen/Page Choices or Values
Description
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

a. MS Windows and Navigate to the ODI_HOME directory, where ODI is installed


text editor 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.
Explanation: You need to edit the odiparams.bat file to set
s a
) ha
the repository connection information for the ODI Agent to use.
b r
The password information is stored as an encrypted string. You

c om e
will generate the encrypted string in a Command window.

a n as Guid
b. Command Prompt
b uc the
Leave the text editor open, and
(Start -> Run -> cmd). Change
open thet Command window
d e n to the
directory
m tu
na directory:
ODI_HOME\agent\bin
e r S
p t his
C:\Oracle\Middleware\Oracle_ODI1\oracledi\agent
@ e
\bin
d a de o us
c. Command Prompt rin To generate
t e t the encrypted password string, you will be using
l
ie licthe s
enagent command, encode <password>. Because your
a n password is the word oracle1, enter and execute the following
i e l (d rable command in the Command window:
D an nsfe
n i el -tra encode oracle1
D a no n
Keep the Command window open, as you will be returning to it
after editing the odiparams.bat file.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 3
Step Screen/Page Choices or Values
Description
d. Command Prompt Copy the generated, encrypted password from the Command
and text editor window (from the Command windows pull-down menu, select
Edit > Mark, then highlight the password with your mouse) and
insert it into the odiparams.bat file as the value for the
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

ODI_MASTER_ENCODED_PASS parameter. Verify and, if


necessary, edit settings for other parameters from the following
table, save the odiparams.bat file, and then close it. The
agents connectivity is now set up.

Parameter Value

ODI_MASTER_DRIVER oracle.jdbc.OracleDriver
a
ODI_MASTER_URL ) h as
jdbc:oracle:thin:@localhost:1521:orcl
b r
ODI_MASTER_USER DEV_ODI_REPO c om e
a n as Guid
ODI_MASTER_ENCODE uc t
nencoded
D_PASS m b Insertd
u e
your password.
a t
p ern this S
d e@ use
ODI_SECU_WORK_REP
a WORKREP
d
rin nse t o
l t
a n ie liceODI_SUPRVISOR_ECO
l ( d ble DED_PASS Leave the default value.

a nie sfera
i e l D tran ODI_USER Leave the default value.
n -
Da non ODI_ENCODED_PASS Leave the default value.

ODI_JAVA_HOME C:\jdk1.6.0_18

Note
DEV_ODI_REPO is an RDBMS schema/user (Oracle 11g) for
the Master repository. It was precreated for this and subsequent
practices.
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
precoded during ODI installation.
a.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b u c ent
b.
r n am Stud
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
c.l
e D ran
n i -t
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

2. Now that you have generated an encoded password and pasted it into the
odiparams.bat file, you need to create the ODI physical and logical agent definitions. To
create these ODI agent definitions, perform the following steps:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 6
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.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Topology navigator Click Topology Navigator tab. In Topology Navigator, select the
Physical Architecture panel. Right-click the Agents node.
Select New Agent.

c. Agent: localagent Fill in the following fields:


Name: localagent
Host: Network name or IP address of the machine the agent
s a
) ha
has been launched on. Verify that this parameter is set to
localhost.
b r
c om e
Port: Listening port used by the agent. By default, this port is
20910. Leave the default value.
a n as Guid
Web Application Context: Name of the Web application
b uc dent
corresponding to the Java EE agent deployed on an

r n am Stu
application server. For standalone agents, this field should be
e this
set to oraclediagent.
p
a d e@ use
Set Maximum number of sessions supported by this agent to
250. Click the Save button.
r i n d e to
e t
l ens
d. Topologya n i
Navigator licNow you have to insert a logical agent in Logical Architecture,
( d ble and
l Agent:raNew map it to the newly created Physical agent. Click the
n i e
Local
D a nsfe Logical Architecture tab. Right-click Agents and select New

i e l t r a Logical Agent. On the screen that follows, set the Name to


n - localagent. Set Physical Agents to localagent. From the
Da non file menu, click Save, and then close the Logical Agent tab.

a.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b.

s a
b r ) ha
c om e
a n as Guid
b u c ent
c.
r n am Stud
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da d.non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
3. b r
Now that you have created the agent and defined the ODI physical and logical agents, you
) ha
can start the agent directly from the command line.
c om e
Step Screen/Page Choices a as Guid
ornValues
Description
b uc dent
a. Command Prompt
r am Swindow
Switch back to thenCommand tu you left open at the
p e
ODI_HOME\agent\bin
t is
hdirectory
@
de Execute e
(C:\Oracle\Middleware\Oracle_ODI1\oracledi\agen
d a
t\bin).
t o usthe agent.bat file by using the following
l t rincommand:
n se
i e e
( d an le licagent -NAME=localagent
n i el erab
b. a Services
D n s f The agent is now starting. Verify that ODI Agent is successfully
e l r a
a ni on-t started. Minimize the window Command Prompt agent-
NAME=localagent.
D n Note: This command window should remain open during all
labs.
c. Oracle Data In ODI, click the Test icon to verify connection of the agent
Integrator localagent.
You successfully created and connect to ODI agent. Close the

localagent tab . Also, close the Messages -

Log tab .
a.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 9
b.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3


Chapter 2 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 4
n3a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 1
Practice 4-1: Working with Topology
Use Case Scenario:
John created the Master and Work repositories and installed an ODI Agent as a background
service. To complete setting up his ODI infrastructure, he needs to create contexts, a data
sever, and physical and logical schemas.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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:
Schema Description
SALES_DEV Schema storing the target tables for s a
development purposes
b r ) ha
SALES_PROD Schema storing the production targetom
tables s c ide
STAGING Schema used to store u c
ODI
na t Gu
atemporary
objects (not usedm inb d e n
this practice)
r n a S tu
Both the SALES_DEV and SALES_PROD physical e th s identical table structures
schemas icontain
pORACLE_ORCL_LOCAL_SALES.
and correspond to the same logical schemaecalled
d @ s e The
mapping for this logical schema depends a u
on the context.
dcriticalefortallo subsequent practice sessions.
Note: Completing these taskst r i n
is
n i el icens
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

This practice consists of the following six steps:


1. Define the Production context.
2. Define the Development context (a third context, Global, is pre-seeded).
3. Define the ORACLE_ORCL_LOCAL data server.
4. Define the ODI physical schemas for data server: SALES_DEV,SALES_PROD.
5. Define the ORACLE_ORCL_LOCAL_SALES ODI logical schema.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 2
6. Map the logical schema to the two physical schemas, in terms of the three contexts.
Your Tasks:
1. If not started, start Oracle Data Integrator and open the DEV_ODI_REPO connection.
Note: The username and password are case-sensitive.
a. Select Start > Programs > Oracle ODI11g-Home > Oracle Data Integrator > ODI
Studio. Click Connect To Repository.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. Log in with the following details. Click OK.


Login name: DEV_ODI_REPO
User: SUPERVISOR
Password: SUNOPSIS

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2. Create a new context:


a. Click the Topology navigator tab, and then click the Context tab.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
e t
l ens
n i
b. Click the NewaContext icon lic on the toolbar, and then select New Context.
( d l e
n i el erab
D a nsf
l
a nie on-tra
D c.n Enter your context parameters as shown below. The context window should appear as
follows. Click the Save button .
Name: Production
Code: PRODUCTION
Password: Leave this field empty.
Default: Select this check box, and click Yes to confirm in the pop-up window.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b
d. To create another new context , repeat the operations:uc dent
Name: Development r n am Stu
Code: DEVELOPMENT p e this
a d
Password: Leave this field empty.
e@ use
r i n d e to
t
Default: Leave the check
el icens
box deselected.
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

The contexts should appear as follows:

3. Create an ORACLE_ORCL_LOCAL data server:


a. Click the Physical Architecture tab. Expand the Technologies node, select the
Oracle node, and then right-click and select New Data Server.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
b. Enter the following information on the Definition tab:
Name: ORACLE_ORCL_LOCAL
Instance Name: ORCL
User: ODI
Password: ODI

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
c ent
c. Click the JDBC tab. Click the ofu
button at the right b d OK.
the JDBC Driver field. In the
a m t u
ern this S
window that appears, select Oracle JDBC Driver, and then click
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Click the button to the right of the JDBC URL field. In the window that appears,
select the first URL, and then click OK.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

e. Edit the JDBC URL to have the following:


s a
URL: jdbc:oracle:thin:@localhost:1521:ORCL
The JDBC tab should now appear as follows: b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a ie server:
ndata f e ra
4. Test this s
D anTest Connection button. Click Yes to confirm saving your data before testing
i a.l Clicktrthe
e
n
Da nothe n-connection. In the Information window, click OK.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b. In the dialog box that appears, click the Test button. Click OK.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
5. Create a physical schema for this data server: ORACLE_ORCL_LOCAL.SALES_DEV with
the following parameters:
Data Schema: SALES_DEV
Work Schema: STAGING
Default check box: Selected
a. Expand the Oracle node. Right-click the newly created data server,
ORACLE_ORCL_LOCAL, and then select New Physical Schema.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
nienew swindow
b. Inathe f e ra that appears, select SALES_DEV from the Schema (Schema)
i e l Ddrop-down
t r an list, and then select STAGING from the Schema (Work Schema) drop-
n -
Da non down list. Verify that the Default check box is selected, and leave all the other fields
unchanged. Click the Save button . Click OK in the Information window that
appears.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c. Expand: Oracle > ORACLE_ORCL_LOCAL. The Physical schema


ORACLE_ORCL_LOCAL.SALES_DEV appears in the tree view:

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l
(
6. Create a physical
l daschemab l e
ORACLE_ORCL_LOCAL.SALES_PROD for the
i e r a data server:
l D
an nsfeSALES_PROD
ORACLE_ORCL_LOCAL
Data Schema:
nie oWork a
-trSchema:
D a n n STAGING
Default Schema: Not selected
a. Select the ORACLE_ORCL_LOCAL data server in the tree view, and then right-click
and select New Physical Schema.

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) drop-
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 11
down list. Check that the Default check box is not selected, and leave all the other
fields unchanged. Click the Save button . In the Information window, click OK.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n on-
Da7. Create
n a logical schema, ORACLE_ORCL_LOCAL_SALES, and map this schema to different
physical schemas, for the different contexts.
Development Context: To the ORACLE_ORCL_LOCAL.SALES_DEV physical schema
Production Context: To the ORACLE_ORCL_LOCAL.SALES_PROD physical schema
Global Context: To the ORACLE_ORCL_LOCAL.SALES_DEV physical schema
a. Select the Logical Architecture tab and expand the Technologies node. Select the
Oracle node, and then right-click and select New Logical Schema.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Enter the name of the logical schema ORACLE_ORCL_LOCAL_SALES. To map this


logical schema to physical schemas in different contexts, select the appropriate
physical schema in front of each context, as shown in the following screen. Click the
s a
Save button.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
8. The logical schema FILE_DEMO_SRC
e t
l ensis predefined for you and is mapped in the Global
a
context to a physical n i
schema lthat ic represents a subfolder in a file system. Map
( d l e
FILE_DEMO_SRC
n i el etorthe
a bsame physical schemas in the Development and Production
a nsf
contexts.
D
i l In a Architecture, expand the File node, and double-click the
e FILE_DEMO_SRC
a. therLogical
t
n -
Da noisnmapped to the physical logical schema. Ensure that the logical schema FILE_DEMO_SRC
schemas in the Development, Global, and Production
contexts, as follows. Click the Save button.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Repeat the previous step for the following logical schemas:


In XML technology, the logical schema XML_DEMO_GEO should be mapped to the
physical schema XML_DEMO_DIM.GEO, as follows.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
In Hypersonic SQL, the logical schema HSQL_DEMO_SRC should be mapped
to the physical schema HSQL_LOCALHOST_20001_Default in all contexts.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

In Hypersonic SQL, the logical schema HSQL_DEMO_TARG should be mapped


to the physical schema HSQL_LOCALHOST_20002_Default, as follows.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n on-
Da Note:
n Ensure that these mappings are similar in the three contexts. Close all the tabs, as
shown:

9. You set up ODI agent localagent in Practice 3-1. Link the Logical agent to the Physical
agent in all three contexts and test the connection.
a. In the Physical Architecture, 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.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 15
Save your changes.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da b.noInnthe physical agents localagent tab, click Test, and verify successful connection.
Click OK, and then close all the tabs.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4


Chapter 3 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 5
n4a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 1
Practice 5-1: Creating a Model
Use Case Scenario:
John created a new ODI project and imported knowledge modules that will be used for
development of his integration project. Now, John needs to create new ODI Models and
reverse- engineer all tables and files in the models.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Background:
In the previous practice, you configured the schemas containing the application datastored 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
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
Your
i e l D tran
Tasks:
n othe
Da1. Start
n n- ODI Demo source environment: Select: Start > Programs > Oracle ODI 11g-Home
> Oracle Data Integrator > Shortcut to startdemo. If the Open File Security Warning
window appears, click Run. The Oracle DI Demo Source command shell window opens.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
Note: You should have this command shell window running during all the labs.
c om e
a n as Guid
2. Create a model for the Oracle schema. b uc dent
a. In Designer, select the Models tab.
r n am Stu
b. Click the New Model icon and @
e thisModel.
thenpselect New
a d e use
r i n d e to
t
el icens
n i
l ( da ble l
e era
c. D ani (enter
Specify
n s f or select) the following parameters on the Definition tab:
l a Oracle Sales Application
a nie on-trName:
D n Code: ORACLE_SALES_APPLICATION
Technology: Oracle
Logical Schema: ORACLE_ORCL_LOCAL_SALES
The Definition tab should appear as shown:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
d.
om e
Click the Reverse Engineer tab, and then select Development from the Context drop-
c
down list. Click the Save button.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

3. Reverse-engineer all the tables in this model.


a. Right-click Oracle Sales Application model and select the Reverse Engineer option. If
the Confirmation window appears, click Yes.
Note: The progress of the reverse engineering process is shown on the status bar.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n amIn theStree
b. Verify the model reverse-engineered successfully.
r tuview, expand the Oracle
e hisappear.
Sales Application model. The datastorespof the model
t
@
de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Expand the TRG_CUSTOMER datastore, and then expand the Columns and Constraints
nodes. The list of columns and constraints that were reverse engineered for this table
appear in the tree view. Check that the columns and constraints that were reverse

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 5
engineered for the TRG_CUSTOMER table correspond to its data definition language
(DDL) given below. Close the tabs.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
a le l
l ( d
create table
n ieTRG_CUSTOMER
f e r ab (
a
DCUST_ID n s NUMERIC(10) not null,
e l r a
ni DEAR n-t VARCHAR(4),
Da noCUST_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));

Note: The constraint called FK_SALES_CUST TRG_SALES is defined on another table.


As it references TRG_CUSTOMER, it also appears here.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 6
4. Create a model for an XML file.

a. Click the New Model icon and then select New Model.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Specify (enter or select) the following parameters on the Definition tab:


Name: Geographic Information
Code: GEOGRAPHIC_INFORMATION
s a


Technology: XML
Logical Schema: XML_DIM_GEO b r ) ha
c. c om e
The Definition tab should appear as below. Click the Reverse Engineer tab.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Select Development from the Context drop-down list. Click the Save button.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

5. Reverse-engineer all the tables in this model.


s a
a. In the Models tree view, right-click Geographic Information model and select the
Reverse Engineer option. b r ) ha
c om e
Note: The progress of the reverse engineering process is shown on the status bar.

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. Verify that the model reverse-engineered successfully. In the tree view, expand the
Geographic Information model. The datastores of the model appear.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 8
6. Open the XML file GEO_DIM.xml corresponding to the XML model that you have reverse-
engineered. The file is at the following location:
C:\Oracle\Middleware\Oracle_ODI1\oracledi\demo\xml
a. Open Windows Explorer, and go to the
C:\Oracle\Middleware\Oracle_ODI1\oracledi\demo\xml directory.
b. Right-click the GEO_DIM.xml file and select Open.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c. The XML file opens in Internet Explorer. The file structure appears as shown here:

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
The file hierarchy is GEOGRAPHY_DIM > country p e > region
t his > city > and so on..
7. Compare the XML file content with the dthe @ s e
ereverse-engineered structure in the Hierarchical
view. In Designers tree view, expandd a t o u
Geographic Information node, and then the
t r i n e
Hierarchy node. Expand the
n i el datastores
c e ns under this node.
l ( da ble li
a nie sfera
i e l D tran
n -
Da non

The hierarchy of the XML file is reproduced here. The XML file has been mapped to a
relational structure, with foreign keys to map the links between the different levels of

hierarchy. Close the Geographic Information model tab .

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5


Chapter 4 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 6
n5a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 1
Practice 6-1: Setting Up a New ODI Project
Use Case Scenario:
John is responsible for an integration project, which includes data loading, transformation, and
validation. He created contexts, a data sever, and physical and logical schemas in the
Topology. To start an integration project, John needs to create a new ODI project and import
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

knowledge modules that will be used for development of his project.


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
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
Your Tasks:
1. Create a project, HandsOnLoads, with a folder called HandsOn.

a. In Designer Navigator select Projects tab, click the New Project icon, and then
select New Project.

b. Enter the name of the project: HandsOnLoads. The code is automatically generated.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c. Click the Save button to create the project. The project appears in the tree view.
Expand the HandsOnLoads project node.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
d. ODI creates
l ( l e l FirstFolder. Double-click this folder. In the editing window
daafolderbcalled
thatn
a ie fedit
appears, e rathe folder in the Name field, HandsOn. Click the Save button.
l D tran s
n i e -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2. Import the knowledge modules required for working with the following technologies:
Sources:
Hypersonic SQL
s a
XML
b r ) ha
File
c om e


Targets
Oracle a n as Guid
a. b uc dent
Select the HandsOnLoads project node. Right-click, and then select Import > Import
Knowledge Modules.
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 4
b. The Import Knowledge Modules window appears. Click the button.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
) ha
c. Navigate to C:\Oracle\Middleware\Oracle_ODI1\oracledi\xml-reference,
and then click Open. A list of knowledge modules appears.
b r
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c omthe Ctrl
e key
s
d. Select the following knowledge modules that are used in this project.
naClose.
Use
u i d
for multiple selections. Click OK. In the screen that follows,a
c click
t G
CKM HSQL
m bu uden
CKM Oracle
e r na is St
IKM Oracle Incremental Update @ p th
e
d o us e
IKM SQL Control Append
d a t
LKM File to SQLtrin s e
e l n
LKM SQL n toiOraclelice
a
i e l (d rable
D an nsfe
n i el -tra
Da non

e. Review Import Report, and then close it.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
f. Check the imported knowledge
r i n d modules
e toasbyshown
expanding corresponding nodes under

e t
l ens
HandsOnLoads > Knowledge Modules, here:
i
an le lic
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 7
Close the HandsOnLoads and HandsOn tabs.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6


Chapter 5 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 7
n6a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 1
Practice 7-1: Checking Data Quality in the Model
Use Case Scenario:
John created new ODI Models and reverse-engineered all the tables and files in the models.
Now, John needs to check the quality of data in the models, define the constraints on the
models, and detect possible errors in data.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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, using
SRC_CITY as the parent table.
Next, you create a condition constraint on the SRC_CUSTOMER table: s a
Length(SRC_CUSTOMER.PHONE) > 6
b r ) ha
c om e
Note: Completing this practice is critical for all the following practice sessions.

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

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.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
b. Open the Copy of the HSQL_SRC model p e rename
and t hisit as HSQL Orders Application.
@ e
e us Click Save to save the model. If
For Code, enter HSQL_ORDERS_APPLICATION.
dYes
n a
you get a warning message,dclick ttoofinish saving.
t r i e
n i el icens
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l between the SRC_CUSTOMER and SRC_CITY datastores in
( daconstraint
2. Create a Reference
l l e
the newn ie This
model.
f e ab is on the CITY_ID column.
rreference
a.l D
a
Expand then sHSQL Orders Application model, and expand the SRC_CUSTOMER
e r
ni datastore.
-t a
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
b. Select the Constraints node, right-click, and select the New Reference
a n as Goption.
uid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
e t
l ens
c. From the Table n i
adrop-down liclist, select the SRC_CITY table. The name of the constraint
( d l e
n i el ergenerated.
is automatically
a b Click the Columns tab.
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
s a
also change to CITY_ID.) Click the Save button.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
3. Create a Condition n i
aconstraint lon SRC_CUSTOMER to check that the phone number contains
l ( d l e
six or more
n iecharacters.
f e r ab
a. D a s
Select the Constraints
n node again for SRC_CUSTOMER, right-click, and select the New
e l r a
ni -t
Condition option.
Da non

Enter Phone Number Length in the Name field.


Select Oracle Data Integrator Condition from the Type drop-down list.
Enter the following expression in the Where field:
o LENGTH(SRC_CUSTOMER.PHONE) > 6.
In the Message field, enter A phone number should contain more than 6
characters.
Note: You can also use the Expression Editor icon to graphically edit the
expression.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 6
b. Click the Validation icon to validate your expression syntax.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c m button
oSave to
s
c. On the Oracle Data Integration Information screen, click OK. Click the
i d e
add the condition, and the close the tab.
c a na t Gu
m bu uden
e r na is St
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
4. RunD aa
n sfeon the HSQL Orders Application model.
static check
n i ea.l Select
- t r athenHSQL Orders Application model tab and click Control tab.
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 7
b. Select Knowledge Module CKM HSQL.HandsOnLoads. Click the Save button. Close
the HSQL Orders Application model tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
Check. a n asandGselect
5. Select the HSQL Orders Application model in the tree view, right-click,
uidControl >
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

a. In the Execution dialog box, select Development context and then click OK.

b. Click OK when the Information dialog box notifies you that the session has started.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

6. Click the Operator Navigator icon tab . The Operator window appears. Click s a
the Hierarchical Sessions tab. Expand the All Executions node. Expand the HSQL Orders
b r
Application session. Expand its Steps node. The session should appear complete, ) ha
c om e
containing steps marked with check marks and warnings, as shown here.

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Note: You can optionally review the content of this session and see the different SQL
commands issued to perform the check operations.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 9
7. Review the errors detected in the SRC_CUSTOMER datastore.
a. Click the Designer Navigator tab. In the Designer window, expand the HSQL Orders
Application model, select the SRC_CUSTOMER datastore, right-click, and select
Control > Errors.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
e t
l ens
n i
b. View the tableathat lists the l icerrors detected in your table. You have one join error and
( d l e
n i el phone
seven invalid
r a bnumbers. Each line also contains the content of the invalid record.
D a nsfe
l
a nie on-tra
D n

c. Verify the following:


How many customers have an invalid CITY_ID? (1)
How many customers have invalid phone number? (7)
d. Close these tabs.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7


Chapter 6 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 8
n7a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 1
Practice 8-1: Creating ODI Interface: Simple Transformations
Use Case Scenario:
John created the new ODI models and reverse-engineered all the tables and files in the models,
defined the constraints on the models, and checked data quality. Now, John begins working on
creating ODI Interfaces to pass data between models and perform simple data transformations.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
transformations.
s a
The second interface, INT_8-2, is a duplicate of INT_8-1, to which flow control is activated,
and constraints in the target table are checked. b r ) ha
c om e
The third interface, INT_8-3, loads the TRG_COUNTRY datastore in the Oracle Sales

a n as Guid
Application model with the content of the SRC_CITY table from the HSQL Orders Application
uc dent
model. In this interface, flow control is activated, constraints in the target table are checked,
b
r n am Stu
and city population values are transformed from individual to times 1,000.
Note: Completing this practice is critical for other practice sessions.
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Your Tasks:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 2
1. 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. You must map the columns of the same name without any
transformation. Ensure that you take only distinct records.
a. In Designer, click the Projects tab, and expand the HandsOnLoads project. Expand the
HandsOn folder. Select the Interfaces node, right-click, and select the New Interface
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

option.

s a
b r ) ha
c om e
a n as Guid
b uc dent
b. In the Interface window, enter INT_8-1 as thern amof theStinterface.
name u Ensure that the
e
Optimization Context is Global. Click thepMapping h i
tab.s
d e @ se t
n d a to u
i
ltr ense
i e
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

c. In the Designer Navigator to the left, click the Models tab. In the tree view, expand the
Oracle Sales Application model. Drag the TRG_COUNTRY datastore from the tree
view to the Target Datastore zone (see the following screen: the panel to the right of
the panel with text stating Drag datastores. as sources for this dataset). The
datastore appears in this zone.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
d.l D
Expand the n HSQL Orders Application model and drag the SRC_REGION datastore
i e t r a
n
Da notarget n- panel).
from the model tree to the Sources zone of your diagram (the panel to the left of the
An Automap dialog box appears. Click Yes. Now the system
automatically maps fields in the source and target datastores.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
e. Click the Flow tab. After the flow a d e@ use you may want to use the zoom-out
diagram initializes,
button to see all the objects r i n din the diagram.
e to Click the box for Target + Staging Area that
t
el icens
a n i
is labeled Target (ORACLE_ORCL_LOCAL),
l
and then in the Target Properties panel,
d Rows
l (log.
select the Distinct
b le check box. If open, click the button to minimize the
Messagesi e r a
Your screen now looks as shown here.
D an Confirm
Note: n s f ethat the Distinct Rows check box is selected.
i e l t r a
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l your interface. If the Locking Object window appears,
( dabutton
f. Click thelSave l e
to save
b window next time, and click Yes.
e show
niDont
select e rathis
a
D rans f
e l
ni -t
Da non

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.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n a m tu
e
b. Click OK in the Execution window, and then r
click OKis S the Session Started
when
message appears. p
@ se t h
d e
a to u
i n d
i e ltr ense
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

c. Click the Operator tab to open the ODI Operator Navigator. The Operator window
appears.

Note: In Operator, you may need to click the Refresh button to view the new
session.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 7
d. In the Session List tab, expand the All Executions node. The session called INT_8-1
should appear complete. Expand this session in the tree view as shown:
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i lclick the Mapping tab. In Target datastore
l ( da window,
e. In your interface b l e
nie sferaright-click COUNTRY, and then select Data.
TRG_COUNTRY,
a
i e l D tran
n -
Da non

f. A window appears with the loaded data.


Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n m tab.tIfuthe Unlocking Object
g. Verify your data and close this window. Close INT_8-1
anext
r
window appears, select Dont show this window
e thistime S check box and click Yes.
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n on-
Da3. Create
n 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
ApplicationHSQL 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.
Note: Because this new interface uses the same source as the previous one, you will
duplicate it.
a. Select the Designer tab. If not open, click the Projects tab and select the INT_8.1
interface. Right-click and select Duplicate Selection, and then click Yes in the
confirmation box. A copy of your interface appears.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
@ toseedit it.
b. Double-click the interface Copy ofeINT_8.1
d
d a t o u
i n
i e ltr ense
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

c. In the Name field, change the name to INT_8-2 and then click the Mapping tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
) ha
d. Click the perform layout button to customize the view of the Source zone. In the
Confirmation window, click Yes.
b r
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
e. In the Designer, click the Models
r i n dmodeltab,
e o Target
tand then drag the TRG_REGION datastore from

e t
the Oracle Sales Application
lClick Yes n s to the Datastore zone. Leave the source
i
datastore unchanged.
an le lic e to perform automatic mapping.
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Click the Flow tab. In the diagram, click the box labeled Target
(ORACLE_ORCL_LOCAL). In the Target Properties section, scroll down the IKM
option list to FLOW_CONTROL, and ensure that it is set to true.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
g. Click the Controls tab. Ensure that the selected KM is CKM Oracle. The value for
each Constraint should be true.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
h. Click the Save button to save your interface. am tu
r n is Stable.
4. Run this interface, and check the content of theeTRG_REGION
@ p th
a. Click the Execute button. e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i eb.l Click-tOK
ra in the Execution window, and then click OK when the Session Started
D a n
nomessage appears.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

5. In ODI Operator verify that your new interface executed successfully:

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

a. In the Interface window, click the Mapping tab. Select the TRG_REGION target
datastore (click the name of the datastore), right-click, and select Data. A window
appears with the loaded data.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Verify the data, close this window, and then close your interface INT_8-2.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

6. Create an interface called INT_8-3 that loads the TRG_CITY datastore in the Oracle Sales
Application model with the content of the SRC_CITY table from the HSQL Orders
Application model. Ensure that flow control is activated and all constraints in the target
table are checked. You need to transform the city population values because the target
table unit is thousands of inhabitants, whereas the source table unit is inhabitants.
a. If not open, select the Designer tab, click the Projects tab, and then the Interfaces
node. Right-click and select New Interface.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b. r
In the Interface: NEW window, enter INT_8-3, and then click the Mapping tab.
b ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
c. If not open, click the Models tab. In the tree view, expand the Oracle Sales Application
model. Drag the TRG_CITY datastore from the tree view to the Target Datastore zone.
The datastore appears in this zone.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
a le l
l ( d
a
the
i treefetor thebSources
d. Expandethe HSQLaOrders
nmodel
Application model and drag the SRC_CITY datastore from
zone of your diagram. Click Yes to perform Automatic
l D n s
nie on-tra
Mapping.
D a n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
e. Select the POPULATION column
r i n d inethetotarget datastore.
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

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.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n am inSthetuRDBMS button . Click
g. To verify the expression, click Check the Expression
r
OK. p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n- theProperties,
n h. Click
Da noTarget
Flow tab. Click the box labeled Target (ORACLE_ORCL_LOCAL). In the
scroll down the IKM option list to FLOW_CONTROL, and ensure
that it is set to true.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n- the Controls tab. Ensure that the selected CKM is CKM Oracle. The value for
Da i. noClick
each Constraint should be true. Click the Save button to save your interface. Close
your interface editor tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 21
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
7. Run this interface, and check the content of theeTRG_CITY istable.
p t h
a d e@ interface
a. In the Designer Projects tab, right-click
u se INT_8-3, and then select Execute.
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. Click OK in the Execution window, and then click OK when the Session started
message appears.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 22
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
c. Open the Operator Navigator and verify that your
successfully: r n aminterface
S tusession executed
p e this
Note: In Operator, you may need
a d e@
to
u e
click thesRefresh button .
d
rin nse t o
l t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
D an Navigator, open the Models tab. In the Oracle Sales Application
d.l In thetrDesigner
e
n i n- right-click the TRG_CITY datastore and select the Data option. A window
Da nomodel,
appears with the loaded data. Scroll down and view the total number of loaded records
and loaded data.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Verify the data, and then close this window.


Note: The POPULATION column should show thousands of inhabitants.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8


Chapter 7 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 9
n8a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 1
Practice 9-1: Creating ODI Interface: Complex Transformations
Use Case Scenario:
John created the interfaces to pass data between models and perform simple ELT
transformations. Now John needs to create a more complex interface to load data in the target
model from different sources. He also needs to perform some data transformation and filtering,
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

and provide a date when data was updated.


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.
Note: Completing this practice is critical for all the following practice sessions. s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
Your Tasks:nie ra
a s f e
i e l D Application
1. Create
t r a n called INT_9-1, loading the TRG_CUSTOMER datastore in the Oracle
an interface
n Sales - model.
Da a.noInnODI Designer, click the Projects tab, and then the Interfaces node. Right-click and
select New Interface.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c omto e
b. In the Interface: NEW window, enter INT_9-1, set Optimization Context
Development, and then click the Mapping tab.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
c. In the Designer Navigator, click the Models tab, and then in the tree view expand the
Oracle Sales Application model. Drag the TRG_CUSTOMER datastore from the tree
view to the Target Datastore zone. The datastore appears in this zone.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

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.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
e. In the Design Navigator Models
r i n d tab,eexpand
ttoo the the HSQL Orders Application model and
drag the SRC_CUSTOMER
e t
enIf snecessary, rearrangezone
lmapping. datastore Sources of your diagram. Click Yes
a n i
to perform Automatic
l i c the datastores. Your diagram

i e l (d rable
should resemble the following:

D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

.s
a
f. r
Drag the SALES_PERS_ID column from the SRC_CUSTOMER source datastore onto
b ) ha
two sources. c om e
the ID column of the SRC_SALES_PERSON datastore. A join appears between these

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha

g. Select and drag the CUSTID column from the SRC_CUSTOMERssource comdatastore
i d e to
the CUST_ID column in the TRG_CUSTOMER target datastore.
c a naSelect
t G u CUST_ID
the
bu udepanel
column in the Target Datastore zone. The Mapping Properties
mapping. m
n shows the
e r na is St
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 7
Note: Ensure that the Active Mapping check box is selected for the CUST_ID column of
the target datastore.
h. Select the CUST_NAME column in the Target Datastore zone. The Mapping
Properties panel changes to show an empty mapping.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n on-
Da Note:
n 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 into 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)
Note: Ensure that the Active Mapping check box is selected for the CUST_NAME column
of the target datastore.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

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

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l DDragtthe
r anLAST_NAME column from the SRC_SALES_PERSON source datastore to the
n k.
n -
Da noSALES_PERS column in the target datastore. Click the SALES_PERS column in the
target datastore, and then edit the mapping to have the following mapping expression:
UPPER(TES.LASTNAME). Click the Staging Area option from the Execute on panel.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
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.
Note: Ensure that the Active Mapping check box is selected for the UPD_DATE
column of the target datastore.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a asCRE_DATE
m. Repeat step l for the CRE_DATE column. Because the value of the
nEnsure G
id column
uthe
should not be changed later, deselect the Update check c
box. t that Staging
Area option is selected from the Execute on panel. b u de n
a m t u
p ern this S
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
n. In the diagram, drag the CUSTID column from the SRC_CUSTOMER source to the
workbench (the gray background). A filter appears with the CUST_ID column name.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this < 105. Scroll down and
o. Edit the filter expression to have SRC_CUSTOMER.CUSTID
ensure that the Source option from d @Execute
ethe se on panel is selected.
a
d e to u
t r i n
n i el icens
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

p. Click the Flow tab. Click SrcSet1 (FILE_GENERIC). In the Source Set Properties,
select LKM File to SQL.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
c enpanel,
uProperties
q. In the Flow tab, click the Target datastore. In the Target
b t set the
option DELETE_ALL to the value true as shown
r n a m t udthe Save button to save
next. Click
S
the interface.
p e this
e@ uyouseensure that the table is cleared before
Note: By setting DELETE_ALL to true,
you populate it with new data. ad
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
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.

Note: In ODI Operator Navigator, you may need to click the Refresh icon .

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Return to Designer, click the Mapping tab, and select the TRG_CUSTOMER target
datastore (click the name of the datastore). Right-click and select the Data option. A
window appears with the loaded data.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
d. Close this window, and then close your interface.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 19
Practice 9-2: Creating ODI Interface: Implementing Lookup
Use Case Scenario:
John created an interface to load data in the target model from different sources and perform
data transformation and, filtering, and provided a date when data was updated. Now John
needs to implement a lookup to fetch additional information for the data loading in the target.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Your Tasks:
1. Create an ODI Interface with a new lookup.
a. In the Designer, duplicate interface INT_9-1. Open the copy of INT_9-1 and rename
the interface INT_9-2. Ensure that the Staging Area Different From Target check
box is deselected. Click the Mapping tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. In the Mapping tab, click the button to arrange the datastores in the source pane.
In the Confirmation window, click Yes. Click the Add a new Lookup icon.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 21
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c. In the Lookup Tables Wizard, select the SRC_CUSTOMER table in the m
cothen
Driving Table

pane. In the Lookup Table pane, expand the HSQL_SRC model, s
and
a clickGNext.i d e
select
SRC_AGE_GROUP. For alias, enter LKUP_AGE_RANGE, and a nthen u
c
bu uden t
m
na is St
p e r
e @ e th
d a d o us
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

d. In the screen that follows, select the AGE column in the Source table pane. Select
AGE_MIN in the Lookup pane, and then click the Join button.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 22
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Edit the lookup condition to read:


SRC_CUSTOMER_AGE BETWEEN LKUP_AGE_RANGE.AGE_MIN. Select AGE_MAX in
the Lookup pane, and then click the Join button again.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
f. Edit the Lookup condition tod to
read: SRC_CUSTOMER_AGE
t r i n e
BETWEEN

i e l ens
LKUP_AGE_RANGE.AGE_MIN AND LKUP_AGE_RANGE.AGE_MAX. Click Finish.

( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
g. Click the i
button to arrange
r n d youredatastores
to in the Source pane. In the
l t s
ie clicklicYes.
Confirmation window,
a n enSelect AGE_RANGE in the target datastore, and click
l ( d Editor
the Expression
b l eicon .
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
n
h. In the Expression Editor, iselect
r d theeAGE_RANGE
to column and drag it into the
l t
expression window.eVerify that n s
a n
Click OK to close
i l i
the Expression c e yourEditor.
expression is LKUP_AGE_RANGE.AGE_RANGE.

i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

i. To verify the SQL expression, click the Check the expression in DBMS icon , and
then click OK. Click the Flow tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 27
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

j. In the Flow tab, click the Target area and ensure that IKM Selector is set to IKM Oracle
Incremental Update. Save the interface INT_9-2.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
k.l D nSelectProjects
In the Designer tab, select INT_9-2, and then click the icon to execute your
n i e - t r
interface.a the Simulation check box, and then click OK.
Da non

l. In the Simulation window, scroll down to view the generated code for your lookup, and
then click Close.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 28
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 29
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el viewicthe s
nlookup
2. Run interface INT_9-2 n
a le liand e data.
( d
i
a. Click the
n elExecute
e r b again to run your interface . Click OK. Click OK again.
abutton
a
DNote:rDo nnotf
s select the Simulation check box.
e l a
ni -t
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 30
b. Click the Operator tab and verify that your interface INT_9-2 successfully executed.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
a le- Load l data), and then click the Code tab. View the code on the
(
c. Double-click
l d(SRCSet1
b
nieandsonfethe
source
a ratarget.
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 31
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
d. Switch from the Operator Navigator to the Designer Navigator in the Projects tab, and
open the INT_9-2 interface if it is not still open. Click the interfaces Mapping tab.
Right-click Target Datastore TRG_CUSTOMER, and then select the Data option.
View your lookup data. Close the Data Editor window. Verify that your interface is
saved and the close the tabs.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 32
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 33
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9


Chapter 8 - Page 34
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 10
n9a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 1
Practice 10-1: Creating ODI Interface: Exporting a Flat File to a
Relational Table
Use Case Scenario:
In addition to the group of interfaces created earlier, John needs to create a project and an
interface to export data from a flat file and load this data into a relational table. He also needs to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

verify the quality of data loaded in the table.


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, detailed here:
s a
) ha
1. In Topology Navigator, define the FILE_GENERIC.C:\labs\Files\Flat_files
physical schema.
b r
c om e
2. In Topology Navigator, define the FLAT_FILES_SRC logical schema.
3. In Designer Navigator, create the Export-FF-RT project.
a n as Guid
uc dent
4. In Designer Navigator, create the Flat File1 source model.
b
a. Create the SRC_SALES_PERSON datastore.
r n am Stu
e this
b. Point to the resource: C:\labs\Files\Flat_files\SRC_SALES_PERSON.TXT.
p
a d e@ use
c. Reverse-engineer and format the data (fixed length positions, data types).

r i n d e to
5. In SQL Developer, create the RDBMS schema ODI_STAGE to host the ODI target
datastore. t
el icens
n i
l ( da ble l
6. In SQL Developer, create the TRG_SALES_PERSON table to serve as the ODI datastore for
the target model.
a nie sfera
7. In Topology Navigator, create the ODI target data server, ODI_STAGE; physical schema
i e l D tran
ODI_STAGE; and logical schema ODI_STAGE.
n -
Da non
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.

Your Tasks:
1. Create a new physical schema for the source flat-file model.
a. If not connected, connect to the Work repository, DEV_ODI_REPO. Enter
SUPERVISOR in the User field and SUNOPSIS in the Password field. Click OK to log
in.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucPhysical
b. Click Topology navigator. In Topology navigator, clickbthe e n t
Architecture tab,
d select New Physical
am Sand
select Technologies > File. Right-click FILE_GENERIC,
r n tuthen
Schema.
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. For the Directory (Schema) and Directory (Work Schema) fields, enter the path to the
directory where your input flat files are located (C:\LABS\Files\Flat_files).
Select the Default check box and click Yes in the Confirmation window, and then click

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 3
the Save button. Close the editing window for your new physical schema. On the
Information window that follows, click OK. Close the editing tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Verify that your new Physical schema was added under the FILE_GENERIC data
server in the Technologies tree view.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

e. Open Logical Architecture, navigate to Technologies > File, right-click File, and select
s a
) ha
New Logical Schema.
b r
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Enter the Logical Schema name: FLAT_FILES_SRC, and select the Physical schema
FILE_GENERIC in all three contexts as shown here. Click Save and close the editing
window.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 5
g. Verify that your new Logical schema was added under the File node in the
Technologies tree view.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
2. Create the new project in ODI.
b r ) ha
c om e
a. Open the Designer tab and then click Projects. In the window that opens, click the New
Project button n
and then select New Project to add a new a s
project. ui
d
a
uc dent G
b
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. On the screen that appears, set the Name of the project to Export-FF-RT in the Name
field. The Code field is filled in automatically. Click Save, and then close the tab. The
newly created Export-FF-RT project now appears in the Projects pane.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

3. Create a new model for the flat-file source datastore. s a


a. In ODI Designer, click the Models tab, and then click the New Model
b r ) ha
. Then select
the New Model option to insert a new model.
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
l enter
efollows, nsthe values provided in the following table. Click the
n i
b. On the screen that c e
li the Context to Development. Click the Save icon.
( da tab.
Reverse Engineer
l b l e
Set

a nie sfera
Parameter Value
l D n
a n -tra
nie oName Flat_File_1
D n Technology File

Logical Schema FLAT_FILES_SRC

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

4. Create a new ODI source datastore.


a. Right-click the newly created Flat_File1 model, and then select New Datastore.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 8
b. On the screen that appears, set the Name to SRC_SALES_PERSON. Click the button
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.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n-
Da c.noClick the Files tab. Set the File Format to Fixed, and then click the Columns tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
d. p e button.
On the Columns tab, click the Reverse Engineer t his The following Confirmation
@
de oSetup
screen appears. Click Yes. The Column e
s Wizard appears.
d a u
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
e. b r
Place the cursor, and then click the ruler at the beginning of each column as shown
) ha
c om e
next. The wizard marks each column as shown in the following screens.

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
f. After the columns are marked, r i n d clickeeach
to column data to select a column, and then set
the name and dataie
t
l for each nscolumn in the Definition panel to the right, as shown
in the following n type
ascreens. c e
li the names and data types of each column, refer to this
For
l ( d l e
b you have finished.
nie sfera
table. Click OK when
a
i e l DColumn
t r a n Name Data type
n
Da noC1 n- SALES_PERSON_ID numeric

C2 FIRST_NAME string

C3 LAST_NAME string

C4 DATE_HIRED string

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
g. The columns should look as follows. Click Save to save the model. If the Unlocking
Object window appears, select the check box and click OK. Expand Flat_File_1 >
SRC_SALES_PERSON > Columns and view the newly created columns.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

h. In the Flat_File_1 model, right-click the SRC_SALES_PERSON datastore, and then


select the View Data option. Close all tabs as shown next.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

5. You must create a schema to host the ODI target datastore. To create a new RDBMS
schema for the ODI datastore, perform the following steps:
a. Open the Oracle SQL Developer window .You will create the schema by executing the
following SQL commands:
create user <MY_SCHEMA> identified by <MY_PASS>
default tablespace <MY_TBS> temporary tablespace <MY_TEMP>;
Note: If not started, you need to start SQL Developer and open the Administrator
connection (User Name: system, Password: oracle1). Refer to Practice 2-1.
In this command:
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 15
<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
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

<MY_TEMP> corresponds to the temporary default tablespace: TEMP


To create a user, enter the following command. Verify that user ODI_STAGE is created
successfully.
Note: These commands also are provided in the text file 10-1.txt, which is located
in the C:\LABS\Text folder.

create user ODI_STAGE identified by ODI_STAGE


default tablespace users temporary tablespace temp;

s a
b r ) ha
c om e
a n as Guid
b uc dent
b. Grant connect privileges to the newly createdrn
am Stu the following SQL
user by executing
command: p e this
a d e@ use
grant connect, resource,
r i n d create
e to trigger, create view to
ODI_STAGE; t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

6. Now you need to create a new ODI datastore for the target model. This datastore will be
used within the ODI Interface. To create a new ODI target datastore, perform the following
steps:
a. In SQL Developer create a new connection called ODI_STAGE. Enter the username
as ODI_STAGE with the password ODI_STAGE. For SID enter ORCL. Click Test to
verify the connection. Click the Save button and then click Connect.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om the e
s
b. Create your target table by executing the following SQL commands. Expand
naand verify i d
uthat the table
connection, ODI_STAGE > Tables > TRG_SALES_PERSON,
c a t G
is created successfully.
m bu uden
CREATE table "TRG_SALES_PERSON"(
e r na is St
"SALES_PERSON_ID" NUMBER(8,0) NOTpNULL, th
"FIRST_NAME" VARCHAR2(80), de
@ se
d a t o u
i n
ltr ense
"LAST_NAME" VARCHAR2(80),

i e
"DATE_HIRED" VARCHAR2(80),

d
"DATE_UPDATED"
( anDATEleNOT lic NULL,
i el "TRG_SALES_PERSON_PK"
constraint
n e rab primary key("SALES_PERSON_ID")
)a
D rans f
e l
ni -t
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
b. In the Data Server:ie
t
l window, nsenter the values provided in the following table. Click
n New
c e
the JDBC tab.
l ( da ble li
a nie sfera
Parameter Value
D
el Name r an
n i n - t ODI_STAGE
Da noInstance/dblink (Data Server) ORCL

User ODI_STAGE

Password ODI_STAGE

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
c. Click for JDBC Driver. Select Oracle JDBC Driver.
b ucClickdOK.
e t
nClick for JDBC
Url, select jdbc:oracle:thin:@<host>:<port>:<sid>,
n a m and tu Oracle Database.
then click OK. Edit the Url to
read: jdbc:oracle:thin:@localhost:1521:ORCL r
eUrl field.thThis S
is action may cause problems
for
@
Note: Do not copy and paste in the JDBC p
with entering a valid URL string. de us e
d a t o
l t rin nse
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Expand Oracle technology node, right-click ODI_STAGE data server, and then select
New Physical Schema.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

f. In the Schema (Schema) and Schema (Work Schema) field, enter your ODI_STAGE
schema. Click the Save button. Close the ODI_STAGE.ODI_STAGE physical schema
window. In the Information window, click OK.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 21
g. Open the Logical Architecture tab, expand Technologies > Oracle. Right-click Oracle
technology and then select New Logical Schema.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b
h. Name logical schema ODI_STAGE. In all three contexts,
ucconnect e n t
dSave button
this logical schema
a m
n is S t u
to the ODI_STAGE physical schema as shown
p e r here. Click the and then
close the tabs.
e @ e th
d a d o us
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non
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:
a. Open ODI Designer. Click the Models tab and select New Model. On the screen that
appears, enter the values provided in the following table. Click the Reverse Engineer
tab.

Parameter Value

Name Oracle_RDBMS1

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 22
Technology Oracle

Logical Schema ODI_STAGE


Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
b. On the Reverse Engineer tab, set e
d @Contextseto Development. Click the Save button
the
and then close the Oracle_RDBMS1
d a tab.
t o u
i n
i e ltr ense
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

c. In the Models tab, right-click the Oracle_RDBMS1 model. Select Reverse Engineer. To
verify that the TRG_SALES_PERSON datastore is successfully reversed, expand the
model as shown here.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n on-
Da9. Create
n a new ODI Interface to perform a flat-file-to-RDBMS-table transformation.
a. In ODI Designer, click the Projects tab. Expand your project, Export-FF-RT, and then
expand First Folder. Right-click Interfaces and select New Interface. In the
Optimization Context field, select Development.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. On the screen that follows, enter the interface name as INT-Exp-FF-RT. If selected, s a
deselect the Staging Area Different From Target check box. Click the Mapping tab.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
c. Click the Models tab to drag the source and target to the diagram. Drag the
SRC_SALES_PERSON.txt datastore from the Flat_File1 model into the Sources
container. Drag the TRG_SALES_PERSON datastore from the Oracle_RDBMS1
model into the Target Datastore container. When Designer asks Do you want to
perform an Automatic Mapping? click Yes.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
d.
b r
Set the value for the DATE_UPDATED column in Target Datastore to System date. In ) ha
c om e
Target Datastore, select DATE_UPDATED. In the Implementation tab, enter SYSDATE.
Select Staging Area in the Execute on section. Ensure that the Active Mapping check
box is selected.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Select the FIRST NAME column in Target Datastore and edit the mapping to read:
ltrim(SRC.FIRST_NAME). This function removes left spaces in the FIRST_NAME
column. In the Execute on section, select Staging Area. Click OK. Repeat this step for

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 27
columns LAST NAME and DATE HIRED. Refer to the mapping implementation
provided in the following table.
Column Mapping implementation

FIRST NAME Ltrim(SRC.FIRST_NAME)


Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

LAST NAME Ltrim(SRC.LAST_NAME)

DATE HIRED Ltrim(SRC.DATE_HIRED)

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 28
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 29
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
f. For a nthisieinterface,
s f e rayou export a flat file directly to a relational table target. The
i e l Dknowledge
t r an modules required for this interface are LKM File to SQL and IKM SQL
n -
n the KnowledgeToModules
Da noexpand
Incremental Update. import the KMs, click the Project tab in the left panel and
folder. Right-click Loading (LKM) and select Import
Knowledge Modules.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 30
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
g. In the File import directory field, you should have entered
b uc dent
a m tu
C:\Oracle\Middleware\Oracle_ODI1\oracledi\xml-reference.
n Press and
r
hold the Ctrl key, and then select IKM SQLeIncremental S
s UpdateKMs
iimported and LKM File to SQL.
Click OK. Close the Import Report window. p
@ se View t h
the in the Projects tree
view. d e
a to u
i n d
i e ltr ense
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 31
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 32
h. Click the Flow tab. Click the SrcSet_0 (FILE GENERIC) datastore. The properties for
the source appear in the following screen. For LKM, select LKM File to SQL from the
LKM drop-down list if not selected. Now you need to ensure that the temporary objects
created during the transformation are deleted. Set the LKM option
DELETE_TEMPORARY_OBJECTS to <Default>:true as shown here.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
a le l
l ( d
i. Click the ab Set Select
nie sfetorFalse.
Target datastore. IKM SQL Incremental Update. Set the IKM option
a
Flow_Control the IKM option DELETE_ALL to True. Click Save.
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 33
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
n
j. To test
a ieyour interface,
f e ra click the Execute button . The following screen appears.
s
l DRetaintrathendefaults and click OK. On the next screen, click OK.
n i e -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 34
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.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n-the targetStep
n Double-click
Da l. nointo 12 and click the Execution tab. View the number of rows inserted
table (16).

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 35
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
10. Use the Quick Edit feature to enable filtering rows with Sales_Person_ID >o30. mIn addition,
cother

you capitalize the first letter of each last name and first name, leavingsthe i d e
characters
in lowercase.
c a na t Gu
a. In the INT-EXP-FF-RT tab, select Quick-Edit tab, expand
m bu Filters
d e n and then click
section,
Add Filters icon.
e r na is Stu
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 36
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Select SALES_PERSON_ID row, and then click Expression Editor icon . In the left s a
panel of Expression Editor, double-click SALES_PERSON_ID. Edit the expression to
b r ) ha
read: SRC.SALES_PERSON_ID > 30. Click OK. For Execution Location, select
Staging. Click OK. c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 37
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Scroll down and expand the Mappings section. In Mappings, click the
Ltrim(First_name) column , and then select the Expression Editor icon. In functions,
expand Strings, and then double-click the INITCAP function. Edit the expression to
read: INITCAP(Ltrim(SRC.FIRST_NAME)). Click OK.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 38
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Repeat the previous step for the column LAST_NAME. Your result is shown in the
following screen. Click the Mapping tab and save your interface .

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 39
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

11. Execute your modified interface and verify the result.

a. In Designer execute your interface . Click OK. Click OK again

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
b. Open ODI Operator and verify
r i n d that ethetointerface executed successfully. Open step 8
t
enand
Integration. Click the lCode
e tab, s view your modifications.
i
an le lic
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 40
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 41
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
c. Click the INT_EXP_FF_RT r i n d e tMapping
tab. In the
o tab, right-click the target datastore and
l
e ice
select Data. View ithe
t
filtered n
rows
s (SALES_PERSON_ID > 30) inserted in the table.
a n
d Editor
Close your Data l
l ( b l eand the tabs.
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 42
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 43
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10


Chapter 9 - Page 44
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 11
n10a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 1
Practice 11-1: Using Native Sequences with ODI Interface
Use Case Scenario:
John created interfaces to load data in the target model from different sources and performed
data transformation, filtering, and implemented lookups. Now John needs to create an interface
that would load data in the table by using Oracle native sequence, which generates ID numbers
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

for the target table.


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
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
Note: Completing this practice r i isdcriticaleforto
n all the following practice sessions.
l t n s
Your Tasks:
a n ie lice
( d ODI
1. Create and execute
l an
b l eprocedure that creates an Oracle native sequence.
a. If not
a ie feraconnect to the DEV_ODI_REPO work repository (User:
nconnected,
e l D rans Password: SUNOPSIS). Click the Designer tab.
SUPERVISOR,
ni -t
Da non

b. In the Projects tab, expand: HandsOnLoads > HandsOn. Right-click Procedures and
select New Procedure. Name the new procedure: Create_ORCL_SEQ_FAM_ID. Set
the Target technology to Oracle, as shown next. Click the Details tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
a select l
l (
c. In the Details dtab, l e
b In the Command
the Add command button . In the Name field, enter:
n i e ORCLerSEQ.
a on target tab, set the Technology field to
a
Create
D s f
n i el Oracle.
- t r anIn thepanel,
Schema drop-down list, select ORACLE_ORCL_LOCAL_SALES. In

Da non
the Command enter the command, which creates the following sequence. Click

the Save icon to save the procedure. Close the tab. .


Note: This command is provided in the text file 11-1.txt in the following location:
c:\LABS\Text.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 3
d. Run the procedure Create_ORCL_SEQ_FAM_ID and verify the result of the execution
in Operator.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

e. Open SQL Developer and expand: Administrator > Other Users > SALES_DEV >
Sequences. Verify that your sequence SEQ_FAMILY_ID was created in RDBMS. a
s
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

2. Create a new Native Sequence in ODI.


a. Open Designer. Click the Projects tab and expand: HandsOnLoads > HandsOn . Right-
click Sequences, and then select New Sequence.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c omcheckebox. In
a n as Guid
b. Name the new sequence SEQ_FAMILY_ID. Select the Native Sequence
the schema filed, select ORACLE_ORCL_LOCAL_SALES.
b ucand dthen
window that follows, select the DEVELOPMENT context,
Click
e
thet
nselect
icon. In the
the native
a m t u
the sequence, and then close the tab. pe
rn ishould
sequence SEQ_FAMILY_ID. Click OK. Your screen
s S look as shown next. Save
e @ e th
d a d o us
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

3. Create a new interface to load the Product Family table by using the Native Sequence.
a. Right-click Interfaces, and select New Interface. Enter the new interface name:
INT_11-1. In the Optimization Context field, select Development. Click the Mapping
tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
b. In the Models tab, expand the HSQL_SRC model and Oracle Sales
a n asto Application
G uid area
model.
Drag the SRC_PRODUCT datastore from the HSQL_SRC
your interface. Drag the TRG_PROD_FAMILY datastore b ucfromdtheenOracle
model t Sales in
the source

r am
Application model to the target area. Click Yesnto tu
perform automatic
S mapping.
p e t his
@
de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

c. In the Target Datastore area, select FAMILY_ID, and then click the Expression Editor
icon . Expand the Project Sequences node, and then drag the sequence
SEQ_FAMILY_ID to the expression area. Click OK. Click the Flow tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
d. In the Flow tab, clicke t
datastore,
lTarget ns and then set IKM Selector to IKM SQL Control
n i
Append. In theaOptions, set c e
li FLOW_CONTOL to false, and set DELETE_ALL to true.
l
Select the ( d Rows
Distinct l e
b Fix. Thisbox.
check Save your interface. When the Fix Issue Dialog
n
windowi eappears,
e r a
select option enables not checking the FAMILY_ID column
D anot null.s f
n i el -tran
for

Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 11
4. Execute the newly created interface and verify the data in the target table.
a. Execute Interface INT_11-1 as shown next, and then verify execution in the Operator
tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n am the
b. In the INT_11-1 tab, select the Mapping tab,rright-click S u Datastore
tTarget
TRG_PROD_FAMILY, and then select Data.
e
p Verifyththeis data inserted in the table. Close
@
de tab. e
the Data Editor window and INT_11-1
d a t o us
l t rin nse
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 14
Practice 11-2: Using Temporary Indexes
Use Case Scenario:
John created interfaces to load data in the target model from different sources and performed
data transformation. He also created an interface, which loads data in the table by using Oracle
native sequence, which generates ID numbers for the target table.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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
datastore table in the Oracle Sales Application model. You specify the source tables as
s a
SRC_PRODUCT from the HSQL_SRC model, and TRG_PROD_FAMILY from the Oracle Sales
Application model. b r ) ha
c om e
TRG_PROD_FAMILY will be used as a lookup table to obtain the ID number generated by the

a n as Guid
previous lessons interface that used a sequence to populate the ID number.
uc dent
For the lookup, you create a temporary index to join SRC_PRODUCT and TRG_PROD_FAMILY on
b
their FAMILY_NAME column.
n m tu
aand
e r
Finally, you execute the interface, view the source code, s S the inserted rows in the
examine
i
TRG_PRODUCT target datastore. p
@ se t h
d e
a to u
i n d
i e ltr ense
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D 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.
a. Expand the project HandsOnLoads > HandsOn > Interfaces. Right-click Interfaces and
select New Interface. Name this interface INT_11-2. Click the Mapping tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 15
b. In the Models tab expand the Oracle Sales Application and HSQL_SRC models. Drag
the TRG_PRODUCT datastore from the Oracle Sales Application model to the target
area. Drag the TRG_PROD_FAMILY datastore from the Oracle Sales Application to
the Source mapping area. Click Yes to perform automatic mapping. Drag the
SRC_PRODUCT datastore from the HSQL_SRC model to the source mapping area,
as shown next. Click Yes to perform automatic mapping
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n-
Da c.noCreate a join between the two source tables by dragging FAMILY_NAME in the
TRG_PROD_FAMILY datastore to FAMILY_NAME in the SRC_PRODUCT datastore,
as shown in the following screen.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
d. Click the Join and scroll down to view the Join Property inspector. In the Temporary
Indexes section, set the index on SRC_PRODUCT(SRC_PRODUCT) to Non-Unique.
Click the Flow tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Click the Flow tab. In the flow tab, click the target datastore. Verify that the
DELETE_ALL parameter is set to false. Save your interface.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

2. Execute the Interface and verify the results.


a. In the Projects tab, execute your interface INT_11-2 as shown in the following screen.
Click OK. Click OK again.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. Open ODI Operator, and verify that your interface executed successfully. Expand the
session to view steps as shown in the following screen.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l
a step lIntegration
(
c. Double-click
l dthe b e INT_11-2 Create Temp. Indexes on Work. In the

a nie sfera
Session Task, select the Code tab. View the source code.

i e l D tran
n -
Da non

d. Scroll down, and then double-click the step Integration INT_11-2 Insert new rows,
as shown in the screen. View the number of inserted rows.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 21
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 22
e. Open the Designer tab. In the Interface INT_11-2 tab, select the Mapping tab. Right-
click the target datastore, and then select Data to view inserted rows. Close Data
Editor window and the tabs.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 23
Practice 11-3: Using Data Sets with ODI Interface
Use Case Scenario:
John created an interface to load data in the target model from different sources and perform
data transformation and filtering, and provided a date when data was updated. He also
implemented a lookup to fetch additional information for the data loading in the target. Now John
creates an interface with multiple data sets to add in a bulk feed of customer data from another
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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.
Now you create a new data set, naming it BULK_CUST_DATA. For its source, you specify the
s a
TRG_BULK_CUSTOMER datastore from the Oracle Sales Application model.
b r
You specify the UNION operator to unite this new source of data with the default data set that
) ha
you specified in INT_9-2.
c om e
n as Guid
Next, you perform an execution simulation to preview the code that will be used for this new
a
data set with the UNION operator.
b uc dent
r n am Stu
Finally, you execute the interface and verify the rows inserted into the target table.
.
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Note: Completing this practice is critical for all the following practice sessions.
Your Tasks:
1. Create an ODI interface with multiple data sets.
a. In the Designer, right-click interface INT_9-2 and then duplicate it. Open the duplicate
interface and rename it INT_11-3.Open the Mapping tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. To arrange tables, click the Perform Layout icon , and then click Yes. Click the
Add/Remove DataSet icon , and then click Add new DataSet .

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l BULK_CUST_DATA. Select Operator: UNION. Close the
(
c. Enter the new
l dadata bsetlename:
a nie Configuration
DataSets
f e ra window.
e l D rans
ni -t
Da non

d. In the Mapping tab, select the BULK_CUST_DATA data set tab. In the Models tab,
drag the TRG_BULK_CUSTOMER datastore from the Oracle Sales Application to the
Source area of the interface. Click Yes to perform automatic mapping.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Open the Flow tab and verify the flow of your interface. Click the Target datastore.
Ensure that the FLOW_CONTROL option is set to true and the DELETE_ALL option is
set to true, as shown in the following.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 27
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
f. Open the Mapping tab
e t
l eselect
again,
n s BULK_CUST_DATA tab, and then save interface
INT_11-3. i
an le lic
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 28
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
ean execution
nidown
g. Perform
e ra simulation in the Development context. In the Simulation window,
a s f
D ran view the simulated code for the data set TRG_BULK_CUSTOMER
scroll and
e l
a ni owith
n -tthe UNION operator as shown next.
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 29
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 30
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
2. Execute interface INT_11-3
e t
l and verify nsthe execution results.
n i li c e
l ( da INT_11-3.
a. Execute interface
b l e
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 31
b. Open the Operator. Verify that the session INT_11-3 executed successfully. Scroll
down and open the task Integration INT_11-3- Insert new rows. Verify the number
of inserts in the target table.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 32
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 33
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11


Chapter 10 - Page 34
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 12
n11a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 1
Practice 12-1: Using Temporary ODI Interfaces
Use Case Scenario:
John created interfaces to load data in the target models from different sources and performed
data transformation and filtering, and implemented a lookup to fetch additional information for
the data loading in the target. John also created an interface with multiple data sets to add in a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

bulk feed of customer data from another system.


Now John needs to create a temporary interface, which is used for loading data to a sales target
datastore.
Background:
In this practice, you perform the following steps:
1. Create a temporary interface, INT_12-1.
Use datastores SRC_ORDERS and SRC_ORDER_LINES from the HSQL_SRC model,
joined on ORDER_ID.
s a
) ha
Use SRC_CUSTOMER as a lookup table.
Create a temporary target table, TEMP_AGG_ORDERS. b r
Aggregate some of its columns by using the MIN, MAX, and AVGc m
ofunctions.
a
s uide
2. Create interface INT_12-1-2 n
b
Use the temporary interface INT_12-1 as a source.uca dent G
n
Use the datastore TRG_SALES as the target.
r am Stu
3. Execute INT_12-1-2 and examine the p
e thisinto TRG_SALES.
rows inserted
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Your Tasks:
1. Develop an ODI Temporary interface.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 2
a. If not connected, connect to the DEV_ODI_REPO work repository (User:
SUPERVISOR, Password: SUNOPSIS). Click the Designer tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. In the Projects tab, expand: HandsOnLoads > HandsOn. Right-click Interfaces, and
then select New Interface. Name the new interface INT_12-1. In the Optimization
Context field, select Development. For Staging Area, select Hypersonic SQL:
HSQL_DEMO_SRC. Click the Mapping tab.
s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Open the Models tab. Expand the HSQL_SRC model, and drag SRC_ORDERS and
SRC_ORDER_LINES datastores from the model to the Source area.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Drag the ORDER_ID column from the datastore SRC_ORDERS to the datastore
SRC_ORDER_LINES to create a Join.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Click the Lookup icon to start the Lookup Wizard . Ensure that your Driving table is
SRC_ORDERS. Select the Lookup table, SRC_CUSTOMER, in the HSQL_SRC
model. For the Lookup table, edit the Alias to read: LKUP_SRC_CUSTOMER as
shown in the following screen. Click Next.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
ens
elcolumn
a n
f. Select the CUST_ID i l i c in the Source table and the CUSTID column in the Lookup
l (d rinathe
table, as shown
i e blescreen, and then click Join. Click Finish.
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
g. Now you needatoncreate c ens target datastore. Drag the column CUST_ID from
iel alitemporary
l (d abtable
the SRC_ORDERS
e le to the Target area. Click <Temporary Target DataStore>. In
the n i r Properties, enter Name: TEMP_AGG_ORDERS, as shown in
TemporaryeTarget
afollowing f
D s
n i el -tran
the screen.

Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
h. Drag the column ORDER_ID from SRC_ORDERS p e thtoisthe Target area. Edit the mapping
to read: MIN(SRC_ORDERS.ORDER_ID).
a d e@ uScroll
se down to the Target Column
Properties section and rename
r i n d thisecolumn
to to FIRST_ORDER_ID. Click the interface
t
el icens
tab and view the result.
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

i. Again, drag the column Order_ID from SRC_ORDERS to the Target area. Edit the
mapping to read MAX(SRC_ORDERS.ORDER_ID). Scroll down and rename this column
LAST_ORDER_ID.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
j. Drag the column ORDER_DATE from SRC_ORDERS to the Target area. Edit the
mapping to read MIN(SRC_ORDERS. ORDER_DATE). Scroll down and rename this
column FIRST_ORDER_DATE.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
k. Similarly, drag the column ORDER_DATE again from SRC_ORDERS to the Target
area. Edit the mapping to read MAX(SRC_ORDERS. ORDER_DATE). Scroll down and
rename this column LAST_ORDER_DATE.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
l. In the Source area, expand the lookup datastore. Drag the FIRST_NAME column from
the lookup table to the Target area. In the Target area, click the FIRST_NAME column.
Start the Expression editor , and then drag the LAST_NAME column from the left
panel of the Expression Editor to the expression" area.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i d e to
m. Edit the expression to readnLK_UP_SRC_CUSTOMER.FIRST_NAME | | ||
t
el icens as shown next. Click OK. Click the button
n i
LK_UP_SRC_CUSTOMER.LAST_NAME,
l
l ( daexpression.
to validate the
b l e
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

n. Scroll down, and in the Target Column Properties, rename this column CUST_NAME.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l
o. Drag the l ( da QTY
column b l e
from the SRC_ORDER_LINES source datastore to the Target
n i e r a
a Editnthe
area.
D s femapping expression to read SUM(SRC_ORDER_LINES.QTY).
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a niearea.
p. Drag the
Target
columnra
s f e
Edit
AMOUNT from the SRC_ORDER_LINES source datastore to the
the mapping expression to read AVG(SRC_ORDER_LINES.AMOUNT).
l D n
a Column Properties, rename this column AVG_AMOUNT.
a nie oInnthe
-trTarget
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
q. Drag
a ie thefecolumn
again
nTarget ra AMOUNT from the SRC_ORDER_LINES source datastore to
l the s
D ran Edit the mapping expression to read
area.
e
ni SUM(SRC_ORDER_LINES.AMOUNT).
-t Rename this column SUM_AMOUNT.
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a ie column
r. Drag the
nTarget f e raPRODUCT_ID from the SRC_ORDER_LINES source datastore to
l D tran
the s
area.
n i e -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
e datastore,
s. In the iTarget
n Staging e ra Repeat
click the SUM_AMOUNT column. In the Execute on section,
D a
select
n s f Area. this step for all the other columns that have a function in
i l
e Target
mapping
t r a expression. Refer to the following table to verify the execution location. Your
n -
Da non datastore should now look as shown in the screen. Click the Flow tab.
Column Execution Location

SUM_AMOUNT Staging Area

AVG_AMOUNT Staging Area

CUST_ID Source

CUST_NAME Source

FIRST_ORDER_DATE Staging Area

FIRST_ORDER_ID Staging Area

LAST_ORDER_DATE Staging Area

LAST_ORDER_ID Staging Area

PRODUCT_ID Source

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 21
QTY Staging Area
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

t. Verify the flow, and then save your temporary interface. Verify that your temporary
interface appeared in the tree view. Close your interface tab.
Note the color of your newly created temporary interface in the objects tree view.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 22
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
2. Create a new interface, which uses the newly created temporary interface as a source.
a. In the HandsOnLoads project, start creating a new ODI interface, INT_12-1-2, as
shown next. In the Optimization Context field, select Development. Open the Mapping
tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b. r
Drag the temporary interface, INT_12-1, from the Projects tab to the Source area.
b ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Drag the datastore TRG_SALES from the Oracle Sales Application model to the
Target Datastore area. Click Yes to perform automatic mapping.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
d. r
In the Target Datastore, select the FIRST_ORD_DATE column. Drag the
b ) ha
Implementation tab in the Mapping Properties area. c om e
FIRST_ORDER_DATE column from the temporary interface in the source area to the

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a niethesprevious
e. Repeat
f e ra step to map columns FIRST_ORDER_ID, LAST_ORDER_ID, and
e l D ran
LAST_ORDER_DATE to the corresponding columns in the temporary interface in the
ni Source
n-t area. Mapcolumn
AMOUNT to SUM_AMOUNT, PROD_AVG_PRICE to the
Da noAVG_AMOUNT in the temporary interface, as shown below.

f. In the Source panel, click INT_12-1 (TEMP_AGG_ORDERS), scroll down to the


Source Properties section, and then select the Use Temporary Interface as Derived
Table (Sub-Select) check box.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

g. To view data derived from the temporary interface, right-click the temporary interface
and select Data. Close the Data Editor window.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 27
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

h. Select the Flow tab, click Target datastore, and verify the flow of your interface. In the
Target Properties, set the DELETE_ALL option to true. Save the interface, and then
close the interface tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 28
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
3.nie
l D trainterface
Execute-the
n INT_12-1-2 and verify the execution results.
n the interface
Da a.noExecute INT_12-1-2.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 29
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b u-cINT_12-1-2
b. Open ODI Operator Navigator and verify that the interface
successfully. Scroll down and open the task Integration d n t
INT_12-1-2 executed
e Insert new
-
a m t u
ern this S
rows. Verify the number of inserts.
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 30
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. In the Models tab in the Oracle Sales Application model, right-click the TRG_SALES
datastore, and select View Data. View the rows inserted in the target datastore.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 31
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 32
Practice 12-2: Developing a New Knowledge Module
Use Case Scenario:
To develop the integration project, John created the ODI project and the interface to export data
from a flat file and load this data into a relational table. Now he decides to modify the existing
KM to create an audit table each time the interface runs.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Background:
After the interface is created and tested, you may need to create a new knowledge module to
use with the interface.
In this practice, you duplicate an existing knowledge module, IKM SQL Incremental Update,
naming the new knowledge module IKM Oracle UI - Audit. You add two commands to the
knowledge module, Create Audit Table and Insert Audit Records, using command syntax
provided in text files.
Next, you duplicate an existing interface, INT-Exp-FF-RT, naming the new interface INT-EXP-
FF-RT. You change the new interfaces IKM selection to use the new knowledge module you
s a
) ha
just created, IKM Oracle UI - Audit.
b r
Finally, you execute interface INT-EXP-FF-RT and examine the audit records inserted into the

audit table created by your knowledge module.
c om e
a n as Guid
Duplicate the knowledge module, IKM SQL Incremental Update, naming the new KM IKM
Oracle UI Audit. You insert into the KM two new commands: Create Audit Table
and Insert Audit Records. b uc dent
r n am Stu
Duplicate the interface INT-EXP-FF-RT, naming the new interface INT-EXP-FF-RT-Audit.
p e this
You change the interfaces IKM entry to use your new KM: IKM Oracle UI Audit.

a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l 2
1 nie era
D a nsf
l
a nie on-tra
D n

Your Tasks:
1. Create the new knowledge module with new functionality to create an audit table and insert
audit records.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 33
a. If not connected, connect to the DEV_ODI_REPO work repository (User:
SUPERVISOR, Password: SUNOPSIS). Click the Designer tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e>
Knowledge Modules > Integration (IKM). Right-click IKM SQL a n as GuUpdate
b. Open ODI Designer and click the Projects tab. Select Projects > Export-FF-RT
Incremental
id and
uc Yes.
select Duplicate Selection. In the window that follows, click
b e n t
r n am Stud
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 34
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c. Double-click Copy IKM SQL Incremental Update to edit it. Rename this KM IKM
Oracle UI Audit. Click the Details tab.
Note: If the message for Object Locking/Unlocking is displayed, click OK.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Click the Details tab. On the Details screen, review the commands in the current KM.
Select Insert new rows and then click the Add icon to add the new command.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 35
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
e. b r
In the Command New window, name this command Create Audit Table. Select
) ha
c om e
the Ignore Errors check box. Set the Technology on Target to Oracle. Enter the

a n as Guid
following command to create the audit table. Verify that the check boxes in the
uc dent
Journalizing section are not selected. If necessary, deselect them.
b
location: c:\Labs\Text. r n am Stu
Note: You can find this command in the file 12-2.txt, provided in the following

p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 36
create table <%=odiRef.getTable("L", "TARG_NAME", "A")%>_H
(
<%=odiRef.getColList("", "[COL_NAME]\t[DEST_CRE_DT]NULL",
",\n\t", "", "PK")%>,
AUDIT_DATE DATE,
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

AUDIT_INDICATOR VARCHAR2(1)
)

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
f. Click the Details tab. Scroll down and select the Create Audit Table command.
Click the icon several times to move the command up and place it right after the
Insert new rows step, as shown below. Select the Ignore Errors check box, as shown
in the following below. Click the Add icon again .

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 37
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Similarly, create the command that inserts audit records in the audit table, as shown in
the screen. Name this command Insert Audit Records. Select the Ignore Errors
check box. Set the Technology on Target to Oracle. Enter the command provided
below.
Note: You can find this command in the file 12-2.txt, provided in the following
location: c:\Labs\Text.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 38
Insert into <%=odiRef.getTable("L", "TARG_NAME", "A")%>_H
(
<%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "", "PK")%>,
AUDIT_DATE,
AUDIT_INDICATOR
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

)
select <%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "",
"PK")%>,
sysdate,
IND_UPDATE
from <%=odiRef.getTable("L","INT_NAME","W")%>

Note: In these substitution methods, you use the following parameters: s a


GetTable:
b r ) ha
om e
L: Local naming convention. For example, in Oracle that would be
c
nas schema uitod use (the
schema.table (versus R for remote: schema.table@server).
a
A: Automatic. It enables ODI to determine whichcphysical
u dent G
Data schema [D] or the Staging schema [W]).b
getColList: r n am Stu

e thithe
Notice the PK parameter. If it ispused, only
s columns that are part of the
primary key are included.de
@ e
d a t o us
l t rin nse
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 39
`
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
g.l D
e Click the anDetails tab. Scroll down and select the Insert Audit Records command.
n i - t r
n the icon several times to move the command up and place it right after the
Da noClick
Create Audit Table step, as shown in the next screen. Click Save, and then close
the tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 40
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
h. Verify that your new knowledge module, IKMr n amUI SAudit,
Oracle
tu appeared in the
Knowledge Modules tree. p e t his
@
de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

2. Modify the interface INT-EXP-FF-RT to be executed with your newly created knowledge
module. You will need to duplicate the existing interface, rename it, and then change the
IKM entry to use IKM Oracle UI-Audit.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 41
a. On the Projects tab, right-click the interface INT-EXP-FF-RT and select Duplicate. Click
Yes on the Confirmation screen.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. Double-click the interface Copy of INT-Exp-FF-RT. Change the name of the interface
to INT-Exp-FF-RT-Audit, as shown in the screen. Click the Flow tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 42
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
c. On the Flow tab, click Target (ODI_STAGE)-Target + Staging Area to open the IKM
b r
Selection section. Select IKM Oracle UI Audit. Ensure that in the IKM Selection
) ha
c om e
section, FLOW_CONTROL and STATIC_CONTROL options are set to false, as shown

a n as Guid
in the screen. Click the Save button, and then close the tab.

b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 43
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l select the interface and click the Execute button
a new linterface,
To execute
l ( dyour e .
a ie Click
nOK.
Click
f e rabto save your interface. Click OK again to start the execution.
Yes

e l D rans
ni -t
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 44
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
d. Click the Operator tab to open ODI Operator. Click to open the
a n aAllsExecutions
G uid node. If
necessary, click the Refresh icon uc dsession,
, find your newbinterface e nt and view the
session steps.
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Scroll down and double-click the Create Audit Table step. View the content of the
Definition and Code tabs for this step. Close the tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 45
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Similarly, view the Insert Audit Records step information. Refer to the following
screens. Click Cancel.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 46
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 47
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

g. Open the Oracle SQL developer and expand the ODI_STAGE connection (for the
s a
) ha
password, enter ODI_STAGE). Select Tables node and if necessary click the Refresh
button b r
. Doubleclick the Audit table TRG_SALES_H, click Data tab, and verify
c om e
that your Audit table was created and populated with audit records, as shown next.

a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

3. In addition, you create an option for your new knowledge module to make your KM more
user-friendly. This option will enable an end user to choose when to generate audits.
a. In Designer, click the Projects tab, right-click IKM Oracle UI Audit, and select New
Option. Name this option AUDIT_CHANGES, set Type to Check Box, and Default
Value to true. Click Save and close the AUDIT_CHANGES option tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 48
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
b. Now you need to link this option
r i n d to eyourtosteps in KM. Double-click IKM Oracle UI -
e t
l and click
Audit, and click the Details tab.
n sthe Options.your new step, Create Audit Table, to edit
Double-click
i
an le lic
it, and then scroll down e
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 49
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n- the Always Execute check box. Select AUDIT_CHANGES. This will condition
Da c.noDeselect
the execution of these steps with the value set by the end user. Click Save. Click the
Details tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 50
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
d. Repeat the previous step for
r i n dthe Insert
e toAudit Records command, as shown in the
t
el Save
following screens. Click
ns your KM and close the tab.
to save
n i c e
l ( da ble li
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 51
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
n
e. Double-click INT-Exp-FF-RT-Audit
r i d eto editto it. Click the Flow tab, click Target
t
el ithat
(ODI_STAGE), and verify thesoption AUDIT_CHANGES is set to true.
n
a n i l c e
Execute thed interface e .
e l ( a b l
i
an nsfer
D
el -tra
n i
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 52
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l
(
f. If not opened,
l daopenbODI l e Operator, select All Executions, and then click the Refresh
buttoni e
and
n steps view
e r a
the execution results. Both Create Audit Table and Insert Audit
a s f
i e l D tran
Records should be present.
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 53
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b u c entot false. Save your
g. In Designer, edit the interface to set the option AUDIT_CHANGES
interface and then execute your interface again m
r n a . Stud
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 54
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 55
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n - Operator, click the Refresh button and view the execution results. The new KM
nODI
Da h.noInsteps to create and populate an audit table are not executed.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 56
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 57
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12


Chapter 11 - Page 58
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 13
n12a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 1
Practice 13-1: Creating an ODI Procedure
Use Case Scenario:
John created the new ODI project and an interface to perform the transformations described in
the previous practices. Now he needs to modify his project by adding an ODI procedure to
create a relational table and populate it with data.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Background:
A common task that is performed by using ODI is to create and populate a relational table. This
practice walks you through the steps that are needed to create a project and a procedure that
will create and populate a relational table with data. You also execute the procedure and verify
the execution within ODI Operator.
In this practice, you use the same RDBMS schema, ODI dataserver, and ODI physical schema
all named ODI_STAGEwhich you created in Practice 10-1. In the predefined project,
Procedure-CRT-TBL, you create the procedure PRD-create-populate-table.
Next, you add commands to drop, create, and populate a table, using the syntax provided in text s a
files.
b r
Finally, you execute the procedure and verify that the table was created and populated with
) ha
records.
c om e
1. Create the project Procedure-CRT-TBL.
a n as Guid
2. Create the procedure PRD-create-populate-table.
b uc dent
r n am Stu
3. Add commands to drop, create, and populate a table.
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Your Tasks:
1. Create new project in ODI Designer.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 2
a. Switch to the Designer Navigator. Click the Designer tab. Select the Projects tab, click
the New Project icon, and select New Project.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Enter the name of the project: Procedure-CRT-TBL. Click the Save button to create the
project and close the tab. The project appears in the tree view. Expand the Procedure-
CRT-TBL project node.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D In that
Note:
t r a n
this practice, you use the same RDBMS schema, ODI data server, and physical
n on-
schema you created in Practice10-1. If you have not performed Practice 10-1,
Da complete
n Practice 10-1, steps 5 and 7 to create the RDBMS schema, the ODI source data
server, and the physical schema for your new RDBMS model.
c. Open the ODI Topology Navigator, select Physical Architecture. Expand Technologies
> Oracle > ODI _STAGE. Verify that you have the physical schema ODI_STAGE
created under ODI_STAGE data server.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
d. Open ODI Designer. In the Projects tab,p e Procedure-CRT-TBL
select
this > First Folder.
Right-click Procedures and select e @
d o us
New e
Procedure.
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
n
Da e.noEnter the procedure name as PRD-create-populate-table. Set Target Technology to
Oracle. Click the Details tab. Click the icon to add a step in the procedure.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

f. In the Command: New window, enter the parameters of the procedure and the
command on the target provided in the following table. You need this command to drop
the table in case a table with this name exists. Select the Ignore Errors check box.
s a
Parameter Value
b r ) ha
Name Drop table
c om e
Technology Oracle a n as Guid
b uc dent
Schema ODI_STAGE
r n am Stu
Ignore Errors Checked p e this
a d
DROP table ODI_STAGE.SRC_SALES_PERSON
e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

g. Select the Details tab, and then click the icon to add another step in the
procedure. In the Command: New screen, if not selected, click the Command on
Target tab. Enter the parameters of the procedure and the command provided below.
Note: You can copy this command from the 13-1.txt file, which is provided in your
Lab folder in the following location: c:\Labs\Text.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 5
Parameter Value

Name Create Table

Technology Oracle

Schema ODI_STAGE
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Ignore Errors Unchecked

CREATE table "SRC_SALES_PERSON" (


"SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
"FIRST_NAME" VARCHAR2(80),
"LAST_NAME" VARCHAR2(80),
"DATE_HIRED" VARCHAR2(80),
"DATE_UPDATED" DATE NOT NULL, s a
constraint "SRC_SALES_PERSON_PK" primary key("SALES_PERSON_ID")
b r ) ha
)
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n-
Da h.noClick the Details tab. Click the icon to enter the step to populate the
SRC_SALES_PERSON table.

i. In the Command: New screen, click the Command on Target tab. Enter the
parameters and the command shown below. Click the Details tab to view your steps.
Note: You can copy this command from the file 13-1.txt, which is provided at the
following location: c:\Labs\ Text.

Parameter Value

Name Populate table

Technology Oracle

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 6
Schema ODI_STAGE

Ignore Errors Unchecked


Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 7
begin
insert into ODI_STAGE.SRC_SALES_PERSON values
(11,'Andrew','Andersen','22/02/1999',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values
(12,'John','Galagers','20/04/2000',sysdate);
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

insert into ODI_STAGE.SRC_SALES_PERSON values


(13,'Jeffrey','Jeferson','32422',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values
(20,'Jennie','Daumesnil','28/02/1988',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values
(21,'Steve','Barrot','24/09/1992',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values
(22,'Mary','Carlin','14/03/1995',sysdate);
s a
insert into ODI_STAGE.SRC_SALES_PERSON values
b r ) ha
om e
(30,'Paul','Moore','36467',sysdate);
c
as Guid
insert into ODI_STAGE.SRC_SALES_PERSON values
(31,'Paul','Edwood','18/03/2003',sysdate); a n
insert into ODI_STAGE.SRC_SALES_PERSON values b uc dent
(32,'Megan','Keegan','29/05/2001',sysdate);
r n am Stu
p e this
insert into ODI_STAGE.SRC_SALES_PERSON values
d e@ use
(40,'Rodolph','Bauman','29/05/2000',sysdate);
a
r i n d e to
insert into ODI_STAGE.SRC_SALES_PERSON values
t
el icens
i
(41,'Stanley','Fischer','37233',sysdate);
n
( da ble l
insert into ODI_STAGE.SRC_SALES_PERSON values
l
nie sfera
(42,'Brian','Schmidt','25/08/1992',sysdate);
a
i e l D tran
insert into ODI_STAGE.SRC_SALES_PERSON values
n -
Da non
(50,'Anish','Ishimoto','30/01/1992',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values
(51,'Cynthia','Nagata','28/02/1994',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values
(52,'William','Kudo','28/03/1993',sysdate);
end;

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
j. Click Save and close the tab. b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l
(
2. Execute yourlnewlydacreated
b l e procedure and verify the results.
n i e r a
D n s fe
a Procedure-CRT-TBL
a. Expand > Procedures, select the newly created procedure PRD-
l a
a nie ocreate-populate-table,
n -trOK.
Click Click OK
and then click the Execution button to run the procedure
again.
.
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. Open ODI Operator. In ODI Operator, click the All Executions node, click the Refresh
icon, find your session, and verify that your procedure executed successfully.

s a
b r ) ha
c. Open the Oracle SQL developer and expand the ODI_STAGE connection. c om Select
e
s i d
a newlyGcreated
nthe u table
Tables node and click the Refresh button a
. Doubleclick
c t
SRC_SALES_PERSON, click the Data tab, and verify
m buthat your
d e n
table
SRC_SALES_PERSON was successfully created
r na and tu with records as
populated
S
shown in the following screen.
p e t his
@
de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

3. Additionally, you create an option to delete rows from the target audit table, which you
created in Practice 12-2. To delete rows, you add a command that uses the value of the
option in the code. If the value of this option is set to Y, the command to delete records
will be executed.
a. Right-click your procedure and select New Option. Name this option
DELETE_AUDIT_RECORDS, and set Type to Value. Add the description as shown on
the screen. Set the default value of this option to Y (no quotes). Click the Save icon.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
b. Open your procedure, PRD-create-populate-table, and then click the Details tab. Click
the Add icon to add a new command.

c. Add the new command on Target to delete records in the audit table
TRG_SALES_PERSON_H. Set the parameters as shown in the following table.
Note: You can copy this command from the file 13-1.txt, which is provided at the
following location: c:\Labs\Text.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 11
Parameter Value

Name DELETE AUDIT RECORDS


Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Technology Oracle

Schema ODI_STAGE

Ignore Errors Checked

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
(
d. Click thel Options e l verify that the value of your newly created option is set to Y.
da tabbland
e Saveeicon.
nithe ra
a
Click
s f
i e l DNote:trTo
a nview the inputs in the Options tab, you must click the Refresh button.
n -
Da non

e. Execute your procedure. In Operator, verify that the procedure executed successfully.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Open SQL Developer and expand ODI_STAGE > Tables. Open the Audit table
TRG_SALES_PERSON_H, click the Data tab, and verify that the rows were deleted
from the Audit table.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13


Chapter 12 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 14
n13a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 1
Practice 14-1: Creating an ODI Package
Use Case Scenario:
While working on his data integration projects, John created the ODI project and a number of
interfaces for ELT processing. Now he decides to build a procedure for handling repetitive
operations and a package to use this procedure and the interfaces.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Background:
A common task that is performed by using ODI is to create a package that executes a number
of objects (Interfaces, Procedures) in the flow. In this practice, students create an ODI
procedure and package to execute the sequence of transformations with the interfaces created
in the previous practices.
In this practice, you create a procedure, DELETE_TARGET, for deleting from the
TRG_CUSTOMER, TRG_CITY, TRG_REGION, and TRG_COUNTRY tables.
Then you create and execute a package, PKG_14-1. This package runs your new procedure,
and then runs four interfaces you defined earlier in Lessons 8 and 9, which will use these same
s a
tables as targets:
The DELETE_TARGET procedure b r ) ha
Practice 8-1 interface c om e
Practice 8-2 interface
a n as Guid
Practice 8-3 interface b uc dent
Practice 9-1 interface
r n am Stu
p e this
Finally, you run this package and review its execution in ODI Operator.

a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Your Tasks:
1. Create a DELETE_TARGET procedure that deletes the data in the TRG_CUSTOMER,
TRG_CITY, TRG_REGION, and TRG_COUNTRY tables in the ORACLE_LOCAL_SALES logical
schema.
a. If not open, log in to DEV_ODI_REPO and enter SUPERVISOR for the username and
SUNOPSIS for the password.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. In the Designer tab, click the Projects tab, and then select the Procedures node from
the HandsOnLoads > HandsOn folder. Right-click the Procedures node and select the
New Procedure option.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
c. Enter DELETE_TARGET inn
r i d Namee field,
the to and select ORACLE as the Target
t
elDetails
Technology. Click ithe nsand then click the Add icon .
n c etab,

l ( da ble li
a nie sfera
i e l D tran
n -
Da non

d. In the Name Field, enter DELETE TRG_SALES. In the Schema field, select
ORACLE_ORCL_LOCAL_SALES. In the Context field, select Development.
In the Command field, enter the following code:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 3
DELETE FROM <?=odiRef.getObjectName("L", "TRG_SALES",
"ORACLE_ORCL_LOCAL_SALES", "", "D") ?>
This method returns the table name with run timedependent information, such as the
Oracle schema name that may vary depending on the context and topology. Select the
Ignore Errors check box. Select the Details tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
e. Click the Add icon. In the Name Field, enter DELETE
Schema field, select ORACLE_ORCL_LOCAL_SALES. r n am TRG_CUSTOMER.
SIn
u Context field,In select
tthe the

Development. p e this
a
In the Command field, enter the following d e@ code:us
e
r i n d e to
l t
DELETE FROM <?=odiRef.getObjectName("L",
n s "TRG_CUSTOMER",

a n ie lice
"ORACLE_ORCL_LOCAL_SALES", "", "D") ?>

l ( d btable
This method returns the l e name with run timedependent information, such as the

a n ie fera
Oracle schema name that may vary depending on the context and topology. Select the
Ignore
l D Errors a s box. Select the Details tab.
check
n
ni e -t r
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
) ha
f. Repeat the two previous steps to create the commands DELETE TRG_CITY, DELETE
b r
TRG_REGION, and DELETE TRG_COUNTRY, which delete the tables TRG_CITY,

c om e
TRG_REGION, and TRG_COUNTRY, respectively, as shown in the following screen.

a n as Guid
Note: To enter the commands, you may refer to the file 14-1.txt provided at the
following location: c:\Labs\Text.
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

g. Open the Details tab to view the commands. Click the Save button, and then close the
procedure tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2. Create a package, PKG_14-1, that runs:


The DELETE_TARGET procedure
The INT_8-1 interface
The INT_8-2 interface
The INT_8-3 interface
The INT_9-1 interface
s a
Note: These interfaces were created in Practice 8-1 and Practice 9-1.
b r
a. Expand the Interfaces and Procedures nodes in the HandsOnLoads > HandsOn folder.
) ha
Right-click the Packages node and select the New Package option.
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
e erain the Name field, and then click the Diagram tab. In the tree view,
niPKG_14-1
b. Enter
D a n s f
l expand the Interfaces node and Procedures node. Select the DELETE_TARGET
a n -tra from the tree view, and then drag it to the diagram workbench. A
nie oprocedure
D n DELETE_TARGET step appears in the package.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
c. b r
Repeat the operation for the INT_8-1, INT_8-2, INT_8-3, and INT_9-1 interfaces. The
) ha
package should appear as follows.
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
e era
d. D ani nyour
Rename s f steps with the names of the tables loaded by the step. In the Diagram
l
a n -traclick
nie owindow,
DELETE
the step for the DELETE_TARGET procedure. Edit the Step name:
TARGET TABLES, as shown in the following screen. In the diagram, click the
D n empty space. The step is now renamed Delete Target Tables.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l DSimilarly
t r anedit the names of the other steps in the diagram, as follows.
n e. -
Da non

f. Click the Step After Success tool icon on the Package toolbar. Click the Delete
Target Tables step. Press and hold the left mouse button and move the cursor over the
Countries step. Then, release the mouse button. A green arrow appears between
these steps.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

g. Click the Countries step. Press and hold the left mouse button and move the cursor
over the Regions step. Then, release the mouse button. A green arrow appears
between these steps. Repeat this operation to link the steps in the correct order:
Countries > Cities > Regions > Customers, as follows.

s a
h. Click the Save button to save this package and close the package tab. b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i lits execution in ODI Operator.
3. Run this Package
l ( daand review
b l e
a
a. Click
ie Execute
nthe f e rapackage button to run this package. Click OK in the Execution
l D a n s
n i e window
- t r that appears, and then click OK again.
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b cexpand
b. In ODI Operator, click the Refresh icon. In the session list,
ucomplete. e n t All Executions
the
node. The session called PKG_14-1 should appear as
a m t u dto yourcan
You expand the

ernexecuted. S
nodes in the session to see the steps and tasks corresponding procedure
commands and the interfaces that have p been h i s
d e @ se t
n d a to u
i
ltr ense
i e
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

c. Open the Designer tab and close the PKG_14-1 tab. Click Yes to unlock this package.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 12
Practice 14-2: Using ODI Package with Variables and User Functions
Use Case Scenario:
John needs to add more complexity to the workflow by creating a user function for mapping the
values. This function will convert the values (0, 1, 2) to (Mr, Mrs, Ms). He also needs to
create a variable DELETION_FLAG for counting the number of lines in TRG_CUSTOMER and to
have the Delete Target step running only if DELETION_FLAG is greater than 0.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Background:
A common task that is performed by using ODI is using user functions and variables to add
more complexity to your workflows and mappings. This practice will explain how to use
variables, user functions, and the more advanced features in the packages.
1. In the HandsOnLoads project, define a user function group named Conversion,
containing a user function named DearConvert.
2. Use this function in the interface INT_9-1 to convert the values (0, 1, 2) to (Mr, Mrs,
Ms). s a
3. In ODI Designer, create a numeric variable DELETION_FLAG that counts the number of
lines in TRG_CUSTOMER. b r ) ha
4. Duplicate the PKG_14-1 package, naming the new package PKG_14-2. c om e
5. Have the DELETE_TARGET procedure run only if the DELETION_FLAG a n as variable
G uid is greater
than 0. u
b udec n t
a m
n is St
p e r
e @ e th
d a d o us
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
i
Your l
eTasks: tra
a n n -
no a user function called DearConvert in a new user function group called
D 1. Create
Conversion. This function converts the values (0, 1, 2) to (Mr, Mrs, Ms). Implement
this function for Oracle as linked technology with a CASE WHEN expression.
Note: Remember to use the dollar sign ($) when using the parameters.
a. Select the User Functions node in the HandsOnLoads project. Right-click this node
and select New User Function.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
b. Enter DearConvert in the Name field, enter Conversion in the n s field,
aGroup uidand enter
the following in the Description field: a
uc dent G
b
m Mrs, u Ms). In the Syntax
Converts the values (0, 1, 2) to (Mr,
r n a S t
field, enter: DearConvert($1)
p e this
Note: $1 is the parameter name you use
following scren. a d e@ u se case structure shown in the
in the decision
d e to
rinand
e t
Click the Implementationsltab, s click the Add button.
then
n
i
an le lic e
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 14
c. In the Implementation window, select Hypersonic SQL from the list of Linked
Technologies. Verify that Oracle technology is also selected. Enter the following code
in the Implementation syntax field. Click OK to save this implementation. Click the
Save icon, and then close the DearConvert user function tab.
Note: In Locking/Unlocking Object windows that may appear, click Yes.
Note: To enter the commands, you may refer to the file 14-2.txt provided at the
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

following location: c:\Labs\Text.

CASE WHEN $1 = '0' THEN 'Mr' WHEN $1 = '1' THEN 'Mrs'


WHEN $1 = '2' THEN 'Ms' ELSE NULL END

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

2. You use this function in the interface INT_9-1 to convert the source DEAR column into the
target DEAR column.
a. In the Projects tree view expand Interfaces. Double-click the interface INT_9-1 to open
it. In the Locking window, click Yes. Click the Mapping tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b u c ent
b. In the Target datastore, select the Dear column. Edit
Properties panel to have the following code: rn
tud
am theSimplementation in the

p e down t histo select the Staging Area


DearConvert(SRC_CUSTOMER.DEAR). @ Scroll
e
deClickotheuSave
s button to save the interface.
d a
option from the Execute on panel.
t
l t rin nse
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

3. Run the INT_9-1 interface and review the conversion result.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 17
a. In the interface window, click the Execute button. In the Execution window, select
Development context, and then click OK. Click OK when the Session started
message appears. Close the INT_9-1 editing tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e andtthen
b. Click the Operator tab. Select All Executions, his click Refresh. Expand the All
@
de INT_9-1
Executions node. The session called e
s should appear as complete.
d a o u
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
l ethe
eright-click nsTarget datastore and select Data. Verify that the
n i
c. In the Mapping tab, c
(
column DEAR
l l e li with Mr as shown below.
dawas bpopulated
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ usethat counts the number of lines in
4. Create a numeric variable called DELETION_FLAG
TRG_CUSTOMER.
r i n d e to
t
a. In the Designer, openlthe Projects
e Right-click nstab, and select the Variables node in the
HandsOnLoads n i
a le li
project. c e this node and then select New Variable.
( d
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el inithe ns
b. Enter DELETION_FLAGn i c eName field, select Numeric as the Datatype, and enter 0
(
in the Default
l l e lIn the Action field, select Historize to enable viewing the
daValuebfield.
a nieof allsvalues
history
f e ra for this variable.
i e l D tran
n -
Da non

c. Click the Refreshing tab. Select ORACLE_ORCL_LOCAL_SALES as the schema, and in


the Select Query field, enter the following expression. Click the Save button to save the
variable. Close the DELETION_FLAG variable tab.
Note: To enter commands, refer to the file 14-2.txt provided at the following
location: c:\Labs\Text.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 21
SELECT COUNT(*) FROM <?=odiRef.getObjectName("L", "TRG_CUSTOMER",
"ORACLE_ORCL_LOCAL_SALES", "", "D") ?>
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

5. Modify this package to have the Delete Target step running only if DELETION_FLAG is
greater than 0.
a. Duplicate the PKG_14-1 package. Open the package Copy of PKG_14-1 and rename
it PKG_14-2.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 22
b. Select the Diagram tab. In the project tree, and expand the Variables node. Drag the
DELETION_FLAG variable from the tree view to the diagram. Click the
Deletion_FLAG step and then rename this step Refresh Customer Count.
Ensure that the Type field is set to the Refresh variable.
Note: You need to click the step in the diagram to view the new step name.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 23
c. Drag the DELETION_FLAG variable from the tree view to the diagram again. Rename
this step Flag > 0?, change the Type to Evaluate Variable. In the Operator field,
select > as the operator, and enter 0 in the Value field.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Right-click the Refresh Customer Count step and select First Step. Click the Next
step on success tool on the Package toolbar, and link the step Refresh
Customer Count to the step Flag >0? Using the same tool, link the step Flag >
0? to the step Delete Target tables. Click the Next step on failure tool on
the Package toolbar, and link the step Flag > 0? to the Countries step, as shown
below. Click Save to save the package. Close the tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
e t
l ens
6. Run the new package n i
a andlecheck lic if the Delete Target Tables step was executed.
( d
i el theepackage
a. Right-click
n
b PKG_14-2, and then select Execute. Click OK in the Execution
raclick
D a
window, s
and
n f
then OK when the Session started message appears.
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
b. In the Operator, verify that the latest session called PKG_14-2 appears as complete,
with a Delete Target Tables step executed.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
c. Open the Designer tab. Open the package PKG_14-2 again, n
a asthenG
and uidDiagram.
select
ucTarget
To delete records from the target tables, select the Delete
b e n t step, right-
Tables

when the Session started message appears. r n am Swindow,


click, and select Execute Step. Click OK in the Execution
tud and then click OK
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 27
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b u c the
d. Now, when records from the target tables are deleted, execute
n t
entire package
e OK when the
PKG_14-2 again. Click OK in the Execution window, and thend click
a m t u
ern this S
Session started message appears.
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 28
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a
e. Open the Operator and expand the latest session called INT_14-2.n as VerifyG
id
uthat the
Delete Target Tables step is no longer executed. b uc dent
Note: Because the Customers tables were emptied
r n amby the S u
texecution of the Delete
e
Target Tables step, the value of variablepFlag >0?
t h i s
changes when refreshed to False,
and the Delete Target Tables @ e
destepoisunos longer executed. Close the PKG_14-2
d a
rin nse t
tab.
l t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 29
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14


Chapter 13 - Page 30
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 15
n14a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 1
Practice 15-1: Working with ODI Versions
Use Case Scenario:
In addition to the group of Interfaces created earlier, John needs to create a project and an
interface to export data from a flat file and load this data into a relational table. He also needs to
verify the quality of the data loaded in the table.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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 take an interface and create a first version of it, version 1.0.0.0. Next, you
change some details of the interfaces mapping and create a second version of the interface,
version 1.0.0.1.
Then you use the ODI Version Browser and Version Comparison tool to compare these two
versions of the interface and to detect the differences between them.
Finally, you generate a PDF report of the versions, and then restore the original version. s a
1. Create an interface
b r ) ha
2. Create a new version 1.0.0.0 of the interface
c om e
a n as Guid
3. Change the interface flow and create another version of the interface, version 1.0.0.1
4. Use the Version Browser to compare versions of the interface and create a version
comparison report b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Note: Completing this practice is critical for all the following practice sessions.

Your Tasks:
1. Create a new Interface with Oracle Data Integrator.
a. If not connected, connect to the ODI work repository DEV_ODI_REPO. Log in with the
following details. Click OK.
Login name: DEV_ODI_REPO
User: SUPERVISOR
Password: SUNOPSIS.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
b. In Designer, click the Projects tab. Expand HandsOnLoads > HandsOn
c o>mInterfaces,
e
s
na t Gu
and select INT_9-1. Right-click this interface and select Duplicate. In the i d
Confirmation
window, click Yes. c a
m bu uden
e r na is St
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
c. Double-click Copy of INT_9-1. Name the new interface INT_15-1. Click Save to
save the interface. Close the INT_15-1 tab.

2. Create new versions of INT_15-1.


Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 4
a. To create a new version of INT_15-1: Right-click INT_15-1 and select Version >
Create Version. On the screen that follows, view the suggested version number. Leave
this default number. Click OK.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 5
b. Double-click INT_15-1 to edit it. Click the Flow tab. On the flow tab, click Target
Datastore. Select the Distinct Rows check box. Click the Save button and close your
interface tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. To create another version of this modified Interface, right-click INT_15-1 and select
Version > Create Version. On the screen that follows, click the Previous Versions

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 6
button.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n d. View- the previous (original) version of your interface. Optionally, enter the description
Da noofnthe new version in the Description field. Click OK to save your new version.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
e. Now, you explore your versions by using the Version Browser. Clickc
om> Version
ODI
e
Browser. View your versions with all the necessary information.as i d
c a n t Gu
m bu uden
e r na is St
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
3. Compare the newly created version.
b r ) ha
c om e
a. With Version Browser open, select both versions: (1.0.0.0) and (1.0.0.1) for interface
INT_15-1. Right-click the selected versions and select Compare.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l
l ( da Fields
b. Select Modified l e
b Clickdeselect
and other check boxes. Now you have a more compact
n i eyour changes.
r a
D a nsfe
view of the Print button.

n i el -tra
Da non

c. On the Report generation screen, select the New objects check box. Click button
to specify the PDF file location.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
) ha
d. Specify the PDF file location: C:\Documents and Settings\Administrator\My
b r
Documents\. Name your report: Practice 15-1 Interfaces comparison.
Click Save. Your report will be saved in C:\Documents and
c om e
Generate. Click OK. a n as Guid
Settings\Administrator\My Documents\Practice 15-1 Interfaces comparison. Click

b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c omthe ereport.
e. Open your PDF file with your report. Scroll down to view the report.Close
Click OK to close the Versions Comparison tool. s
na t Gu i d
c a
m bu uden
e r na is St
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
4. Restore the original version of your interface.
a. In the Version Browser, select INT_15-1 version 1.0.0.0, and click the Restore this
version icon. Click OK. Click OK again.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. In the Objects tab, double-click interface INT_15-2. Click the Version tab. View your
current restored version: 1.0.0.0. Click OK.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15


Chapter 14 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 16
n15a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 1
Practice 16-1: Creating and Scheduling an ODI Scenario
Use Case Scenario:
Earlier, John created the ODI procedure to create a relational table and populate it with data.
Now John needs to create an ODI scenario and schedule its execution.
Background:
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

A common task that is performed by using ODI is to create an ODI scenario and schedule its
execution. You already developed the ODI procedure that creates a relational table and
populates the relational table with data.
In this practice, you learn how to create and schedule an ODI scenario to run the procedure you
created in Practice 12-1.
First, in the Designer Navigators Projects tab, you generate a scenario for the PRD-create-
populate-table procedure.
Then, in Topology Navigator, you verify connection to ODI Agent.
Next, in Designer Navigator, you schedule the scenario with ODI Agent. s a
r
You switch back to Topology Navigator to review the scheduling of the agent.
b ) ha
c om e
Finally, in Operator Navigator, after the scheduled scenario execution time, you verify that the
scenario has executed.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Your Tasks:
1. Create a new scenario with Oracle Data Integrator.
a. If not connected, connect to the Work repository WORKREP. Select DEV_ODI_REPO
from the Login Name drop-down list. Enter SUPERVISOR in the User field and
SUNOPSIS in the Password field. Click OK to log in.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b. b
In ODI Designer, click the Projects tab. On the Projects
c expand
utab, e n tthe project:
Procedure-CRT-TBL > First Folder > Procedures.
r n S tudthe PRD-create-
amRight-click
e Scenario.
populate-table procedure and select Generate
p t his
@
de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

c. Name the scenario PRD_CREATE_POPULATE_TABLE. Set the Version to 001. Click


OK.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d. Expand the PRD-create-populate_table procedure and expand Scenarios. Right-click


the PRD_CREATE_POPULATE_TABLE scenario to view the possible options, as
shown in the following screen.
Note: The scenario has now been successfully created. You can now execute the
scenario directly, use the scenario within a package, or schedule the scenario within
ODI.

s a
b r ) ha
c om e
a n as Guid
b uc dent
n a m tu
2. Now you need to schedule an ODI scenario with e r
ODI Agent.
i s S
To schedule the scenario,
p t h
perform the following steps:
a d
a. In Topology Navigator, verify connection
e@ touODIseagent, as shown in the following
screen. r i n d e to
Note: If ODI Agentie
t
islnot set e
s
upnand running, you must perform the steps specified in
Practice 3-1d
n
a continuing. li c
l ( before
b l e
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
D rathe
b.l Expand
e n PRD-create-populate-table procedure. Expand Scenarios >
n i n - t
Da noPRD_CREATE_POPULATE_TABLE
New Scheduling.
Version 001. Right-click Scheduling and select

Note: To schedule a scenario, an ODI Agent must be set up. If an ODI Agent is not set
up within the ODI Topology Manager, perform Practice 3-1, Setting Up and Installing
an ODI Agent.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n amthe scheduled
S tu scenario will run:
localagent. Set Context as Development
e
c. On the screen that follows, select the agent where
his to 5. Set Execution to Simple
pand logtlevel
@
e utime
dexecution e
s to approximately five minutes from the
and click the
d a
button. Set the
t o
l t in insthee following screen. Click the Save button.
current system time, as rshown

a n ie licen
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. Expand Scheduling and verify that the DEVELOPMENT / localagent entry is now
inserted under Scheduling.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

e. Start Topology Manager to review the scheduling of the Agent. In the Physical
architecture, expand the Agents node and double-click localagent. On the localagent s a
screen, click Update Schedule. On the screen that follows, click OK. Click OK again.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 8
f. Click the View Schedule button. The screen that appears shows you the scheduling
information. Click OK to close schedule. Close the tabs: Localagent tab and Scenario
Scheduling.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
scheduled
3. To verify the execution of lthe
e ns scenario, perform the following steps:
a. Click the ODI a n i
Operator tab c e
li to open ODI Operator. In ODI Operator, click the Session
List tab. l (
Wait
duntil b
thel e
scheduled execution time to view the execution results, and then
n i eRefreshr a
D a nsfe
click the icon.
l
a nie on-tra
D n

b. Expand: Physical Agent > localagent -1> PRD_CREATE_POPULATE_TABLE, and


view the execution results for the PRD-create-populate-table procedure. Note the
execution time of this scenario. That is the time that you scheduled with ODI Agent.
You have now successfully scheduled a scenario with an agent scheduler.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16


Chapter 15 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 17
n16a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 1
Practice 17-1: Enforcing Data Quality with ODI Interface
Use Case Scenario:
John is responsible for data loading, transformation, and validation. He created a project and an
interface to export data from a flat file and load this data into a relational table. Now John needs
to verify the quality of data loaded in the table.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

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 and to export data
from a flat file to a relational table. In this practice, you perform data quality control for the
interface created in Practice 10-1.
First, for a certain datastore, you verify that the primary key constraint is marked static, and two
columns are marked mandatory with static control.
You then create an interface using that datastore as a target.
In the interfaces Flow tab, you set STATIC_CONTROL to True. In the Controls tab, you ensure s a
the knowledge module is set to CKM SQL (a knowledge module that you will import) and you
set maximum allowed errors to 5. b r ) ha
c om e
For two columns in the target datastore, you will select the Check Not Null check box so that

a n as Guid
control errors will be generated if these columns are not loaded.
uc dent
You will run the interface with Flow Control set to FALSE. You will verify that there are control
b
datastore. r n am Stu
errors on three records, and that the three records with errors were loaded into the target

p e this
Finally, you will rerun the interface, with Flow Control set to TRUE, and verify that errors are
excluded from the target datastore.
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Note: Completing this practice is critical for all the following practice sessions.

Your Tasks:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 2
1. If not connected, connect to the Work repository, WORKREP. To connect, click Connect to
Repository. Select DEV_ODI_REPO from the Login Name drop-down list. Enter
SUPERVISOR in the User field and SUNOPSIS in the Password field. Click OK to login.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
2. Modify INT-Exp-FF-RT (created in Practice
a d e@ 10-1)
u s eto enable checking data quality in the
target table.
r i n d e to
t ns Modules:
a. Click the Projects tab.lSelect Knowledge
e Knowledge Modules > Check (CKM). Right-click Check
n i c e
da ble li
(CKM) and select Import
l (
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 3
b. In the File import directory field, select CKM SQL and click OK. Close the Import
Report window. Verify that CKM SQL was successfully imported and is shown in the
tree view.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 4
c. In the Models tab, expand Oracle_RDBMS1 > TRG_SALES_PERSON > Constraints,
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

and then double-click TRG_SALES_PERSON_PK. Click the Control tab and verify that
Static is selected.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. In the model Oracle_RDBMS1, expand TRG_SALES_PERSON > Columns, double-


click the column LAST_NAME, and then click the Control tab. Select Static to enable
static control. Select the Mandatory check box. Click the Save button. Repeat the same
step to enable Static control for the DATE_HIRED column. Save your changes and
close the tabs.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. In the Projects tab, expand the Export-FF-RT project, and then duplicate the interface
INT-EXP-FF-RT. Open the copy of the interface and rename it as INT-EXP-FF-RT-
Quality, and then click the Mapping tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n-
Da f. noDelete the filter for the column SALES_PERSON_ID, as shown in the following screen,
and then click the Flow tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
g. In the Flow tab, Click Target + Staging Area (ODI_STAGE) tonopen
a as theGOptions
u id
uc dtab.
section. Set the static control option to true. Click the Controls
b e nt
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 8
h. On the Controls tab, ensure that your KM is set to CKM SQL. Set the maximum
number of errors allowed to 5. Leave the other options with the default values. Click the
Mapping tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
as theGCheck
i. In Target Datastore, select the LAST NAME column, and thennselect
a uid Not
u c column.
Null check box. Repeat the same step for the DATE HIRED
b e n t Click the Save
button to save your changes.
r n am Stud
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
j. Execute
a ie youroffInterface
nnumber e ra as shown . Click the Execution tab to view the execution results with

l
the
D n s errors, in the screen.
a may need to click the Refresh icon to view your last execution.
a nie oNote:
n -trYou
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

k. On the Models tab, right-click the TRG_SALES_PERSON target datastore and select
Control > Errors. View the records with errors as shown in the screen:

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n n-
Da l. noRight-click the TRG_SALES_PERSON datastore and select View Data. Verify that the
rows with errors are still inserted in the target datastore. Close the
TRG_SALES_PERSON data tabs.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

m. Click the INT-EXP-FF-RT-Quality tab. On the Interface screen, click the Flow tab.
Set Flow Control to true. Save your changes, and then execute the interface .

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n
Da n.noOn n-the Models tab, right-click TRG_SALES_PERSON and select View Data. Verify that
the rows with errors are excluded from the data in the target datastore. Close the tabs.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17


Chapter 16 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 18
n17a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 1
Practice 18-1: Implementing Changed Data Capture
Use Case Scenario:
As a database administrator, John is responsible for data loading, transformation, and
validation. He wants to be able to detect changes in his source environment. For that purpose,
he needs to implement Changed Data Capture in his data integration project.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Background:
A common task that is performed by using ODI is to implement Changed Data Capture. In this
practice, students implement Changed Data Capture to detect changes in the source
environment for the interface created earlier in Practice 8-1. You will capture changes of data in
the SRC_CITY table in the Oracle Sales Application model. Then, you modify the interface to
process changed records only.
In this practice, you perform change data capture in an interface, using the JKM Oracle
Simple knowledge module.
First, you import this knowledge module, and create a model by using this journalizing s a
knowledge module.
Then you create an interface by using the IKM Oracle Incremental Update knowledge b r ) ha
module, specifying capture of journalized (changed) data only. c om e
1. Import the JKM Oracle Simple knowledge module.
a n as Guid
2. Create a model, Oracle_RDBMS2, specifying this knowledge b ucmodulee in tthe Journalizing
n
tab.
r n am Stud
3. Reverse-engineer the model, verifying the resulting p e structure.
t his
4. Add the models SRC_SALES_PERSONe @ e
s and start the Journal by using the
d tableotouCDC,
default subscriber SUNOPSIS. da
5. Use Data viewer to change l tdata e t and verify in Journal Data that the data change
rin in nthestable
was captured.
a n ie lice
l (d toraprocess
6. Create an interface
i e ble changed data only.
D an nsfe
n i el -tra
Da non

Your Tasks:
1. Import the appropriate JKM in the project.
a. If not open, log in to the WORKREP Work repository with the login name
DEV_ODI_REPO (enter SUPERVISOR for username and SUNOPSIS for password).

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 2
b. Click the Projects tab. Expand the Procedure-CRT-TBL > Knowledge Modules node,
right-click Journalization (JKM), and select Import Knowledge Modules.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
c. b r
Select JKM Oracle Simple to import and click OK. Close Import Report.
) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el aicnew s
nmodel
d. In the Models a n
tab, icreate e
l schemanamed Oracle _RDBMS2. For Technology,
l (
enter: Oracle.d Select b l e
the logical ODI_STAGE. Click the Reverse Engineer tab
andn i
seteContext e r
toa development. Verify the setting, as shown in the following screen.
a s f
i e l DClicktthe
r a nJournalizing tab.
n Note: - table SRC_SALES_PERSON was created in the ODI_STAGE schema in Practice
The
non
Da 13-1.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

e. In the Knowledge Module menu, select JKM Oracle Simple.Procedure-CRT-


TBL, as shown in the following screen. Click the Save icon to save your model and
then close the tab. s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie assfollows.
f. Reverse-engineer
f e rathe model Oracle_RDBMS2. Expand this model and verify its
i e l D tran
structure
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

2. Set up the CDC Infrastructure. You will start the CDC on the SRC_SALES_PERSON table in
the Oracle_RDBMS2 model.
a. To add the table to CDC, expand the Oracle_RDBMS2 model, right-click the
SRC_SALES_PERSON table, and select Change Data Capture > Add to CDC. Click Yes
to confirm.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
b. Click the Refresh icon. The small yellow clock icon is added to the table
. Right-click the SRC_SALES_PERSON table again and select
Changed Data Capture > Start Journal.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
d @ se
esubscriber
d a
c. In this practice, you use the default
t o u SUNOPSIS. For that reason, you do not
n Click
ltri enwindow,
have to add another subscriber.
SUNOPSIS. In theie Information se OKclickto confirm that your subscriber is
OK again. Wait several seconds, then
a n l i c
l (d raand
click Refresh
i e bleverify that the tiny clock icon at the SRC_SALES_PERSON table is
D an nownsfe
green . This means that your journal has started properly.
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d. Click the ODI Operator icon to open the Operator. Click Refresh. Select All Executions
and verify that the SRC_SALES_PERSON session executed successfully.

s a
3. View the data and the changed data. b r ) ha
c om e
a. In the Designer window, open the Models tab. Right-click the SRC_SALES_PERSON

datastore and select Data.
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. Select the row with SALES_PERSON_ID = 11. Change the value of the LASTNAME
column to Anderson. Similarly, select the row with SALES_PERSON_ID = 51, and
then change the value to Smith. Save your changes and close the tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
c. Right-click the table again and select@ peData. Scroll
View t his down, and verify that the rows
are modified. Close the tab. de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e right-click
d. To verify that your changed data is captured, t his SRC_SALES_PERSON, and
d
select Change Data Capture > Journal
@
e Data. e
sFind the captured changed records in the
d a o u
journal data. Close the tab.
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
4.nie
l D trinterface
an that processes captured data changes. The interface loads the
-
Create an
non
Da TRG_SALES_PERSON_CDC datastore in the Oracle_RDBMS1 model with the content of the
SRC_ SALES_PERSON table from the Oracle_RDBMS2 model. The purpose of this
interface is to process and load only changed data.
a. First you need to add one more knowledge module. In ODI Designer, click the Projects
tab, and then expand the Export-FF-RT project. Import the new Knowledge Module:
IKM Oracle Incremental Update. Close the report.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el one nstarget datastore to store only changed data. In the
b. Now you need toncreatei li
a OracleRDBMS1, c e
more
Models tab,
l ( dexpand l e duplicate the TRG_SALES_PERSON datastore,
b as TRG_SALES_PERSON_CDC.
andn i e theercopy
rename a Save the
a s f
i e l DTRG_SALES_PERSON_CDC
t r a n datastore and then close the tab.
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use datastore, and then click the Delete
c. Open data in the TRG_SALES_PERSON_CDC
Current Row icon repeatedlydto deletetall
o the rows. Save your changes and close the
t r i n e
tab.
n i el icens
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d. In the Projects tab, expand Export-FF-RT > First Folder > Interfaces. Right-click s a
Interfaces, and then select New Interface.
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
elwindow, s INT_SALES_PERSON_CDC as the name of the
nenter
n i
e. In the Interface: NEW
i c e
lOptimization
l ( da that
interface. Ensure
b l e
the Context is Development. Click the Mapping tab.

a nie sfera
i e l D tran
n -
Da non

f. Open the Models tab. In the tree view, expand the Oracle_RDBMS1 model. Drag the
TRG_SALES_PERSON_CDC datastore from the tree view to the Target Datastore zone.
Expand the Oracle_RDBMS2 model and drag the SRC_ SALES_PERSON datastore

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 16
from the model tree to the Sources zone of your diagram. Click Yes to perform
automatic mapping. Save your interface.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
Da g.nothen-
n Right-click the caption of the source datastore and select Data. Scroll down to preview
current source data. Close the Data window.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b u c ent
h. Click the Flow tab, click the Staging Area caption,m
IKM Oracle Incremental Update. Select r n S t d the selected IKM is
and verifyuthat
aDistinct Rows.
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

i. Now you modify this interface to process only the changed data. Click the Mapping
tab. Click the source datastore. In the Diagram property panel, select the Journalized
Data only check box.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 20
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie data
j. To check the new
s f e rasource data set, repeat step d. View your data again. Only the
e l D ran
changed should be visible. Close the data window.
ni -t
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 21
k. Save your interface and close the tab. Execute the interface to process only journalized
records.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
5. Verify the execution results. p e this
a. Open the Operator. Click Refresh.e
d @ the
Expand s eAll Executions node and verify that your
session, INT_SALES_PERSON_CDC, a u
d e executed
to successfully.
t r i n
n i el icens
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. View the data in the TRG-SALES_PERSON_CDC datastore and verify that only three
changed rows are inserted in the target datastore.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 22
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t ns
el theicSRC_SALES_PERSON
n i
6. In the Models tab, right-click
a l e datastore and select Drop Journal.
d clickbOK leagain. Right-click the SRC_SALES_PERSON datastore again,
el (Remove
Click OK, and then
i
and thennselect
f e r a from CDC. Click Yes to confirm removing the datastore from CDC.
a s
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 18


Chapter 17 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 19
n18a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 1
Practice 19-1: Setting Up ODI Security
Use Case Scenario:
As a database administrator at FN Enterprise, John is responsible for performing database
management and integration tasks on various resources within the organization. John is also
responsible for enforcing the ODI security policies. To set his ODI environment, he needs to set
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

up the security with ODI.


Background:
Using the ODI Security Manager module, you can manage security in Oracle Data Integrator.
In this practice, you explore the security features of ODI Security Manager. You create a profile,
grant 3 methods (actions) to the profile, and create a new ODI user to whom you assign that
profile.
You then assign the profile to your new user, and grant a specific method (View) for a specific
object (Scheduling) for your new user. You also define user parameters that enable specific
functionality for your new user.
s a
Finally, you define password policies that control the case sensitivity and length of user-defined
passwords. b r ) ha
c om e
1. In ODI Security Navigator, expand the Profiles panel and duplicate the Repository Explorer

a n as Guid
profile, naming the new profile REVIEWER. You grant three methods to the REVIEWER
uc dent
profile: Compare with version, Duplicate, and Export from object Model.
b
r n am Stu
Note: You may need to click the View menu and open the Security Navigator.
2. Create a new ODI user, INT_PROJECT_REVIEWER.
p e this
3. Assign the new profile REVIEWER to your
a d
and Work repositories, assign the built-in
e@ u
profile
se user. To connect to ODI Master
newly created
CONNECT, to the new user
INT_PROJECT_REVIEWER.trin
d e to
n
4. Grant the View method i c e ns object to user INT_PROJECT_REVIEWER.
eforlthe iScheduling
( da btoleenablel
i e l
5. Define user parameters
r a specific functionality for INT_PROJECT_REVIEWER.
n e to enforce passwords to be uppercase and greater than 8
6. Defineapassword fpolicies
s
l D n
nie on-tra
characters.
D a n

Your Tasks:
1. To define an ODI security policy, you need to create an appropriate profile for working
methods used in your project.
a. Start Oracle Data Integrator and connect to the Master repository. For Login Name,
enter Master Repository. Enter SUPERVISOR for user and SUNOPSIS for
password. Click the Profiles tab.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
c theenProfiles
b. From the View menu, open the ODI Security Navigator.uOpen
b t tab. Right-
click the generic REPOSITORY EXPLORER profile a m
and select
t d
uDuplicate Selection. Click
Yes to confirm. r n
e this S
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
eofl REPOSITORYns EXPLORER to edit.
c. Double-click Copy
n i c e
l ( da ble li
a nie sfera
i e l D tran
n -
Da non d. Rename your new profile REVIEWER. Click the Save button to save this profile. The
profile REVIEWER appears in the Profiles tree structure.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
2. Assign the appropriate authorizations to REVIEWER.
a n as Guid
uc d> eModel,
a. Open the Objects Tab. In the Profiles tab, expand REVIEWER
b nt as shown
r n am Stu
below. Only the View method is permitted for Model now.

p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. In the Objects tab, expand Model and select the method Compare with Version.
Drag the Compare with Version method to the profile REVIEWER. In the
Confirmation window, click Yes.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Repeat step c to add the methods Duplicate and Export... to the profile
REVIEWER. In Profiles, expand REVIEWER > Model, and verify that the methods

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 7
Compare with version, Duplicate, and Export... are added to the object
Model, as shown in the following screen. Save the profile REVIEWER and close the tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n on-
Da3. Create
n a new ODI user.
a. Click the Users tab and select New user. The New User window opens.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 8
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use Click Enter a password.
b. Name the new user: INT_PROJECT_REVIEWER.

r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Enter the password (INTEGRATION), and then confirm this password. Do not select the
Allow expiration date check box. Click OK. Click the Save button to save this new
user. User INT_PROJECT REVIEWER is now displayed in the Users tree structure.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
4. Assign the profile REVIEWER to user INT_PROJECT_REVIEWER. sc
om e
a n
a. Make sure that both the Profiles and Users panels are displayed G uinidODI
atogether
Security Navigator. Click the profile REVIEWER in theb uc dpanel
Profiles e ntand drag it to user
INT_PROJECT REVIEWER in the Users panel. Click
r n am YesStotuconfirm granting the profile.
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b. In the Users panel, expand the INT_PROJECT REVIEWER > Profiles node and
verify that profile REVIEWER was assigned to this user.

s a
b r ) ha
c om e
a n as drag
c. To connect to ODI Master and Work repositories and other objects,
G utoduser
assign ithe built-in

INT_PROJECT REVIEWER. Click Yes to confirm granting b ucCONNECT


profile CONNECT to your new user. Select the profile CONNECT and
e n tto your new user.
it

r n am Stud
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d. Verify that the profiles CONNECT and REVIEWER are added to your new user:

s a
b r ) ha
c om e
n s uid
adirectly
Ensure that the Objects and Users panels are open. bIn u
a
e. You can also grant privileges to use certain methods for objects
c enpanel,
the Objects
t Gto scroll
your user.
down
and then expand the object Scheduling. Select a m t
View. Drag u d
this method to
INT_PROJECT REVIEWER. p ern this S
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Verify that authorization to the object Scheduling with the method View was added
to user INT_PROJECT_REVIEWER, as shown in the following screen.

5. Connect your new user to the ODI Work repository and verify your access to ODI artifacts.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 13
a. From the ODI menu, select Disconnect DEV_ODI_REPO. Connect to your work
repository as the newly created user. Select DEV_ODI_REPO for the Login Name.
Enter INT_PROJECT_REVIEWER for the user and INTEGRATION for the password.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
e thistab, and then expand your
b. In the Designer tab, click the Projects tabpand Models
e@haveuaccess
projects and models to verify thatdyou
a se to view all your artifacts.
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
6. Define user parameters so that the user can enable specific ODI functionality. Ensure that a
help message is displayed if an interface diagram is empty and objects remain unlocked
when opening. In addition, you may want to set a delay between two refreshes in seconds
and the number of elements displayed in a branch of the Operator tree view.
a. In ODI Security Manager, select ODI > User Parameters.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

a
) h as
b. Edit the user parameters as shown in the following table. Click OK. Click the ODI
and select Disconnect DEV_ODI_REPO to close this user connection. mb
r menu

s co ide
Parameter Value Functionality
c a na t Gu
bu when
Display a Help message
m d e n Interface
the
Help for Interface Diagram 1
Diagram isrn a
empty S tu
p e t h is
Lock object when opening 0 @
deLockoobject e
s when opening
d a u
Delay between two
l t et
rin2 nsInter-refresh delay
refreshes (seconds)nie e
( d a le lic
Operatorie l limit
Display r ab 200 Number of elements displayed in a branch of the
a
(0=no n s f e
e l D limit)r a n Operator tree view
ni -t
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
7. e
i l Dyourtrconnection
Open an with user SUPERVISOR. Select Security Navigator. Define
n -
non is defined by the user.
Da password
Password Policies. These policies consist of a set of rules that will be checked when the

a. From the ODI menu, select Disconnect DEV_ODIREPO. Connect to


DEV_ODI_REPO with user SUPERVISOR. For the password, enter SUNOPSIS. Open
Security Navigator. Click the icon, and then select Password policy. Click the
Add a Policy icon.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
b. Name this policy Policy
e l t
eEnter1.
n s the rule description as shown in the following
i
antheladd
screen. Set Conditions toicmatch to All. In the Rules section, click Text and select is
l rule
uppercase.
l ( d
Click
b e button (with the + sign).
i e a
D an nsfer
n i el -tra
Da non

c. Enter another rule: Length >= 8. Click OK.


Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e checkthbox.
d. On the screen that follows, select the Active is Select the Passwords are
@ e
e days. uClick
valid for check box, and set it tod30 s OK to save this Password policy. Click
d a o
rin nse t
OK again. Close the Security Navigator tab.
l t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 20
Practice 19-2: Integration with Enterprise Manager and Using ODI
Console
Use Case Scenario:
Oracle Data Integrator provides an extension integrated into the Fusion Middleware Control
Console (Enterprise Manager). The Oracle Data Integrator components can be monitored as a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

domain through this console, and administrators can have a global view of these components,
along with other Fusion Middleware components from a single administration console. John
decided to begin using this feature. He created the Web Logic Server (WLS) domain, ODI-
DOMAIN. Now John needs to deploy and configure the ODI Java EE Agent with the existing
WLS domain. He also needs to configure the ODI Enterprise Manager and ODI Console Plug-
in with WLS.
Background:
In this lab, you perform the steps needed to deploy and configure the ODI Java EE Agent,
Enterprise Manager11g, and ODI Console plug-in to an existing WLS domain. You use
Enterprise Manager 11g and ODI Console to access your ODI objects. s a
r
1. Deploy and configure the ODI Java EE agent, Enterprise Manager, and ODI Console
b ) ha
with the existing WebLogic domain.
c om e
3. Use Enterprise Manager to administer ODI. a n as Guid
2. Connect to the WebLogic Server and managed server, odi_server1.

b uc dent
4. Use ODI Console to explore the ODI environment.
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
Your Tasks:
1. Deploy and configure the ODI Java EE agent and Enterprise Manager on the existing
WebLogic domain, ODI-DOMAIN.
Note: This domain was precreated for this practice.
a. In Topology Navigator, open Physical architecture and then create a new ODI Agent.
Name this agent OracleDIAgent. Set the port to 8002 and Host to localhost. Verify
that the Web application context is set to oraclediagent, as shown below. Save
your new physical agent.
Note: The agent name is case-sensitive! Use the exact name OracleDIAgent, as
shown in the following screen.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 21
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
b. In the Logical architecture, create a newp
e thiswith the same name as your new
logical agent
physical agent, OracleDIAgent. d @this logical
eLink se agent to the physical agent
a
dcontexts, u
toas shown below.
OracleDIAgent in all three
t r i n e
n i el icens
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

c. Extend the WebLogic server domain ODI-DOMAIN with the ODI agent application.
d. To deploy and configure domains with WLS, you start the config.bat file from the ODI
Home Install directory C:\Oracle\Middleware\Oracle_ODI1\common\bin.
Start the command shell and change directory to

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 22
C:\Oracle\Middleware\Oracle_ODI1\common\bin. Execute the command
config, which starts the Configuration Wizard.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r
e. Select Extend an Existing i n d e toDomain, and then click Next.
WebLogic
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Select the WebLogic domain directory ODI-DOMAIN, as shown below. Click Next.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 23
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a n ie fera
g.l D n
In the screen
a s that follows, select Oracle Data Integrator Agent 11.1.1.1 (Oracle
e
ni JRF r
n-twill thenManger
Da noEnterprise
also be selected; leave this option selected). Select the Oracle
Plugin For ODI 11.1.1.0, which will also include the Oracle
Enterprise Manager 11.1.1.0. Also select Oracle Data Integrator-Console-11.1.1.0.
Click Next. In the screen that follows, click OK to replace the existing component.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

h. In the next screen, accept the default application location. Click Next.
Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
i. The wizard will set up the ODI repository connection b uc theddomain
within e nt server. During
r n aminformation
the wizard configuration, the repository connection
S tu must be supplied. Click
the check boxes next to ODI Master schema,
p e t h is table. Work
and next to ODI schema. Configure
the JDBC component schema as shown
d e @ sein the following Click Next.
Database Connection (Mastern d a to u
Repository)
i
ltr eValue se
i e n
Parameter
( d an le lic
Vendorel b
ni sfera
Oracle
a
i e l DDrivertran Oracles driver (Thin) for
n
Da noSchema n- Service connections

Owner DEV_ODI_REPO

Schema Password oracle1

DBMS/Service orcl

Host Name localhost

Port 1521

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
j. Verify that the test was successful (if not, correct anyb uc densettings).
connectivity
t Click Next.
a m t u
p ern this S
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

k. In the next screen, select Managed Servers, Clusters and Machines. Click Next.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 27
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n am SClick
l. Set Listen port to 8002 for managed serverrodi_server1. tu Next.
p e t his
@
de o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

m. In the Configure Clusters screen, click Next.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 28
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

n. In the Configure Machines screen, click Next.


s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
o. The Assign Servers to Machines screen will already have the odi_server1 assigned to
localODImachine. Click Next.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 29
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
n astheG
p. Review the Configuration Summary, and then click Extend. When
a uid is
domain
created, click Done.
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 30
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
2. Connect to the WebLogic server and managed
a d e@ userverse odi_server1.
a. In the command shell, change
r i n d directory
e toto the directory of the WLS Home -
t
elcommand. ns
C:\Oracle\Middleware\user_projects\domains\ODI-DOMAIN\bin. Execute
n i c e
l ( da ble li
the startweblogic

a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 31
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
b.
c om e
Security must be set up for the JAVA EE application to have access to the ODI
repository. The entry will be created within the credential store, which will allow the
n as Guid
JAVA EE Agent to authenticate itself to be able to use the required resources. This
a
uc dent
user should be a user that is already set up in the ODI Security. In this practice, we use
b
r n am Stu
user SUPERVISOR. To do this, you execute Web Logic Scripting Tool (WLST),
connect to our running Admin server and add the credential store. To start WLST, in
p e this
the new command window, change directory to the WLS_HOME common bin -

a d e@ use
C:\Oracle\Middleware\oracle_common\common\bin, and then execute the
command wlst.
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
c. To connect to the running Admin server, execute the following command:
connect('weblogic','welcome1','t3://localhost:7002')

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 32
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d. Execute the following command to add the correct credential store for ODI Supervisor:
createCred(map="oracle.odi.credmap", key="SUPERVISOR",
user="SUPERVISOR", password="SUNOPSIS", desc="ODI SUPERVISOR
Credential").
Also execute the command to add the correct credential store for the domain ODI-
DOMAIN:
createCred(map="oracle.odi.credmap", key="ODI-DOMAIN",
user="weblogic", password="welcome1", desc="ODI-DOMAIN
s a
) ha
Credential").
To exit WLST, execute the command exit().
b r
c om e
Note: All commands are case-sensitive! You can copy commands
n a s the
from
u i dtext file
19-2.txt provided in the c:\LABS\text folder.
b u ca ent G
a t u d store authentication.
Note: During run time, the JAVA EE Agent will access this credential
m
p ern this S
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. To start managed server odi_server_1, change directory to WLS Home -


C:\Oracle\Middleware\user_projects\domains\ODI_DOMAIN\bin, and use
the execute command StartManagedWeblogic odi_server1. For Username,
enter weblogic. For the password, enter welcome1. Verify that your managed server
is started in RUNNING mode.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 33
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. From ODI Designer, test connectivity of your configured ODI Java EE agent. Click OK.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 34
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
3. Use Enterprise Manager to administer ODI.
c om e
a. Start the browser and enter http://localhost:7002/em. Log in to Enterprise
n as Guid
Manager. For the user, enter weblogic. For the password, enter welcome1. On the
a
screen that follows, click Continue.
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. With Enterprise Manager, a process and resources can be monitored and managed.
You can explore the deployed application by clicking on each link. You can see

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 35
running processes, workload, log file information, and more. Drill down into ODI objects
by expanding ODI in the left panel, as shown in the following screen.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c. Expand odiconsole node. Then click MASTER REPOSITORY to view
c ommoreedetails.

s
Note: Your information may differ from the information providedaon
n t Gu i d
these screens.
c a
m bu uden
e r na is St
@ p th
e
d o us e
d a
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 36
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
d. Click the OracleDIAgent to see the Java EE agent information. as uid
a n G
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Click the localagent node to see details for the standalone agent.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 37
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D trathe
f. Expand
n Application Deployment node, and then click oraclediagent. View the
n n -
Da noWebLogic server application deployment information.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 38
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i l ODI environment.
4. Use ODI Console
l ( dtoa explore
l e the

n e eopen
a. In the ibrowser,
f r abthe new window, and then enter
a s
Dhttp://localhost:8002/odiconsole
n to start the Oracle Data Integrator Console.
e l r a
a ni on-tTo log in, enter SUPERVISOR for the user ID, and enter SUNOPSIS for the password.
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 39
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
n m and
aModels, tu Topology.
r
b. Click the Design Time tab. Expand Projects,
e S
@ p
e t his
d a de o us
l t rin nse t
a n ie lice
i e l (d rable
D an nsfe
n i el -tra
Da non

c. Select the Export-FF-RT project, and then click the View icon:

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 40
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
D an and click the First Folder link. Select the Interfaces tab. Explore the
d.l Scrolltrdown
e
n i n- created in your Export-FF-RT project.
Da nointerfaces

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 41
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
e. Click other tabs. Explore the different ODI objects in your project.
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non f. Similarly explore models in your Work repository. To explore the datastores, scroll
down and select Sub-Model Name. Scroll down and view the datastores.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 42
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
5. Stop WebLogic server. n i l
l ( da serverl e
n i e erab odi_server_1, change directory to WLS Home -
a. To stop managed

D a f
C:\Oracle\Middleware\user_projects\domains\ODI_DOMAIN\bin,
s
n the command stopManagedWebLogic odi_server1. For the user
and

n i el then
- t aenter
execute
r
Da non name, weblogic. For the password, enter welcome1.

b. To stop the WebLogic server, execute the command stopWebLogic.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 43
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 19


Chapter 18 - Page 44
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
ucLesson
Practices bfor
e n t 20
n19a
m tud
e this S
r
Chapter
p
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 1
Practice 20-1: Executing an ODI Scenario Through the ODI Public Web
Service
Use Case Scenario:
John created the procedure, which creates a relational table and populates it with data. Now,
John needs to generate a scenario and create an ODI public Web service to execute the
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

scenario.
Background: This practice has two aims: 1) To teach you how to execute a scenario through
the ODI public Web service and 2) To become familiar with the use of the
OdiInvokeWebService tool. Therefore, the OdiInvokeWebService tool will be used to
invoke the ODI public Web service that commands an agent to connect to a given Work
repository, and to start a specific scenario. In this practice, you use the interface created in
Practice 10-1.
1. Create and execute a new scenario, INT_EXP_FF_RT.
a
2. Create a new package, OdiInvokeWebService.
3. Select the OdiInvokeWebService tool from the toolbox and create the corresponding ) h as
step in the package. b r
4. Define parameters of the Web service by using the Advanced dialog box c omSOAPeEditor.
and
a n as INT_EXP_FF_RT.
5. Invoke your Web service from the SOAP Editor to execute the scenario G uid
6. View the response and verify the execution results. b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non
Your Tasks:
1. If not connected, connect the Work repository, WORKREP. To connect, click Connect to
Repository. Select DEV_ODI_REPO from the Login Name drop-down list. Enter
SUPERVISOR in the User field and SUNOPSIS in the Password field. Click OK to log in.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 2
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

a. In the ODI Designer tab, expand the project Export-FF-RT > First Folder >
Interfaces. Right-click the interface INT_EXP_FF_RT, and then select Generate
Scenario. Name the new scenario: INT_EXP_FF_RT. Set the version to 001.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

b. In the Topology Navigator, verify connection to your standalone agent localagent.


Note: Ensure that your standalone agent is created and successfully started. To create
and start an ODI agent, refer to Practice 3-1.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 3
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
c.l D
Expand the n interface and execute a newly created scenario, as shown below. For
n i e - t
Agent, r a
select localagent. Click OK to confirm the execution.
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

d. To view the results of the execution in Operator, click the Operator icon on the
Designer toolbar. Click Refresh. Expand the All Executions node. The
INT_EXP_FF_RT session should appear as complete.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
d e to
rinthe
.
2. Create a new package bylusing
e t s
OdiInvokeWebService
n tool.
n i
a tab, expand
a. On the Projects c e
li the project Procedure-CRT-TBL > First Folder >
l ( dRight-click
l e
n i e erab in the Name
Packages. Packages and select New Package. Enter
a nsf
OdiInvokeWebService
D
field, and then click the Diagram tab.

n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b. Scroll down and select the OdiInvokeWebService tool from the toolbox. Click the ha
b
diagram workbench. An OdiInvokeWebService tool step appears in the package.
r )
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da c.noInnthe Properties panel, retain the default name OdiInvokeWebService 1 for the Step
name field. Scroll down, and define the parameters in the Properties panel as follows:
Parameter Value

WSDL URL - Leave blank -

Port Type - Leave blank -

Operation - Leave blank -

XML Request - Leave blank -

Request File - Leave blank -

Storage Mode for Response File FILE_APPEND

File Encoding for Response File ISO8859_1

XML Encoding for Response File ISO8859_1

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 8
Response File C:/TEMP/WebServiceToolStep

HTTP User - Leave blank -

HTTP Password - Leave blank -

Execution Timeout (ms) - Leave blank -


Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

d. Click the Advanced button. A new window opens. Enter


http://localhost:20910/oraclediagent/OdiInvoke?wsdl for the Web
Service Description File (WSDL) URL field. Click the Connect to WSDL button .
The appropriate port OdiInvokePortType is automatically detected and the available
operations are displayed at the left.

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

e. Select the invokeStartScen operation in the left panel and then enter the parameters in
the request parameter fields as provided in the following table. Your SOAP Editor panel
should appear as follows.
Note: Press Enter each time to confirm your entries.
Parameter Value

<OdiUser> SUPERVISOR

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 9
<OdiPassword> SUNOPSIS

<WorkRepository> WORKREP

<ScenName> INT_EXP_FF_RT

<ScenVersion> 001
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

<Context> DEVELOPMENT

<LogLevel> 5

<SyncMode> True

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

f. Click the Source tab to view the scenario request. Click the Remove Blank Optional
Elements icon to remove all blank optional elements from the query. This is
necessary to construct a valid query. The request should be as shown below.
Note: You can also select the Clean up before execution check box . This option
automatically deletes the empty optional elements in the SOAP request.

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
3. Invoke your Web service.
a d e@ use
a. To invoke your Web service,dclick the tInvoke
o Web Service icon. Click the SOAP
t r i n e
s the right panel of the SOAP Editor. Verify that
i e l esuccessfully,
Editor tab. The response is displayed
n in
your Web service
a n processed
l i c as shown in the screen.

i e l (d rable
D an nsfe
n i el -tra
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 12
b. Click the Source tab again to view the scenario response. The response should be as
shown in the following right panel. Click OK to close the window. Click the Save button
to save your package and close the tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@
c. In ODI Operator, verify that scenario u se
INT_EXP_FF_RT successfully executed.
i n d t o
i e ltr ense
( d an le lic
n i el erab
D a nsf
l
a nie on-tra
D n

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 14
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

s a
b r ) ha
c om e
a n as Guid
b uc dent
r n am Stu
p e this
a d e@ use
r i n d e to
t
el icens
n i
l ( da ble l
a nie sfera
i e l D tran
n -
Da non

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20


Chapter 19 - Page 16

También podría gustarte