Sei sulla pagina 1di 262

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

a
s
a
h
)
comide

s
Oracle Data
u 11g:
ticIntegrator
a
G
t
m
n Administration
le dand
e
Integration
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t Activity Guide - Volume I
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

D64974GC20
Edition 2.0
September 2012
D78956

Author

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

Richard Green

Disclaimer

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

Technical Contr ibutors


and Reviewer s
Alex Kotopoulis
Denis Gray
Christophe Dupupet
Julien Testut
David Allan
Sachin Thatte
Viktor Tchemodanov
Gerry Jurrens
Veerabhadra Putrevu

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

s
a
h
Editor s
)
m
o
Rashmi Rajagopal
c ide
s
c
Vijayalakshmi Narasimhan
u
ti
a
G
t
m
Aju Kumar Kumar
le den
e
t
es s Stu
h
Gr aphic Designer s
g
u
hi
t
h
Satish Bettegowda
e
a@ o us
d
Seema Bopaiah
n
a se t
p

r
a cen
m
Publisher s
a
li
(
e
l
Giri Venugopal da
n ferab
a
Sumesh Koshy
P ns
r Rameshkumar
a
Srividya
a
Am on-tr
n

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.
Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners.

Table of Contents

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

Practices for Lesson 1: Introduction to Integration and Administration ................................................. 1-1


Practices for Lesson 1: Overview............................................................................................................. 1-2
Practice 1-1: Starting the ODI Client ........................................................................................................ 1-3
Practices for Lesson 2: Administering ODI Repositories ........................................................................ 2-1
Practices for Lesson 2: Overview............................................................................................................. 2-2
Practices for Lesson 2: Flow of Data........................................................................................................ 2-3
Practice 2-1: Creating and Connecting to ODI Master and Work Repositories ........................................... 2-4
Practices for Lesson 3: ODI Topology Concepts ..................................................................................... 3-1
Practices for Lesson 3: Overview............................................................................................................. 3-2
Practice 3-1: Setting Up and Installing an ODI Agent ................................................................................ 3-3
Practices for Lesson 4: Describing the Physical and Logical Architecture ............................................ 4-1
Practices for Lesson 4: Overview............................................................................................................. 4-2
Practice 4-1: Working with Topology ........................................................................................................ 4-3

s
a
Practices for Lesson 5: Setting Up a New ODI Project ............................................................................
5-1
h
) 5-2
Practices for Lesson 5: Overview.............................................................................................................
m
o
c ide5-3
Practice 5-1: Setting Up a New ODI Project .............................................................................................
s
c
Practices for Lesson 6: Oracle Data Integrator Model Concepts.............................................................
ati t Gu 6-1
m
Practices for Lesson 6: Overview.............................................................................................................
6-2
le den
e
t
u
s
Practice 6-1: Creating a Model ................................................................................................................
6-3
t
e sS
h
g
i ....................................... 7-1
Practices for Lesson 7: Organizing ODI Models and Creating
ODI
Datastores
u
h
t
h
e
Practices for Lesson 7: Overview.............................................................................................................
7-2
@ us
a.....................................................................................
d
Practice 7-1: Checking Data Quality in the n
Model
7-3
o
t
a ......................................................................................
p
e

s
Practices for Lesson 8: ODI Interface
Concepts
8-1
r
n
a.............................................................................................................
e
m
c
Practices for Lesson 8: Overview
8-2
i
a
l
(
e
l
Practice 8-1: Creating
b Simple Transformations .................................................................. 8-3
daODI Interface:
a
n
r
a
Practices for
fe Interfaces .......................................................................................... 9-1
PLessonn9:sDesigning
r for
a
Practices
Lesson
9:
Overview
............................................................................................................. 9-2
a
r
m 9-1:
t
APractice
Creating
ODI
Interface:
Complex Transformations ............................................................... 9-3
n
o
n
Practice 9-2: Creating ODI Interface: Implementing Lookup ...................................................................... 9-22

Practices for Lesson 10: Interfaces: Monitoring and Debugging ............................................................ 10-1
Practices for Lesson 10: Overview ........................................................................................................... 10-2
Practice 10-1: Creating ODI Interface: Exporting a Flat File to a Relational Table ...................................... 10-3
Practices for Lesson 11: Designing Interfaces: Advanced Topics 1 ....................................................... 11-1
Practices for Lesson 11: Overview ........................................................................................................... 11-2
Practice 11-1: Using Native Sequences with ODI Interface ....................................................................... 11-3
Practice 11-2: Using Temporary Indexes ................................................................................................. 11-18
Practice 11-3: Using Data Sets with ODI Interface.................................................................................... 11-28
Practices for Lesson 12: Designing Interfaces: Advanced Topics 2 ....................................................... 12-1
Practices for Lesson 12: Overview ........................................................................................................... 12-2
Practice 12-1: Using Temporary ODI Interfaces ....................................................................................... 12-3
Practice 12-2: Developing a New Knowledge Module ............................................................................... 12-38
Practices for Lesson 13: Using ODI Procedures...................................................................................... 13-1
Practices for Lesson 13: Overview ........................................................................................................... 13-2
Practice 13-1: Creating an ODI Procedure ............................................................................................... 13-3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.

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


i

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

Practices for Lesson 14: Using ODI Packages......................................................................................... 14-1


Practices for Lesson 14: Overview ........................................................................................................... 14-2
Practice 14-1: Creating an ODI Package.................................................................................................. 14-3
Practice 14-2: Using ODI Package with Variables and User Functions ...................................................... 14-14
Practices for Lesson 15: Managing ODI Scenarios.................................................................................. 15-1
Practices for Lesson 15: Overview ........................................................................................................... 15-2
Practice 15-1: Creating and Scheduling an ODI Scenario ......................................................................... 15-3
Practices for Lesson 16: Using Load Plans ............................................................................................. 16-1
Practices for Lesson 16: Overview ........................................................................................................... 16-2
Practice 16-1: Using Load Plans.............................................................................................................. 16-3
Practices for Lesson 17: Managing ODI Versions.................................................................................... 17-1
Practices for Lesson 17: Overview ........................................................................................................... 17-2
Practice 17-1: Working with ODI Versions................................................................................................ 17-3
Practices for Lesson 18: Enforcing Data Quality with ODI ...................................................................... 18-1
Practices for Lesson 18: Overview ........................................................................................................... 18-2
Practice 18-1: Enforcing Data Quality with ODI Interface .......................................................................... 18-3

a
s
a
h
)
Practices for Lesson 19: Working with Changed Data Capture ...............................................................
19-1
om e19-2
c

Practices for Lesson 19: Overview ...........................................................................................................


s uid 19-3
c
i
t
Practice 19-1: Implementing Changed Data Capture ................................................................................
ma ent G
e
Practices for Lesson 20: Advanced ODI Administration..........................................................................
20-1
l
e tud
t
s
Practices for Lesson 20: Overview ...........................................................................................................
20-2
e sS
h
g
Practice 20-1: Setting Up ODI Security ....................................................................................................
20-3
i
u
h
t
h
Practice 20-2: Integration with Enterprise Manager@
and Using ODI
eConsole.............................................. 20-22
s
a
u
d
Practices for Lesson 21: Extending Oraclen
Data Integrator
21-1
to with SDK, Web Services, and SOA ............ 21-2
a
p
e
Practices for Lesson 21: Overview ...........................................................................................................

r ens
aScenario
Practice 21-1: Executing an ODI
m
icThrough the ODI Public Web Service....................................... 21-3
a
l
(
e
l
nda ferab
a
r P ans
a
Am on-tr
n

Copyright 2012, 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 2014, Oracle and/or its affiliates

s
a
h
)
m
o
c ide
s
c
ati t G1:u
m
Practices lfor
Lesson
e den
e
t
Introduction
tu Integration
es s Sto
h
g
u Administration
and
hi
t
h
e
a@Chapter
us 1
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 1

Practices for Lesson 1: Overview


Practices Overview

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

In this practice, you will start up the ODI client, and examine the help system and Start Page.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 2

Practice 1-1: Starting the ODI Client


Overview

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

In this practice, you start up the ODI client, explore the help system, and examine the links on
the Start Page.

Assumptions
None

Tasks
1.

Start Oracle Data Integrator and explore the help system:


Step
a.

Screen/Page Description

Choices or Values

MS Windows

Start Oracle Data Integrator: Start >


Programs > Oracle > Oracle Data
Integrator > ODI Studio.

a
s
a
h the main
)
b.
Oracle Data Integrator
The ODI client window opens.
From

com
menu, select Help > Table
of Contents.

e
s
d
i
c
i
u
atappears.
c.
Oracle Data Integrator
The Help Center
Expand the
G
t
m
nContents tab. Doublenavigation
letree ofdthe
e
e
t
click
tuthe Online Help. Observe that
esOpening
S
h
another
panel
g
is opens to the right, with details
u aboutthyour
h
chosen topic. Close the Help
e
@ usCenter.
a
d
n e to
a
p

From the Help menu, select ODI Forum.


d.
Oracle Data Integrator
r ens
a
m
ic
a
l
e.
Oracle Data
Integrator
If you have an Internet connection, the Oracle
(
e
l
a
ODI Forum web page opens. Scroll through
nd ferab
a
the list of topics. Close the browser.
P ns
r
a
ra Data Integrator
On the Help menu, note that there is also a
Amf. on-tOracle
link to the Oracle Technology Network.
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 3

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

a.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
b.
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 4

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

c.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
d.
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 5

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

e.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
f.

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 6

2.

Examine the links on the Start Page:

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

Step

Screen/Page Description

Choices or Values

a.

Oracle Data Integrator

On the Start Page, click Define the


Topology.

b.

Oracle Data Integrator

On the Define the Topology tab, examine the


five different categories of information.
Click Create and Connect to your
Repositories.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to Click X to close the Help Center window.
Oracle Data Integrator
d.
a
p

Click X to close the Define the Topology tab,


ar cens
m
i
a
l
which also closes the Start Page. If you want
(
e
l
a
to re-open the Start Page later, you can
nd ferab
a
select Start Page from the Help menu.
r P ans
a
Am on-tr
n
c.

Oracle Data Integrator

The Help Center opens with two tabs on the


right side of the ODI client.
On the Contents tab, expand the navigation
tree to see the help topics.
On the tab to the right of the Contents tab,
notice the detailed links for help on the topic
of creating and connecting to your
repositories.

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 7

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

a.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
i
u
h
t
h
e
b.
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 8

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

c.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Amd. on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 9

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 10

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

s
a
h
)
m
o
c ide
s
c
ati t G2:u
m
Practices lfor
Lesson
e den
e
t
Administering
es s StuODI
h
g
u
Repositories
hi
t
h
e
a@Chapter
us 2
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 1

Practices for Lesson 2: Overview


Practices Overview

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

In this practice, you will use SQL Developer to create database users for Master and Work
Repositories. You will then log in to ODI and connect to these repositories.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 2

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

Practices for Lesson 2: Flow of Data

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 3

Practice 2-1: Creating and Connecting to ODI Master and Work


Repositories

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

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
organization. In particular, John is responsible for data loading, transformation, and validation.
To set his ODI environment, he needs to set up security and create Master and Work
Repositories.

Background:
To set up Oracle Data Integrator, first create database users for the Master and Work
Repositories. Then, create the Master Repository, connect to the Master Repository, create the
Work Repository, and then connect to the Work repository.
In this practice, you first use SQL Developer to create the database users for the Master and
Work Repositories. Then, in ODI, you create and connect to the ODI Master Repository and the
ODI Work Repository.
Note: These are practice repositories. In later lessons, you use other Master and Work
Repositories that are partially predefined with source and target objects.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
SQL Developerand
t
p
e

s
r
a usercforen
m
Create SNPM1 database
a
li
(
e
Master Repository
l
a
d database
ab user for
nSNPW1
Create
r
a
e
f
P Repository
s
rWork
n
a
a
r
Am on-t
n
data
base
play .
png

datab0
24.gif

Oracle Data
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

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 4

Your Tasks:

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

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 Oracle SQL Developer by selecting


Start > Programs >
Oracle-OraDb11g_home1 > Application
Development > SQL Developer. When SQL
Developer starts, close the Messages Log
tab at the bottom. Also close the Start Page.

b.

Oracle SQL Developer

In Oracle SQL Developer, click + to expand


the connection Administrator. In the window
that follows, enter system in the Username
field and oracle1 in the Password field, and
then click OK.

s
a
h
)
m
o
c ide
s
a.
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Amb. on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 5

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

2.

Create the RDBMS schema or user (Oracle 11g) for the Master Repository.
Step

a.

Screen/Page Description
Oracle SQL Developer

Choices or Values
Execute the following SQL command in the
Worksheet:
create user snpm1 identified by
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
green, arrowhead-shaped Run Statement
button.
Note: In this command, password is the
value of password to connect to user
snpm1.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Grant connect privileges to the newly created
Am b.on-trOracle SQL Developer
user account by executing the following SQL
n
command:
grant connect, resource to snpm1;

c.

Oracle SQL Developer

Expand the Other Users node to verify that


the snpm1 user account was successfully
created. Minimize SQL Developer.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 6

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

a.

b.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 7

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

c.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
3.

Create the ODI Master Repository:


Step

Screen/Page Description

Choices or Values

a.

MS Windows

Start Oracle Data Integrator: Start >


Programs > Oracle > Oracle Data
Integrator > ODI Studio.

b.

Oracle Data Integrator

Open the New Gallery window by choosing


File > New.
In the New Gallery, in the Categories tree,
select ODI.
From the Items list, select the Master
Repository Creation Wizard. Click OK.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 8

The Master Repository Creation Wizard


appears.

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

c.

Master Repository Creation Wizard

In the Master Repository Creation Wizard,


note that the JDBC Driver field has the
correct selection to connect to an Oracle
database: oracle.jdbc.OracleDriver.
Edit the JDBC URL to read:
jdbc:oracle:thin:@localhost:1521:orcl
Specify the ODI client login username and
the database username by performing the
following:
Enter the username as snpm1 and the
password as password . Enter the DBA
username as system and the DBA password
as oracle1.
Click the Test Connection button and verify
successful connection. Click OK. Click Next
on the Master Repository Creation Wizard
screen.

a
s
a
h
)
comide

s
tic Gu
a
m entwindow, enter the
e
l
Master Repository Creation Wizard
In theeAuthentication
d.
st SPassword
tud as SUNOPSIS. Enter
Supervisor
e
h
s again to confirm the password.
ug SUNOPSIS
hiNext.
t
h
Click
e
a@ o us Note: Usernames and passwords are
d
n
a se t
p

case-sensitive in ODI.
r
n
a
e
m
a
Password
Storagelic
In the Password Storage window, select
e.
(
e
l
a
Internal Password Storage, and then click
nd ferab
a
Finish. When Master Repository is
P
s
r
successfully created, you will see the Oracle
a
an
Data Integrator Information message. Click
Am on-tr
OK. The ODI Master Repository is now
n
created.

f.

Message

Verify that ODI Master Repository was


created successfully, and then click OK.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 9

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

a.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
b.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 10

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
c.
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 11

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

d.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 12

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

e.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
f.
nd ferab
a
r P ans
a
Am on-tr
n

4.

Connect to the ODI Master Repository by creating a new ODI Master Login:
Step

Choices or Values

Screen/Page
Description

a.

Oracle Data
Integrator

Open the New Gallery by selecting File > New. In the New
Gallery, in the Categories tree, select ODI. From the Items
list, select Create a New ODI Repository Login. Click OK.

b.

Repository
Connection
Information

Configure the repository connection with the parameters from


this table. To enter the JDBC URL, click the button next to the
URL field and select
Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 13

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

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
successful connection and click OK. Click OK to save the
connection.
Oracle Data Integrator Connection
Parameter

Value

Login Name

Master Repository Pr 2-1

User

SUPERVISOR

Password

SUNOPSIS

a
s
a
h
)
comide
Parameter Value

s
tic Gu
a
m ent
snpm1
User
e
l
e
st Stud
e
h
Password password
ug this
h
@List Oracle
se JDBC Driver
a
Driver
u
d
n e to
a
p

ns
ar ceDriver
m
i Name oracle.jdbc.OracleDriver
a
l
(
e
l
nda ferab
a
Url
jdbc:oracle:thin:@localhost:1521:orcl
r P ans
a
r
Am on-t
Note
n
Do not copy and paste in the URL field. This may
Database Connection (Master Repository)

cause problems with entering a valid URL string.


Instead, open the drop-down menu and select the
correct driver from the list. Type the correct URL in
the Url field.
The ODI username (SUPERVISOR) is case-sensitive.

c.

Oracle Data
Integrator

Click Connect to Repository. Select the newly created


repository connection, Master Repository Pr 2-1, from the
drop-down list. Click OK. You are now successfully logged in
to the Master Repository Pr 2-1.

d.

Import Service
Description

Click the Topology tab (the tab title might appear only
partially as To ). Click the Repositories tab in the left
panel of the Topology Manager. Verify that your newly
created Master Repository is in the Repositories window.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 14

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

a.

s
a
h
)
m
o
b.
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 15

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
c.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 16

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

d.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 17

5.

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

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

a.

Screen/Page Description
Oracle SQL Developer

Choices or Values
If SQL Developer is already opened, it might
display a message about externally modified
objects. If so, click OK to close the message.
If an earlier command is in the worksheet,
clear the worksheet by clicking the Clear
button that looks like a pencil eraser.
If not opened, open SQL Developer. Create
the schema by executing the following SQL
command:
create user snpw1 identified by
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 the Run Statement button.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
d
st connect
tuprivileges
e
S
h
b.
Oracle SQL Developer
Grant
to the newly created
g
s
i
u
h
user
by
executing
the
following
SQL
h et
@
a o uscommand:
d
n
grant connect, resource to snpw1;
a se t
p

r
a cen
m
a
li
(
e
l
a
b
d SQL
aDeveloper
nOracle
c.
Run the following command to verify that the
r
a
e
f
P
s
snpw1 user account was successfully
ar tran
created and shown among other user
m
A onaccounts in the list:
n
select * from all_users;
a.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 18

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

b.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
c.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 19

6.

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

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

Step

Choices or Values

Screen/Page
Description

a.

Oracle Data Integrator

In ODI, click the Topology Navigator tab and then click the
Repositories panel.
Right-click the Work Repositories node and select New
Work Repository.
The Create Work Repository Wizard opens.

b.

Specify ODI Work


Repository Connection
Properties

In the screen that follows, enter the parameters shown in the


following table. Click the Test button. Verify successful
connection and click OK. Click Next.
Parameter Value

a
s
a
Technology Oracle
h
)
om e
c

JDBC
s
oracle.jdbc. OracleDriver
tic Guid
Driver
a
m ent
e
l
e
JDBC Url jdbc:oracle:thin:@localhost:1521:orcl
st Stud
e
h
g snpw1
u
his
t
h
User
e
a@ o us(not the default snpm1)
d
n
t
a Password
p
e

password
s
r
n
a
e
m lic
a
(
c.
In the Specify ODI Work Repository properties panel, set the
Specify
ODI
Work
le
a properties
b
d
a
Repository
ID to 1. Set the Name to WORKREP_PR2-1. In the
n
a sfer
P
Password field, enter SUNOPSIS. In the Work Repository
r
n
a
a
r
Type field, leave Development unchanged. Click Finish.
Am on-t
Verify that the newly created Work repository is now in the
n
work repositories tree view.
Note: The Development type of repository enables
management of design-time objects such as data models
and projects (including interfaces, procedures, and so on). A
development repository also includes the run-time objects
(scenarios and sessions). This type of repository is suitable
for development environments.
d.

Create Work Repository


Login

In the Confirmation window, click Yes. Enter the Login


name: Work Repository Pr 2-1. Click OK.

e.

Oracle Data Integrator

Expand the Work Repositories node and verify that the Work
repository WORKREP_PR2-1 was created.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 20

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

a.

s
a
h
)
m
o
c ide
s
c
ati t Gu
b.
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 21

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 22

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

c.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
d.
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 23

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

e.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
n
leWork repository:
e
e
7. Disconnect from the Master Repository and connect to tthe
d
tu
esChoices
S
h
Step
or
Screen/Page
g
is Values
u
h
t
h
Description
@ use
a
d
a.
Oracle Data Integrator nClick thetODI
o menu and select Disconnect Master
a
p
e
Repository
Pr 2-1.

r ens
a
m lic
a
(
a able
d
n
a sfer
P
r
b.a
Oracle
an Data Integrator Click Connect To Repository.
Am on-tr
n

c.

Oracle Data Integrator


Login

Select Work Repository Pr 2-1 from the Login Name


drop-down list. In the Password field, enter SUNOPSIS.
Click OK. Click the Designer tab. Collapse the Projects
node. The following ODI Designer screen appears.
You have now successfully created and connected to the
ODI Work repository.

d.

Oracle Data Integrator

Click ODI menu and select Disconnect Work repository


Pr 2-1.
Note: You will not be using these practice Master and
Work Repositories for the remainder of this course.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 24

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

a.

s
a
h
)
m
o
c ide
s
c
ati t Gu
b.
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
c.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 25

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
d.

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 26

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

s
a
h
)
m
o
c ide
s
c
ati t G3:u ODI
m
Practices lfor
Lesson
e den
e
t
Topology
tu
es sConcepts
S
h
g
u 3 thi
h
Chapter
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 1

Practices for Lesson 3: Overview


Practices Overview

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

In this practice, you set up and install an ODI Agent as a background service.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 2

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

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

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:
A common task in ODI is to set up and install an ODI Agent as a service. After the ODI
scenarios are created, they can be scheduled and orchestrated by using an ODI Agent, which is
a lightweight Java process that orchestrates the execution of ODI scenarios. In this practice,
you create and execute an ODI Agent, which will be used in subsequent practices for
orchestration of the execution of ODI objects.
First, you run encode <password> to generate an encrypted password.
You copy and paste that string into the odiparams.bat file that contains ODI agent parameters.
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
the Global context as the context in which to make this particular mapping of logical to physical
agents.
In the command window, you execute agent.bat to start the agent that you named localagent.
In ODI, you test a connection to your newly created agent.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

The directions on the following pages will take you through these activities:
1. Run encode oracle1 to generate an encrypted password string
2. Edit odiparams.bat, inserting the encrypted password
3.
4.
5.
6.

In ODI, define a physical agent named localagent


In ODI, define a logical agent named localagent, mapping it to the physical agent named
localagent for the Global context
Execute agent.bat to start an agent named localagent.
Verify connection to the newly created agent localagent in ODI

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 3

Your Tasks:
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:

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

Step
a.

Choices or Values

Screen/Page
Description
MS Windows and
text editor

Open the Windows Explorer, and navigate to the ODI_HOME


directory, where ODI is installed and open the agent\bin
subdirectory:
(C:\oracle\Middleware\Oracle_ODI1\oracledi\agen
t\bin). Navigate to the odiparams.bat file, right-click this
file, and select Edit to open it with a text editor. Leave this editor
open. You will run a batch file from a Command window and
return to this text editor to copy the results into the
odiparams.bat file.
Explanation: You need to edit the odiparams.bat file to set
the repository connection information for the ODI Agent to use.
The password information is stored as an encrypted string. You
will generate the encrypted string in a Command window.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
d
t
sopen,
tuopen
e
S
b.
Command Prompt
Leave the text editor
and
the Command window
h
g
s
i
u
h
(Start > Run
>
cmd).
Change
the
directory
to the
h et
@
ODI_HOME\agent\bin
directory:
a o us
d
n
C:\oracle\Middleware\Oracle_ODI1\oracledi\agent
a se t
p

r
a c\bin
en
m
i
a
l
( Promptle To generate the encrypted password string, you will be using
c.
Command
a
d
the agent command, encode <password>. Because your
n ferab
a
password is oracle1, enter and execute the following
r P ans
a
command in the Command window and press ENTER:
Am on-tr
n
encode oracle1
Note: Keep the Command window open, because you will be
returning to it after editing the odiparams.bat file.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 4

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

d.

Command Prompt
and text editor

Copy the generated, encrypted password from the Command


window (from the Command windows drop-down menu, select
Edit > Mark, then highlight the password with your mouse; then
select Edit > Copy) and insert it into the odiparams.bat file
as the value for the ODI_MASTER_ENCODED_PASS parameter
(overwriting the existing password). 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

ODI_MASTER_URL

jdbc:oracle:thin:@localhost:1521:orcl

ODI_JAVA_HOME

c:\oracle\Middleware\jdk160_29

a
s
a
ODI_MASTER_USER
DEV_ODI_REPO ) h
om e
c

s
idpassword.
ODI_MASTER_ENCODE Inserttyour
ic encoded
u
a
G
D_PASS
(overwrite
m enthet existing password)
e
l
e
st Stud
e
h
ODI_SECU_WORK_REP
ug this WORKREP
h
@ use
a
d
nODI_SUPRVISOR_ENC
to
a
p
e

Leave the default value.


ns
ar ceODED_PASS
m
(a le li
a
nd ferab
Leave the default value.
ODI_USER
a
P
s
ar tran
m
ODI_ENCODED_PASS Leave the default value.
A onn
Note

DEV_ODI_REPO is an RDBMS schema/user (Oracle


11g) for the Master Repository. It was pre-created for
this and subsequent practices.
The Work Repository name is WORKREP.
Because each time that you encode the password, it
receives different values, your encoded password will
differ from the one provided in the screen.
Do not change the default value of the ODI_USER and
ODI_ENCODED_PASS parameters. Those parameters
were pre-coded during ODI installation.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 5

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

a.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
b.
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
c. r P
s
n
a
a
r
Am on-t
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 6

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

d.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 7

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
P ns
ar that
2. m
Now
generated an encoded password and pasted it into the
ra havefile,
tyou
A odiparams.bat
need to create the ODI physical and logical agent definitions. To
n
no these ODI agentyoudefinitions,
create
perform the following steps:
Step

Choices or Values

Screen/Page
Description

a.

MS Windows
ODI Login

If it is not started, start Oracle Data Integrator. Click Connect


To Repository. Select DEV_ODI_REPO from the Login Name
drop-down list. Click OK.

b.

Topology navigator

Click the Topology navigator tab. In the Topology navigator,


select the Physical Architecture panel. Right-click the Agents
node. Select New Agent.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 8

Step

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

c.

Choices or Values

Screen/Page
Description
Agent: localagent

Fill in the following fields:


Name: localagent
Host: Network name or IP address of the machine that the
agent has been launched on. Verify that this parameter is set
to localhost.
Port: Listening port used by the agent. By default, this port is
20910. Leave the default value.
Web Application Context: Name of the Web application
corresponding to the Java EE agent deployed on an
application server. For stand-alone agents, this field should be
set to oraclediagent.
Set Maximum number of sessions supported by this agent to
250. Click the Save button.

a
s
a
h
)
om Architecture,

d.
Topology Navigator Now you have to insert a logical agent in
cLogical

e
s
d
i
c
and map it to the newly created Physical
agent.
u At the bottom
Local Agent: New
ati the tLogical
G
of the Topology navigator tab,
click
Architecture
m
nLogical Agent.
leselectdNew
e
tab. Right-click Agentste
and
On the
u
s
t
e
screen that follows,
set
the
Name
to
localagent.
For
the
S
h the Physical
g
s
i
u
Global context,
set
Agents column to
h
t File menu,
h Frome the
localagent.
click Save. Close the
@
s
a otabuthat
d
localagent
you
just
worked
on, leaving the other
n
t tab open.
a
p
e

localagent
ar cens
m
(a le li
a
a.
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 9

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

b.

c.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
d.
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 10

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

3.

Now that you have created the agent and defined the ODI physical and logical agents, you
can start the agent directly from the command line.

a
s
a
h
Step
Choices or Values
Screen/Page
)
Description
comide

s
tic you G
a.
Command Prompt
Switch back to the Command window
leftuopen at the
a
t
m
ODI_HOME\agent\bin directory
le den
e
t
(C:\oracle\Middleware\Oracle_ODI1\oracledi\agen
es s Stu file by using the following
h
t\bin). Execute
the agent.bat
g
hi
t
command:hu
e
a@
agent
-NAME=localagent
us
d
n
o
t
rpa ense
a
b.
Services am
icThe agent is now starting. Verify that ODI Agent is successfully
l
(
e
l
started. Minimize (do not close) the window Command
nda ferab
Prompt agent-NAME=localagent.
a
P
s
r
Note: This command window should remain open during all
a
an
labs.
Am on-tr
nc. Oracle Data
In ODI, in the localagent tab that remains open, click the
Integrator

Test icon to verify connection of the agent localagent.


You successfully created and connected to ODI agent. Close
the localagent tab

. Also, close the

Messages - Log

tab.

a.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 11

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

b.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 12

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

c.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 13

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 14

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

s
a
h
)
m
o
c ide
s
c
ati t G4:u
m
Practices lfor
Lesson
e den
e
t
Describing
tuPhysical and
es s the
S
h
g
i
u
Logical
hArchitecture
t
h
e
a@Chapter
us 4
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 1

Practices for Lesson 4: Overview


Practices Overview

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

In this practice, you define the work infrastructure in the topology by creating contexts, a data
server, and physical and logical schemas.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 2

Practice 4-1: Working with Topology

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

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
server, and physical and logical schemas.

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:

a
s
a
h
)
SALES_DEV
Schema storing the target tables for development
comide

s
purposes
tic Gu
a
t tables
m etarget
SALES_PROD
Schema storing the production
n
e
l
e
t to store
sused
tudODI temporary objects
STAGING
Schema that is
e
S
h
(not used
ugin thistpractice)
his
h
e
@ uschemas
s
aphysical
Both the SALES_DEV and SALES_PROD
contain identical table structures
d
n
o
t
and correspond to the same logicalaschema called
ORACLE_ORCL_LOCAL_SALES. The
p non
sethe context.
rdepends
mapping for this logical schema
a
e
m tasksliisccritical for all subsequent practice sessions.
a
Note: Completing(these
a able
d
n
a sfer
P
r
a
an
Am on-tr
n
Schema

Description

This practice consists of the following six steps:


1. Define the Production context.
2. Define the Development context. (A third context, Global, is already preseeded for you.)
3. Define the ORACLE_ORCL_LOCAL data server.
4. Define the ODI physical schemas for the data server: SALES_DEV, SALES_PROD.
Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 3

5.
6.

Define the ORACLE_ORCL_LOCAL_SALES ODI logical schema.


Map the logical schema to the two physical schemas, in terms of the three contexts.

Your Tasks:

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

1.

If not started, start Oracle Data Integrator and open the DEV_ODI_REPO connection. If
ODI remains open, skip to step 2.
Note: The username and password are case-sensitive.
a. Select Start > Programs > Oracle ODI11g-Home > Oracle Data Integrator > ODI
Studio. Click Connect To Repository.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 4

b.

Log in with the following details. Click OK.


Login name: DEV_ODI_REPO

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

User: SUPERVISOR
Password: SUNOPSIS

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

2.

Create a new context:


a. Click the Topology navigator tab, and then click the Contexts tab to expand it.

b.

Click the New Context icon

on the Contexts tab, and then select New Context.

c.

Enter your context parameters as shown below. The context window should appear as
follows.
Name: Production
Code: PRODUCTION
Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 5

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

Password: Leave this field empty.


Default: Select this check box, and click Yes to confirm in the pop-up window.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
d. Click the Save button.
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
d rab
nanother
a
e. Create
P nsfenew context , repeating the operations:
rName:
a
Development
-traDEVELOPMENT
Am oCode:
n
n Password: Leave this field empty.
Default: Leave the check box deselected.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 6

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

The contexts should appear as follows:

3.

Create an ORACLE_ORCL_LOCAL data server:


a. Click the Physical Architecture tab. Expand the Technologies node, scroll down
and select the Oracle node, and then right-click and select New Data Server.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

b.

Enter the following information on the Definition tab:


Name: ORACLE_ORCL_LOCAL
Instance / dblink (Data Server): ORCL
Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 7

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

User: ODI
Password: ODI

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
uto the right
hiof the JDBC Driver field. In the
c. Click the JDBC tab. Click the
button
t
h
e
window that appears, select Oracle
Driver,
s and then click OK.
a@JDBC
u
d
n
o
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 8

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

d.

Click the
button to the right of the JDBC URL field. In the URL examples window,
select the first URL in the Name list, and click OK.

s
a
h
)
m
o
c ide
e. Edit the JDBC URL to have the following:
s
c
i
u
URL: jdbc:oracle:thin:@localhost:1521:ORCL at
G
t
m
le den
The JDBC tab should now appear as follows:
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 9

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

4.

Test this data server:


a. Click the Test Connection button. In the Confirmation dialog box, click OK to confirm
saving your data before testing the connection. In the Information window, click OK.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
b.

In the Test Connection dialog box, click the Test button. In the Information dialog
box that reports a successful connection, click OK.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 10

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

5.

Create a physical schema for the newly created ORACLE_ORCL_LOCAL data server. Name
the physical schema ORACLE_ORCL_LOCAL.SALES_DEV with the following parameters:

Data Schema: SALES_DEV

Work Schema: STAGING

Default check box: Selected

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

a.

Expand the Oracle node. Right-click the newly created data server
ORACLE_ORCL_LOCAL, and then select New Physical Schema.

b.

In the new window that appears, select SALES_DEV from the Schema (Schema)
drop-down list, and then select STAGING from the Schema (Work Schema)
drop-down list. Select the Default check box. In the Confirmation window that appears,

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 11

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

click OK. Leave all the other fields unchanged. Click the Save button
the Information window that appears.

. Click OK in

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
i
u ThethPhysical
h
c. Expand: Oracle > ORACLE_ORCL_LOCAL.
schema
e
@
s
a
ORACLE_ORCL_LOCAL.SALES_DEV
appears
in
the
tree
view:
d to u
n
a
rp ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

6.

Create a second physical schema for the ORACLE_ORCL_LOCAL data server. Name it
ORACLE_ORCL_LOCAL.SALES_PROD:

Data Schema: SALES_PROD

Work Schema: STAGING

Default Schema: Not selected


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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 12

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

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-down list. Confirm that the Default check box is not selected, and leave all the

s
a
h
) click
m
other fields unchanged. Click the Save button . In the Information window,
o
c ide
OK.
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 13

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

7.

Create 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

a.

Global Context: To the ORACLE_ORCL_LOCAL.SALES_DEV physical schema


In Topology Manager, select the Logical Architecture tab and expand the
Technologies node. Select Oracle, right-click and select New Logical Schema.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
b. Enter the name of the logical schema: ORACLE_ORCL_LOCAL_SALES.
To map this
g
i from the drop-down
u contexts,
h
t
logical schema to physical schemas inhdifferent
lists,
@ forueach
se context, as shown in the following
a
select the appropriate physicaldschema
n e to
screen. Click the Save button.
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n
8.

The logical schema FILE_DEMO_SRC is predefined for you and is mapped in the
predefined Global context to a physical schema that represents a subfolder in a file system.
Map FILE_DEMO_SRC to the same physical schemas in the new Development and
Production contexts that you defined earlier.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 14

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

a.

In the Logical Architecture, expand the File node, and double-click the
FILE_DEMO_SRC logical schema. Ensure that the logical schema FILE_DEMO_SRC
is mapped to the physical schemas in the Development, Global, and Production
contexts, as follows. Click the Save button.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
t logical schemas:
a the following
b. Repeat the previous step
for
p
e

s
r
a theclogical
en schema XML_DIM_GEO should be mapped to the

In XML technology,
m
i
a
l
(
physical
schema
as follows. Click the Save button.
e
lXML_GEO_DIM.GEO,
a
b
d
a
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 15

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

In Hypersonic SQL, the logical schema HSQL_DEMO_SRC should be mapped to


the physical schema HSQL_LOCALHOST_20001_Default in all contexts.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
is

In Hypersonic SQL, the logical schema


should be mapped to
ug HSQL_DEMO_TARG
h
t
h
e
the physical schema HSQL_LOCALHOST_20002_Default,
as follows.
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 16

Note: Ensure that these mappings are similar in the three contexts. Close all the tabs, as
shown. If you are prompted to save your changes, click Yes.

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

9.

You have set up ODI agent localagent in Practice 3-1. Now, link the Logical agent to the
Physical agent in all three contexts and test the connection.
a. In the Physical Architecture, expand the Agents node, and open the Physical agent
localagent. Similarly, open the Logical agent, localagent, in the Logical Architecture.
Ensure that this Logical agent, localagent, is linked to Physical agent localagent in all
three contexts as follows. Save your changes.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 17

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

b.

In the Physical agents localagent tab, click Test, and verify successful connection.
Click OK, and then close all the tabs.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 18

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

s
a
h
)
m
o
c ide
s
c
ati t G5:u
m
Practices lfor
Lesson
e den
e
t
Setting
tu ODI Project
esUps aSNew
h
g
u 5 thi
h
Chapter
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 1

Practices for Lesson 5: Overview


Practices Overview

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

In this practice, you create a new ODI project and import Knowledge Modules that will be used
in subsequent practice sessions.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 2

Practice 5-1: Setting Up a New ODI Project

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

Use Case Scenario:


John is responsible for an integration project, which includes data loading, transformation, and
validation. He created contexts, a data server, and physical and logical schemas in the
Topology. To start an integration project, John needs to create a new ODI project and import
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
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

Your Tasks:
1.

Create a project, HandsOnLoads, with a folder called HandsOn.


a.

In Designer Navigator, click the Projects tab, click the New Project
select New Project.

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 3

icon, and then

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

b.

Enter the name of the project: HandsOnLoads. The Code field is automatically filled
with your Name field entry.

c.

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p
d. ODI creates a folder named
FirstFolder.
Double-click this folder. In the editing window

sthe Name
rthe name
n
a
that appears, change
in
field to HandsOn. Click Save.
e
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 4

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

2.

Import the knowledge modules that are required for working with the following technologies:
Sources:
Hypersonic SQL, XML, File

Targets:
Oracle

a.

Select the HandsOnLoads project node. Right-click, and then select Import > Import
Knowledge Modules.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 5

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

b.

The Import Knowledge Modules (XML File) window appears. The File import directory
field is filled with the path to an XML-reference folder.

a
s
a
h
)
om
c. Select the following knowledge modules that will be used in this project.
Use theCtrl
c

s
de your
key and scroll down the list to make multiple selections. Be very
careful
in
making
i
c
i
u
t
a similart names.
G Click OK.
selections, as there are several knowledge modules thatm
have
n
e
l
CKM HSQL
te tude
s
e
h is S
CKM Oracle
g
u
th AW Incremental Update)
h IKM Oracle
IKM Oracle Incremental Update (not
e
@
a o us
d
IKM SQL Control Append
n
a se t
LKM File to SQL rp
a
en
LKM SQL(a
tom
Oracle lic
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 6

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

d.

Review the Import Report, and then click Close.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
n nodes under
e. Check the imported knowledge modules by expandingle
corresponding
e
e
d
t
HandsOnLoads > Knowledge Modules, as shown
tu
eshere:
S
h
g
u
his
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 7

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

Close the HandsOnLoads and HandsOn tabs.

3.

Now, look at global knowledge modules. Introduced in ODI 11.1.1.6, global knowledge
modules enable you to share specific knowledge modules across multiple projects.
In previous versions of ODI, knowledge modules were always specific to a project and
could only be used within the project into which they were imported.
A best practice is to import as global knowledge modules those that will be frequently
used by multiple projects.
- One benefit is that you only need to import the knowledge module once, rather than
import it into each project using it.
- Another benefit is that if you need to modify the knowledge module, the modification
will propagate to all projects using the knowledge module.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 8

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

a.

In the Designer navigator, expand the Global Objects tab. Expand the Global
Knowledge Modules node.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 9

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

b.

Right-click Loading (LKM) and select Import Knowledge Modules.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

c.

The Import Knowledge Modules (XML File) window appears. Scroll down the list and
select IKM SQL to SQL Control Append. Click OK.

d.

The Import Report appears, showing IKM SQL to SQL Control Append. Click CLOSE.

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 10

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

e.

In the Global Knowledge Modules node, expand Integration (IKM). Observe the IKM
SQL to SQL Control Append knowledge module is ready to be shared among multiple
projects.

a
s
a
h
)
mwill not
Note: This example is to practice creating global knowledge modules. o
be

c You

e
s
using this knowledge module in subsequent lab practices.
tic Guid
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 11

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 12

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

s
a
h
)
m
o
c ide
s
c
ati t G6:u
m
Practices lfor
Lesson
e den
e
t
Oracle
Integrator
Model
tu
esData
S
h
g
u
Concepts
his
t
h
e
a@Chapter
us 6
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 1

Practices for Lesson 6: Overview


Practices Overview

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

In this practice, you create the models corresponding to the data, and reverse-engineer the
schemas data structures.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 2

Practice 6-1: Creating a Model

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

Use Case Scenario:


John created a new ODI project and imported knowledge modules that will be used for the
development of his integration project. Now, John needs to create new ODI Models and
reverse-engineer all tables and files into the models.

Background:
In the previous practice, you configured the schemas containing the application data stored in
the Oracle database. You now create the Oracle Sales Application model corresponding
to this data and reverse-engineer the schemas data structures. You also reverse-engineer the
structure of an XML file to a Geographic Information model that you define.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 3

Your Tasks:

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

1.

Start the ODI Demo source environment: Select Start > Programs > Oracle > Oracle Data
Integrator > Shortcut to start the demonstration. If the Open File Security Warning
window appears, click Run. The OracleDI Demo Source command shell window and
two other command shell windows open.

a
s
a
h
)
comide

s
The ODI startdemo demonstration environment provides databases
contain
ic that
u some
t
a
G
of the data used in this courses practices. Source and target
data servers,
as well as a
t
m
e den
demonstration repository data server, are started. tel
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
Note: You should keep these three command shell windows running (minimized) for all
remaining lab practices in this course, along with the localagent command shell
window.

2.

Create a model for the Oracle schema.


a. In the Designer Navigator, click the Models tab.

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 4

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

b.

Click the New Model

icon and then select New Model.

c.

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


Name: Oracle Sales Application
Code: ORACLE_SALES_APPLICATION
Technology: Oracle
Logical Schema: ORACLE_ORCL_LOCAL_SALES
The Definition tab should appear as shown:

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 5

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

d.

Click the Reverse Engineer tab, and select Development from the Context drop-down
list. Click Save.

a
s
a
h
)
comide

s
tic Gu
3. Reverse-engineer all the tables in this model.
a
t
mReverse
n
a. Right-click Oracle Sales Application model and selectlthe
Engineer option. If
e
e
e
the Confirmation window appears, click Yes.
st Stud
e
h
Note: The progress of the reverse-engineering
ug process
his is shown on the status bar.
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 6

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

b.

Verify the model reverse-engineered successfully. In the tree view, expand the Oracle
Sales Application model. The datastores of the model appear.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 7

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

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 reverseengineered for the TRG_CUSTOMER table correspond to its data definition language (DDL)
given below. Close the tabs.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
-tr table TRG_CUSTOMER (
Am oCreate
n
n CUST_ID
NUMERIC(10) not null,
DEAR
VARCHAR(4),
CUST_NAME
VARCHAR(50),
ADDRESS
VARCHAR(100),
CITY_ID
NUMERIC(10) not null,
PHONE
VARCHAR(50),
AGE
NUMERIC(3),
AGE_RANGE
VARCHAR(50),
SALES_PERS
VARCHAR(50),
CRE_DATE
DATE,
UPD_DATE
DATE,
constraint PK_TRG_CUSTOMER primary key (CUST_ID),
constraint FK_CUST_CITY foreign key (CITY_ID)
references TRG_CITY (CITY_ID));

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 8

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

4.

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


As it references TRG_CUSTOMER, it also appears here.
Create a model for an XML file.
a.

Click the New Model

icon and then select New Model.

b.

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


Name: Geographic Information
Code: GEOGRAPHIC_INFORMATION
Technology: XML

s
a
h
)
m
o
c ide
s
c
Logical Schema: XML_DIM_GEO
ati t Gu
m
n tab.
c. The Definition tab should appear as below. Click the Reverse
le dEngineer
e
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 9

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

d.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

5.

Reverse-engineer all the tables in this model.


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

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 10

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

b.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

6.

Open the XML file GEO_DIM.xml corresponding to the XML model that you have reverseengineered. 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.
c. The XML file opens in Internet Explorer. The file structure appears as shown here:

The file hierarchy is GEOGRAPHY_DIM > country > region > city > and so on.

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 11

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

7.

Compare the XML file content with the reverse-engineered structure in the Hierarchical
view. In Designers tree view, expand the Geographic Information node, and then the
Hierarchy node. Expand the datastores under this node.

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.

s
a
h
)
m
o
c ide
s
c
Close the Geographic Information model tab
ati t .Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 12

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

s
a
h
)
m
o
c ide
s
c
ati t G7:u
m
Practices lfor
Lesson
e den
e
t
Organizing
tu Models and
es s ODI
S
h
g
i Datastores
u
Creating
hODI
t
h
e
a@Chapter
us 7
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 1

Practices for Lesson 7: Overview


Practices Overview

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

In this practice, you check the quality of data in the models and define constraints on these
models.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 2

Practice 7-1: Checking Data Quality in the Model

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

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.

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 tables CITY_ID column by
using SRC_CITY as the parent table.
Next, you create a condition constraint on the SRC_CUSTOMER table:
Length(SRC_CUSTOMER.PHONE) > 6
Note: Completing this practice is critical for all the following practice sessions.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 3

Your Tasks:

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
d of HSQL_SRC
ab
nCopy
b. Open
and rename it as HSQL Orders Application. For Code,
r
a
e
f
P
s
enter
HSQL_ORDERS_APPLICATION.
Click Save to save the model. If you get a
r
n
a
a
r
-t message, click Yes to finish saving.
Am owarning
n
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 4

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
2. Create a Reference
constraint
the SRC_CUSTOMER and SRC_CITY datastores in
ab between
nd This
r
a
e
the new
model.
reference
is
on
the
CITY_ID column.
f
r P ans
a
Am on-tr
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 5

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

a.

Expand the HSQL Orders Application model, and expand the SRC_CUSTOMER
datastore.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
tuReference option.
es the
S
h
b. Select the Constraints node, right-click, and
select
New
g
u
his
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 6

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

c.

From the Table drop-down list, select the SRC_CITY table. The name of the constraint
is automatically generated. Click the Columns tab.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
d.

Click the
Add icon, and use drop-down lists to select the CITY_ID column for both
tables of reference. (Note that the Primary Table column is City, which you want to
also change to CITY_ID.) Click Save.

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 7

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

3.

Create a Condition constraint on SRC_CUSTOMER to check that the phone number contains
six or more characters.
a. Select the Constraints node again for SRC_CUSTOMER, right-click, and select the New
Condition option.

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:
LENGTH(SRC_CUSTOMER.PHONE) > 6

s
a
h
)
In the Message field, enter A phone number should containom
more than
c ide
s
characters.
c
u
ti
a
G
t
m
Note: You can also use the Expression Editor icon
n edit the
leto graphically
e
e
d
t
expression.
es s Stu
h
g
u expression
hi syntax.
b. Click the Validation icon
to validate
your
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 8

a
6

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

On the Oracle Data Integration Information screen, click OK. Click Save to add the
condition, and then close the tab.

4.

Run a static check on the HSQL Orders Application model.


a. Select the HSQL Orders Application model tab and click the Control tab.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
-trthe knowledge module CKM HSQL.HandsOnLoads. Click Save. Close the
Amb. oSelect
n
n HSQL Orders Application model tab.

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 9

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

5.

Select the HSQL Orders Application model in the tree view, right-click, and select Control
> Check.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
tu then click OK.
a. In the Execution dialog box, select Development
and
escontext
S
h
g
u
his
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
b. Click OK when the Information dialog box notifies you that the session has started.

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 10

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

6.

Click the Operator Navigator icon tab


. The Operator window appears.
Click the Hierarchical Sessions tab. Expand the All Executions node. Expand the HSQL
Orders Application session. Expand its Steps node. The session should appear complete,
containing steps marked with check marks and warnings, as shown here.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
Note: You can optionally review the content of this session and see the different SQL
commands issued to perform the check operations.

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 11

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

7.

Review the errors detected in the SRC_CUSTOMER datastore.


a. Click the Designer navigator tab. On the Models tab, expand the HSQL Orders
Application model, select the SRC_CUSTOMER datastore, right-click, and select
Control > Errors.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
ablists the errors detected in your table. You have one join error and
ndtablefethat
r
a
b. View
the
P invalid
s phone numbers. Each line also contains the content of the invalid record.
rseven
n
a
a
r
Am on-t
n

c.

Close these tabs.

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 12

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

s
a
h
)
m
o
c ide
s
c
ati t G8:u ODI
m
Practices lfor
Lesson
e den
e
t
Interface
tu
es Concepts
S
h
g
u 8 this
h
Chapter
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 1

Practices for Lesson 8: Overview


Practice Overview

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

In this practice, you create simple interfaces, run these interfaces, and verify the execution.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 2

Practice 8-1: Creating ODI Interface: Simple Transformations

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

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.
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.
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.
The third interface, INT_8-3, loads the TRG_COUNTRY datastore in the Oracle Sales
Application model with the content of the SRC_CITY table from the HSQL Orders Application
model. In this interface, flow control is activated, constraints in the target table are checked, and
city population values are transformed from individual to times 1,000.
Note: Completing this practice is critical for other practice sessions.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 3

Your Tasks:

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

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 option.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hofi the interface. Ensure that the
t
b. In the Interface window, enter INT_8-1has the name
e
a@theoMapping
Optimization Context is Global.dClick
us tab.
n
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 4

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 5

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

d.

Expand the HSQL Orders Application model and drag the SRC_REGION datastore
from the model tree to the Sources zone of your diagram (the panel to the left of the
target panel). An Automap dialog box appears. Click Yes. Now the system
automatically maps fields in the source and target datastores.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 6

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

e.

Click the Flow tab. After the flow diagram initializes, you may want to use the zoom-out
button to see all the objects in the diagram. Within the diagram, click the box for Target
+ Staging Area that is labeled Target (ORACLE_ORCL_LOCAL), then in the Target
Area Property Inspector panel, select the Distinct Rows check box. If open, click the
button to minimize the Messages log. Your screen now looks as shown here.
Note: Confirm that the Distinct Rows check box is selected.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 7

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

f.

2.

Click Save to save your interface. If the Locking Object window appears, select Dont
show this window next time, and click Yes.

Run this interface, and check the content of the TRG_COUNTRY table.
a. Expand the Interfaces node, right-click the newly created interface INT_8-1, and then
select Execute.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 8

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

b.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
tuThe Operator window
esNavigator.
S
c. Click the Operator tab to open the ODI Operator
h
g
u
his
appears.
t
h
e
ato@clicko the
usRefresh button to view the new
d
n
Note: In Operator, you may
need
t
session.
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 9

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

d.

In the Session List tab, expand the All Executions node. The session called INT_81 should appear complete. Expand this session in the tree view as shown:

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 10

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

e.

In your interface window, click the Mapping tab. In Target datastore


TRG_COUNTRY, right-click COUNTRY, and then select Data.

s
a
h
)
m
o
f. A window appears with the loaded data.
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 11

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

g.

3.

Verify your data and close this window. Close INT_8-1 tab. If the Unlocking Object
window appears, select Dont show this window next time check box and click Yes.

Create an interface called INT_8-2 that loads the TRG_REGION datastore in the Oracle
Sales Application model with the content of the SRC_REGION table from the Orders
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. Click the Designer tab. Expand the Projects tab, the HandsOnLoads project, and the
HandsOn folder. Expand the Interfaces node and select INT_8-1. Right-click and
select Duplicate Selection, and then click Yes in the confirmation box. A copy of your
interface appears.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 12

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

b.

Double-click the interface Copy of INT_8-1 to edit it.

s
a
h
)
m
c. In the Name field, change the name to INT_8-2, and then click the Mapping
o

c idtab.
e
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
d.

Click the perform layout button


Confirmation window, click Yes.

to customize the view of the Source zone. In the

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 13

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

e.

In the Designer, click the Models tab, and then drag the TRG_REGION datastore from
the Oracle Sales Application model to the Target Datastore zone. Leave the source
datastore unchanged. Click Yes to perform automatic mapping.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 14

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 15

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

f.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 16

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

g.

Click the Controls tab. Ensure that the selected knowledge module in the CKM
Selector is CKM Oracle. In the Constraints section, the value for each Constraint
should be true.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
h. Click Save to save your p
interface.

r
a cen
m
i content of the TRG_REGION table.
a
lthe
(and check
4. Run this interface,
e
l
a
nd ferab
a. ClickaExecute.
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 17

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

b.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 18

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

5.

In ODI Operator, verify that your new interface executed successfully. You may need to
refresh the list by contracting and then expanding the All Executions node in the Session
List:

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
d rab
anInterface
a. InP
the
ewindow, click the Mapping tab. Select the TRG_REGION target
f
s
r
n(click the name of the datastore), right-click, and select Data. A window
a datastore
awith
r
t
the loaded data.
Am oappears
n n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 19

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

b.

Verify the data, close this window, and then close your interface INT_8-2.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
6. Create an interface called INT_8-3 that loads the
in the Oracle Sales
isfromdatastore
ug TRG_CITY
h
t
h
Application model with the content of the SRC_CITY
table
the
HSQL
Orders
e
@
s
a
Application model. Ensure that flowdcontrol is activated
and all constraints in the target table
u
n
o
t
a
are checked. You need to transform
the
city
population
values because the target table unit
e source table unit
s
rpwhereas
is thousands of inhabitants,
the
is inhabitants.
n
a
e
m
c
i
a
l
a. If not open, click
and click the Projects tab. Expand
( the Designer
e and thetab,HandsOn
l
a
b
d
HandsOnLoads
project
folder. Right-click the Interfaces node and
a
nNew Interface.
r
a
e
select
f
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 20

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

b.

In the Interface Definition tab, enter the name INT_8-3, and keep the default
Optimization Context selection, Development. Click the Mapping tab.

s
a
h
)
m
o
c ide
s
c
u
ati t Sales
G
c. If not open, click the Models tab. In the tree view, expand
the Oracle
m
n
le the tree
e
Application model. Drag the TRG_CITY datastorete
from
view to the Target
d
s Stu
ezone.
Datastore zone. The datastore appears in this
h
g
u
his
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 21

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
d.

Expand the HSQL Orders Application model and drag the SRC_CITY datastore from
the model tree to the Sources zone of your diagram. Click Yes to perform Automatic
Mapping.

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 22

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

s
a
h
e. Select the POPULATION column in the target datastore.
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
f.

In the Mapping Properties section of the Property Inspector, in the Implementation


tab, edit the expression to populate the POPULATION column with the number of
thousands of inhabitants rounded to the nearest thousand. Edit the expression to have
the following: FLOOR(SRC_CITY.POPULATION/1000)
Note: You use the FLOOR function to perform rounding.

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 23

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

g.

To verify the expression, click Check the Expression in the DBMS button
OK.

. Click

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 24

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

h.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 25

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

i.

Click the Controls tab. Ensure that the selected CKM is CKM Oracle. The value for
each Constraint should be true. Click Save to save your interface. Close your
interface editor tab.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p
7. Change an HSQL Data Server
setting,
to deal with a batch processing compatibility issue

sHSQL
n
ar version
e
between ODI and them
latest
of
Demo.
c
i
a
l
(
a. In Topology
leclick the Physical Architecture tab, expand Technologies,
a Manager,
b
d
a
n
expand
Hypersonic
SQL,
and double-click the HSQL_LOCALHOST_20001 data
a sfer
P
server.
ar tran
m
A onn

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 26

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

b.

In the Definition tab, increase Array Fetch Size and Batch Update Size from 30 to 300.
Click Save.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug thistable.
8. Run this interface, and check the content ofhthe TRG_CITY
@ interface
se INT_8-3, and then select Execute.
a
u
a. In the Designer Projects tab,
right-click
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 27

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

b.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
i
huthat eyourthinterface
c. Open the Operator Navigator and@
verify
session executed
s
a
u
d
successfully:
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 28

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

Note: In Operator, you may need to click the Refresh button

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 29

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

d.

In the Designer navigator, open the Models tab. In the Oracle Sales Application
model, right-click the TRG_CITY datastore and select the Data option. A window
appears with the loaded data. Scroll down and view the total number of loaded records
and loaded data.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 30

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

e.

Verify the data, and then close this window.


Note: The POPULATION column should show thousands of inhabitants.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 31

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 8: ODI Interface Concepts


Chapter 8 - Page 32

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

s
a
h
)
m
o
c ide
s
c
ati t G9:u
m
Practices lfor
Lesson
e den
e
t
Designing
tu
es sInterfaces
S
h
g
u 9 thi
h
Chapter
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 1

Practices for Lesson 9: Overview

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

Practices Overview
In Practice 9-1, you create an interface with several sources. In Practice 9-2, you implement a
lookup by using the Interface created in the previous practice, perform execution simulation, and
run the newly created Interface.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 2

Practice 9-1: Creating ODI Interface: Complex Transformations

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

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,
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.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
tr
Your
Am Tasks:
n
no an interface called INT_9-1, loading the TRG_CUSTOMER datastore in the Oracle
1. Create
Sales Application model.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 3

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

a.

In ODI Designer, click the Projects tab, and then the Interfaces node. Right-click and
select New Interface.

a
s
a
h
)
comide

s
u
tic to Development,
b. In the Interface window, enter INT_9-1, set Optimization Context
a
G
t
m
and then click the Mapping tab.
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 4

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 5

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

d.

In the Design navigator Models tab, expand the FLAT_FILE_SRC model. Drag the
SRC_SALES_PERSON datastore to the Sources zone of your diagram.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 6

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n tab,eexpand
to the HSQL Orders Application model and
a
e. In the Design navigator
Models
p

ns to the Sources zone of your diagram. Click Yes


ar cdatastore
drag the SRC_CUSTOMER
e
m
li If necessary, rearrange the datastores. Your diagram
(a lmapping.
to perform Automatic
e
a
d rathebfollowing:
shouldnresemble
a
r P ansfe
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 7

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

a.
s
a
hcolumn
f. Staying within the Sources zone of your diagram, drag the SALES_PERS_ID
)
from the SRC_CUSTOMER source datastore to the ID column of the om

c sources.
e
SRC_SALES_PERSON datastore. A join appears between thesestwo
d
i
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 8

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

a
s
a
h
)
to
comdatastore
g. Select and drag the CUSTID column from the SRC_CUSTOMERs
source

e
d
i
c
the CUST_ID column in the TRG_CUSTOMER target datastore.
Select the
u CUST_ID
ati Inspector
G
t
column in the Target Datastore zone. The CUST_ID eProperty
panel shows
m
n
l
e
e
the mapping.
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 9

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

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 CUST_NAME
Property Inspector panel changes to show an empty Implementation tab in the
Mapping Properties section.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

Note: You may find it useful to select the Freeze View button
before you perform the
next step.
i. Drag the FIRST_NAME and LAST_NAME columns from the SRC_CUSTOMER
source to the Mapping: CUST_NAME Implementation Tab field, and then edit the
mapping to have the following mapping expression:
INITCAP(SRC_CUSTOMER.FIRST_NAME) || ' ' ||
INITCAP(SRC_CUSTOMER.LAST_NAME)

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 10

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

Note: Ensure that the Active Mapping check box is selected for the CUST_NAME
column of the target datastore.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

j.

Scroll down and select the Staging Area button on the Execute on panel.
Note: If the Thumbnail window is open, close it to extend the Mapping panel

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 11

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 12

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

k.

Drag the LASTNAME column from the SRC_SALES_PERSON source datastore to the
SALES_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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

l.

Select the UPD_DATE column in the Target Datastore zone and enter the SYSDATE in
the Mapping implementation field. Click the UPD_DATE column again, and then select
the Staging Area option from the Execute on panel.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 13

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

Note: Ensure that the Active Mapping check box is selected for the UPD_DATE
column of the target datastore.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 14

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

m. Repeat step l for the CRE_DATE column. Because the value of the CRE_DATE column
should not be changed later, deselect the Update check box. Ensure that the Staging
Area option is selected from the Execute on panel.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 15

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

n.

In the diagram, drag the CUSTID column from the SRC_CUSTOMER source to the
workbench (the gray background). A filter appears for the CUSTID column.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 16

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

o.

Edit the filter expression to have SRC_CUSTOMER.CUSTID < 105. Scroll down and
ensure that the Source option from the Execute on panel is selected.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
p.

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

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 17

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

Note: The source objects in your flow diagrams may not match the screens shown in
the practice. The flow diagram editor may reposition the source objects. For example,
the SRC_CUSTOMER table may appear above the SRC_SALES_PERSON.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
q.

In the Flow tab, click the Target(ORACLE_ORCL_LOCAL) target datastore. In the


Target Properties panel, set the option DELETE_ALL to the value true as shown
next. Click the Save button to save the interface.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 18

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

Note: By setting DELETE_ALL to true, you ensure that the table is cleared before
you populate it with new data.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

2.

Run this interface, and check the content of the TRG_CUSTOMER table.
a.
b.

In the Projects tab, select interface INT_9-1. Click the Execute button
.
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.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 19

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

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 20

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

d.

Close this window, and then close your interface.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 21

Practice 9-2: Creating ODI Interface: Implementing Lookup

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

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.

Background:
In the previous practices, you created an interface with several sources to load the
TRG_CUSTOMER datastore in the Oracle Sales Application model with the content of the
SRC_CUSTOMER table and the SRC_SALES_PERSON files from different models. Now, you
implement the lookup to load data in the target according to the age range provided in the
lookup table.
Note: Completing this practice is critical for all the following practice sessions.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

Your Tasks:
1.

Create an ODI Interface with a new lookup.

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 22

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 23

b.

In the Mapping tab, click the

button to arrange the datastores in the source pane.

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

In the Confirmation window, click Yes. Click the Add a new Lookup

icon.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
c. In the Lookup Tables Wizard, select the SRC_CUSTOMER
d in the Driving Table
st Stutable
e
pane. In the Lookup Table pane, expand theh
FLAT_FILE_SRC
model, and then select
g
s
i
SRC_AGE_GROUP. For alias, enter LKUP_AGE_RANGE,
hu e th and then click Next.
@
a o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 24

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

d.

In the screen that follows, select the AGE column in the Source pane. Select
AGE_MIN in the Lookup pane, and select Staging for the Execute on option. Then,
click the Join button.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 25

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 26

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 27

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

f.

Edit the Lookup condition to read: SRC_CUSTOMER.AGE BETWEEN


LKUP_AGE_RANGE.AGE_MIN AND LKUP_AGE_RANGE.AGE_MAX. Click Finish.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 28

g.

Click the
button to arrange your datastores in the Source pane. In the
Confirmation window, click Yes. Select AGE_RANGE in the target datastore, and click

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

the Expression Editor icon

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 29

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

h.

In the Expression Editor, select the AGE_RANGE column and drag it to the expression
window. Verify that your expression is LKUP_AGE_RANGE.AGE_RANGE. Click OK to
close the Expression Editor.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 30

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n area
to ensure that IKM Selector is set to IKM Oracle
a
i. In the Flow tab, click the
Target
and
p
e

r theeinterface
ns INT_9-2.
Incremental Update.aSave
m
c
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 31

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

Note: The source objects in your flow diagram may not exactly match the following
screen. The flow diagram editor may reposition the source objects. For example, the
SRC_AGE_GROUP lookup table may appear at the top.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
P ns Projects tab, select INT_9-2, and then click the icon to execute your
j. arIn the Designer
-tra Select the Simulation check box, and then click OK.
Am ointerface.
n
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 32

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

k.

In the Simulation window, note the generated code, and then click Close.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
2. Run the INT_9-2 interface
andliview the lookup data.
(
e
l
a
b again to run your interface . Click OK. Click OK again.
abutton
ndExecute
r
a. Clickathe
e
f
P Donnot
s select the Simulation check box.
rNote:
a
a
r
Am on-t
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 33

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

b.

Click the Operator tab and verify that your interface INT_9-2 successfully executed.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 34

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

c.

Double-click the step that performs a lookup operation on the source flat file
SRC_AGE_GROUP (SRCSet0 - Load data), and then click the Code tab. View the
code on the source and on the target.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 35

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

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 then close the tabs.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 9: Designing Interfaces


Chapter 9 - Page 36

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

s
a
h
)
m
o
c ide
s
c
u
ati t G10:
m
Practices lfor
Lesson
e den
e
t
Interfaces:
and
tu
es s Monitoring
S
h
g
u
Debugging
hi
t
h
e
a@Chapter
us 10
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 1

Practices for Lesson 10: Overview

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

Practices Overview
In this practice, you create an interface to export a flat file to a relational table, perform
execution simulation, execute the newly created interface, and check quality of data loaded in
the table. You also learn how to filter a log to display errors.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 2

Practice 10-1: Creating ODI Interface: Exporting a Flat File to a


Relational Table

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

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 data loaded into 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:
1. In Topology Navigator, define the FILE_GENERIC.C:\labs\Files\Flat_files
physical schema.
2. In Topology Navigator, define the FLAT_FILES_SRC logical schema.
3. In Designer Navigator, create the Export-FF-RT project.
4. In Designer Navigator, create the Flat_File_1 source model.
a. Create the SRC_SALES_PERSON datastore.
b. Point to the resource: C:\labs\Files\Flat_files\SRC_SALES_PERSON.TXT.
c. Reverse-engineer and format the data (fixed length positions, data types).
5. In SQL Developer, create the RDBMS schema ODI_STAGE to host the ODI target
datastore.
6. In SQL Developer, create the TRG_SALES_PERSON table to serve as the ODI datastore for
the target model.
7. In Topology Navigator, create the ODI target data server, ODI_STAGE; physical schema
ODI_STAGE; and logical schema ODI_STAGE.
8. In Designer Navigator, create the ODI target model, Oracle_RDBMS1.
9. Reverse-engineer the model and check the populated TRG_SALES_PERSON datastore
table.
10. Create a new ODI interface to perform the flat file to RDBMS table transformation.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 3

Your Tasks:

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

1.

Create a new physical schema for the source flat-file model.


a. If not still 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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 4

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

b.

Click Topology navigator. In Topology navigator, click the Physical Architecture tab,
expand Technologies > File. Right-click FILE_GENERIC, and then select New
Physical Schema.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 5

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

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
Save. In the Information window that reminds you that no context has been specified
for this schema, click OK. Close the editing window for your new physical schema.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 6

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

d.

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

a
s
a
h select
e. Open Logical Architecture, navigate to Technologies > File, right-click File,) and
New Logical Schema.
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 7

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

f.

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

g.

Verify that your new Logical schema was added under the File node in the
Technologies tree view.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 8

2.

Create the new project in ODI.


a. Open the Designer tab and then click Projects. In the window that opens, click the

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

New Project button

and then select New Project to add a new project.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
g this
u
h
b. On the screen that appears, set the Name of the
to Export-FF-RT in the
@
se project
a
u
Name field. The Code field is filled
in automatically.
Click Save, and then close the tab.
d
n project
tonow appears in the Projects pane.
a
The newly created Export-FF-RT
p
e

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 9

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

3.

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


a.

In ODI Designer, click the Models tab, and then click the New Model
select the New Model option to insert a new model.

b.

On the screen that follows, enter the values provided in the following table. Click the
Reverse Engineer tab. Set the Context to Development. Click the Save icon.
Parameter

Value

. Then

s
a
h
Name
Flat_File_1
)
m
o
c ide
Technology
File
s
c
ati t Gu
Logical Schema
FLAT_FILES_SRC
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 10

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
s that appears, set the Name to SRC_SALES_PERSON. Click the button
rOnPtheascreen
n
a
b.
r
Am on-t
n next to the Resource Name field. Navigate to the C:\Labs\Files\Flat_files folder,

4.

Create a new ODI source datastore.


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

and then select the SRC_SALES_PERSON.txt file. Click Open.

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 11

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

c.

Click the Files tab. Set the File Format to Fixed, and then click the Columns tab.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 12

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

d.

On the Columns tab, click the Reverse Engineer button. A Confirmation message
appears, asking you to save your changes. Click Yes. The Column Setup Wizard
appears.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 13

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

e.

Place the cursor, and then click the ruler at the beginning of each column as shown
next. The wizard marks each column as shown in the following screenshots.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 14

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

f.

After the columns are marked, click each column data to select a column, and then set
the name and data type for each column in the Definition panel to the right, as shown
in the following screens. For the names and data types of each column, refer to this
table. Click OK when you have finished.

s
a
h
)
m
C1
SALES_PERSON_ID
numeric
o
c ide
s
c
C2
FIRST_NAME
string
ati t Gu
m
le den
C3
LAST_NAME
string
e
t
tu
es string
S
h
C4
DATE_HIRED
g
u
his
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
Column

Name

Data type

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 15

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
t Save to save the model. If the Unlocking
g.
The columns should look as
Click
a follows.
p
e

s
r
Object window appears,
select
the
check
box and click OK. Expand Flat_File_1 >
n
a
e
m
c
SRC_SALES_PERSON
(a le >liColumns and view the newly created columns.
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 16

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a sethet SRC_SALES_PERSON datastore, and then
p

h.
In the Flat_File_1 model,
right-click
r
n all tabs as shown next.
aoption.ceClose
select the ViewaData
m
i
l
(
le
a
b
d
a
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 17

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
e
@
sdatastore.
a
5. You must create a schema to host d
the
ODI target
To create a new RDBMS
u
n
o
t
a
schema for the ODI datastore,
perform
the
following
steps:
e
p nswindow
arDeveloper
a. Open the Oraclem
SQL
.You will create the schema by executing the
e
c
i
l
following SQL(a
commands:
a able
d
create
user r<MY_SCHEMA>
identified by <MY_PASS>
n
a tablespace
e
f
P
s
default
<MY_TBS>
temporary tablespace <MY_TEMP>;
r
n
a
a
r
t started, you need to start SQL Developer and open the Administrator
If -not
AmNote:
n
o
connection
(Username: system, Password: oracle1). Refer to Practice 2-1.
n
In this command:

<MY_SCHEMA> corresponds to the name of the schema you want to create:


ODI_STAGE

<MY_PASS> corresponds to the password that you gave: ODI_STAGE

<MY_TBS> corresponds to the Oracle tablespace where the data will be stored:
USERS

<MY_TEMP> corresponds to the temporary default tablespace: TEMP


To create a user, enter the following command. Verify that user account ODI_STAGE
is created successfully.

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 18

Note: These commands also are provided in the text file 10-1.txt, which is located
in the C:\LABS\Text folder.

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

create user ODI_STAGE identified by ODI_STAGE


default tablespace users temporary tablespace temp;

b.

Grant connect privileges to the newly created user account by executing the following
SQL command:

a
s
a
grant connect, resource, create trigger, create view to h
)
ODI_STAGE;
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
e t for the target model. This datastore will be
paODIndatastore
s
6. Now you need to create a
a rnew
m lTo
cecreate a new ODI target datastore, perform the following
used within the ODI
Interface.
i
a
(
a able
steps:
d
n
a Developer,
a. InP
SQL
er create a new connection called ODI_STAGE. Enter the username
f
s
r
with the password ODI_STAGE. For SID enter ORCL. Click Test to
a as ODI_STAGE
anconnection.
r
t
the
Click the Save button and then click Connect.
Am overify
n n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 19

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

s
a
h
) the
b. Create your target table by executing the following SQL commands. Expand
m
o

cverify that
connection, ODI_STAGE > Tables > TRG_SALES_PERSON, and
the
e
s
d
i
c
table is created successfully.
ati t Gu
m
le den
CREATE table "TRG_SALES_PERSON"(
e
t
es s Stu
"SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
h
g
u
"FIRST_NAME" VARCHAR2(80),
hi
t
h
e
"LAST_NAME" VARCHAR2(80), a@
us
d
n
o
t
"DATE_HIRED" VARCHAR2(80),
se
rpNOTa eNULL,
"DATE_UPDATED" DATE
n
a
m lic
a
constraint (
"TRG_SALES_PERSON_PK"
primary key("SALES_PERSON_ID")
e
l
a
)
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 20

Unauthorized reproduction or distribution prohibited Copyright 2014, 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.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

r ens
aNew
b. In the Data Server:
m
a le window,
lic enter the values provided in the following table. Click
the JDBC a
tab.(
nd ferab
a
Value
P ns
r Parameter
a
a
r
-t
ODI_STAGE
Am oName
n
n Instance/dblink (Data Server)
ORCL
User

ODI_STAGE

Password

ODI_STAGE

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 21

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

a
s
a
h
)
comide

s
tic Gu
a
t
c. Click
for JDBC Driver. Select Oracle JDBC Driver.
Click OK.nClick
for JDBC
m
e
l
e
e
Url, select jdbc:oracle:thin:@<host>:<port>:<sid>,
then
dclick OK. Edit the Url to
st andSfor
tuOracle
e
read: jdbc:oracle:thin:@localhost:1521:ORCL
Database.
h
g
s
i
u
h
t This action may cause problems
h Url field.
Note: Do not copy and paste in the JDBC
e
@
s
a
with entering a valid URL string.
d to u
n
a
rp ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 22

Unauthorized reproduction or distribution prohibited Copyright 2014, 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
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 23

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

e.

On the Physical Architecture tab, expand Oracle technology node, right-click


ODI_STAGE data server, and then select New Physical Schema.

f.

In the Schema (Schema) and Schema (Work Schema) fields, enter your ODI_STAGE
schema. Click the Save button. In the Information window reminding you that no
context has been specified for this schema, click OK. Close the
ODI_STAGE.ODI_STAGE physical schema window.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 24

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

g.

In Topology Manager, open the Logical Architecture tab and expand Technologies.
Right-click Oracle technology and then select New Logical Schema.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
b ODI_STAGE. In all three contexts, connect this logical
aschema
nthed logical
h. Name
r
a
e
f
P tonsthe ODI_STAGE physical schema as shown here. Click the Save button
rschema
a
tra close the tabs.
-then
Am oand
n
n

8.

Create a new ODI target model that will be used within your ODI Interface. To create a new
ODI target model, perform the following steps:

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 25

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

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

Technology

Oracle

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
Logical Schema

ODI_STAGE

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 26

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

b.

On the Reverse Engineer tab, set the Context to Development. Click the Save button
and then close the Oracle_RDBMS1 tab.

a
s
a
h
)

comiEngineer.
c. In the Models tab, right-click the Oracle_RDBMS1 model. Select s
Reverse

e
d
c
u expand
ti reversed,
To verify that the TRG_SALES_PERSON datastore is successfully
a
G
t
m
the model as shown here.
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 27

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

9.

Create 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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
Pthe screen
s that follows, enter the interface name as INT-EXP-FF-RT. In the
b. rOn
n
a
a
r
Optimization
field, select Development. If selected, deselect the Staging
-tDifferentContext
Am oArea
n
From
Target check box. Click the Mapping tab.
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 28

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

c.

Click the Models tab to drag the source and target to the diagram. Drag the
SRC_SALES_PERSON.txt datastore from the Flat_File_1 model to the Sources
container. Drag the TRG_SALES_PERSON datastore from the Oracle_RDBMS1
model to the Target Datastore container. When Designer asks Do you want to
perform an Automatic Mapping? click Yes.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 29

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 30

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

d.

Set the value for the DATE_UPDATED column in Target Datastore to System date, by
performing the following: In 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
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
P thenFIRST_NAME
e. rSelect
column in Target Datastore and edit the mapping to read:
s
a
a
r
This function removes left spaces in the FIRST_NAME
-t In the Execute on section,
Am oLtrim(SRC.FIRST_NAME).
n
column.
select Staging Area. Repeat this step for columns
n LAST NAME and DATE HIRED. Refer
to the mapping implementation provided in the
following table.
Column

Mapping implementation

FIRST NAME

Ltrim(SRC.FIRST_NAME)

LAST NAME

Ltrim(SRC.LAST_NAME)

DATE HIRED

Ltrim(SRC.DATE_HIRED)

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 31

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 32

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 33

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 34

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

f.

For this interface, you export a flat file directly to a relational table target. The
knowledge modules required for this interface are LKM File to SQL and IKM SQL
Incremental Update. To import the KMs, click the Designer Managers Projects tab in
the left panel. In the Export-FF-RT project, expand the Knowledge Modules folder.
Right-click Loading (LKM) and select Import Knowledge Modules.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 35

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

g.

The Import Knowledge Modules dialog box appears. The File import directory field
displays a path to the XML-reference folder containing all the knowledge module XML
files. Note: The actual path is:
C:\Oracle\Middleware\Oracle_ODI1\oracledi\xml-reference. Press and
hold the Ctrl key, and then select IKM SQL Incremental Update and LKM File to
SQL. Click OK. Close the Import Report window. View the imported KMs in the
Projects tree view.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 36

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 37

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

h.

In the INT-EXP-FF-RT interface in the right panel, click the Flow tab. Click the
SrcSet0 (FILE GENERIC) datastore. The properties for the source appear in the
following screen. In the LKM Selector field, select LKM File to SQL from the LKM
drop-down list. 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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 38

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

i.

Click the Target datastore. Select IKM SQL Incremental Update. Set the IKM option
FLOW_CONTROL to False. Set the IKM option DELETE_ALL to True. Click Save.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
-tr your interface, click the Execute button . The following screen appears.
Amj. oTontest
n Retain the defaults and click OK. On the next screen, click OK.

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 39

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

k.

Open ODI Operator and verify that your interface was executed successfully. In
Operator, click Session List tab, select All Executions, and the then click the refresh
button

. View the execution results for the interface INT-EXP-FF-RT.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 40

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

l.

Double-click Step 12. View the number of rows inserted into the target table (16).Then
close the Session Task window.

a
s
a
h
)
comide

s
tic Gu
a
10. Use the Quick Edit feature to enable filtering rows with Sales_Person_ID
m ent> 30. In addition,
e
l
e
you capitalize the first letter of each last name and first
stname,Sleaving
tud the other characters
e
in lowercase.
h
is Filters section, and then
ug tab,thexpand
a. In the INT-EXP-FF-RT tab, select Quick-Edit
h
e
click the Add Filters icon.
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 41

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

b.

Select the SALES_PERSON_ID row, and then click the Launch Expression Editor

a
s
a
icon
. In the left panel of the Expression Editor, double-click SALES_PERSON_ID.
h
Edit the expression to read: SRC.SALES_PERSON_ID > 30. Click OK. m
For)Execution
Location, select Staging. Click OK.
co ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 42

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 43

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

c.

Scroll down and expand the Mappings section. In the Mapping Expression column,
click the Ltrim(SRC.FIRST_NAME) column , and then select the Expression Editor
icon. In the Expression Editor, edit the expression to read:
INITCAP(Ltrim(SRC.FIRST_NAME)). Click OK.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
d.

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

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 44

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

11. Execute your modified interface and verify the result.


a.

In Designer, execute your interface


Information dialog box, click OK.

. In the Execution dialog box, click OK. In the

b.

Open ODI Operator and verify that the interface executed successfully. Open step 8
Integration. Click the Code tab, and view your modifications.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 45

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p
c. Click the INT_EXP_FF_RT
tab.
Insthe Mapping tab, right-click the target datastore and

rfilterederows
n
a
select Data. View
the
cthe tabs.(SALES_PERSON_ID > 30) inserted in the table.
i
l
(am
Close youraData
Editor
and
le
b
d
a
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 46

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 47

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 10: Interfaces: Monitoring and Debugging


Chapter 10 - Page 48

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

s
a
h
)
m
o
c ide
s
c
u
ati t G11:
m
Practices lfor
Lesson
e den
e
t
Designing
tu
es sInterfaces:
S
h
g
u
Advanced
hi Topics 1
t
h
e
a@Chapter
us 11
d
n
o
t
rpa ense
a
m lic
a
(
a able
d
n
a sfer
P
r
a
an
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 1

Practices for Lesson 11: Overview

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

Practices Overview
In Practice 11-1, you create and use a native sequence for an ODI Interface. In Practice 11-2,
you create temporary indexes for an ODI Interface. In Practice 11-3, you use datasets with an
ODI interface for data transformation.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 2

Practice 11-1: Using Native Sequences with ODI Interface

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

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
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
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
n for all the following practice sessions.
a iscecritical
Note: Completing this
practice
m
i
a
l
(
le
a
b
d
a
Your Tasks:
n
a sfer
P
r
1. Create
and
n an ODI procedure that creates an Oracle native sequence.
a traexecute
m
A a. oIfnnot- connected, connect to the DEV_ODI_REPO Work Repository (User:
n SUPERVISOR, Password: SUNOPSIS). Click the Designer tab.

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 3

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

b.

In the Projects tab of the Designer Navigator, 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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
-trDetails tab, click the Add command button . In the Name field, enter:
Amc. oInnthe
n Create ORCL SEQ. In the Command on Target tab, set the Technology field to

Oracle. In the Schema drop-down list, select ORACLE_ORCL_LOCAL_SALES. In


the Command panel, enter the command, which creates the following sequence. Click
the Save icon to save the procedure. Close the tab.

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 4

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

Note: You may copy and paste this command from the text file 11-1.txt in the
following location: c:\Labs\Text.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 5

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

d.

Run the procedure Create_ORCL_SEQ_FAM_ID and verify the result of the execution
in the Operator Navigator.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 6

Unauthorized reproduction or distribution prohibited Copyright 2014, 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.
Note: Be sure that you expand the Administrator connection, not ODI_STAGE.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 7

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

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.

a
s
a
h
)
b. Name the new sequence SEQ_FAMILY_ID. Select the Native sequence
In the
comoption.

e
s
d
i
c
i
u In the
schema field, select ORACLE_ORCL_LOCAL_SALES. Click
icon.
atthe
G
t
m
window that follows, select the DEVELOPMENT context,
then
nselect the native
le andlook
e
e
d
t
sequence SEQ_FAMILY_ID. Click OK. Your screen
should
as
shown next. Save
s Stu
e
h
the sequence, and then close the tab.
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 8

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 9

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
tFamily table by using the Native Sequence.
athe Product
3. Create a new interface to load
p
e

s
r
a andcselect
a. Right-click Interfaces,
en New Interface. Enter the new interface name:
m
i
a
l
( Optimization
INT_11-1. For
e Context, select Development. Click the Mapping tab.
l
a
b
d
an sfera
P
ar tran
m
A onn

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 10

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

a
s
a
h
)
b. In the Models tab, expand the HSQL_SRC model and Oracle Sales Application
model.
om earea

Drag the SRC_PRODUCT datastore from the HSQL_SRC models


toc
the source
in
d
i
c
i
your interface. Drag the TRG_PROD_FAMILY datastore from
the
Oracle
Sales
u
t
a
G
t
mautomatic
Application model to the target area. Click Yes to perform
mapping.
n
e
l
e
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 11

c.

In the Target Datastore area, select FAMILY_ID, and then click the Expression Editor

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

icon
. Expand the Project Sequences node, and then drag the sequence
SEQ_FAMILY_ID to the expression area. Click OK. Click the Flow tab.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 12

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 13

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

d.

In the Flow tab, click the target datastore Target (ORACLE_ORCL_LOCAL), and then
set IKM Selector to IKM SQL Control Append. In the Options, set FLOW_CONTROL to
false, and set DELETE_ALL to true. Select the Distinct Rows check box. Save your
interface. When the Fix Issue Dialog window appears, select Fix. This option enables
not checking the FAMILY_ID column for not null.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 14

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

a
s
a
h
)
om e
c

s
4. Execute the newly created interface and verify the data in the targetic
t table. Guid
a
tExecution screen
m . eThe
a. Execute Interface INT_11-1 by clicking the Execute button
n
e
l
e
appears. Retain the defaults and click OK. On the
stInformation
tudscreen, click OK, and
S
then verify execution in the Operator tab. ghe
u
his
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 15

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
u
tTarget
es s the
S
h
b. In the INT_11-1 tab, select the Mapping tab,
right-click
Datastore
g
i
u Verify
h
TRG_PROD_FAMILY, and then selecthData.
the data inserted in the table.
t
e
@
stab.
Close the Data Editor window and
INT_11-1
a
u
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 16

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 17

Practice 11-2: Using Temporary Indexes

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

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 that loads data in the table by using Oracle
native sequence, which generates ID numbers for the target table.
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
SRC_PRODUCT from the HSQL_SRC model, and TRG_PROD_FAMILY from the Oracle Sales
Application model.
TRG_PROD_FAMILY will be used as a lookup table to obtain the ID number generated by the
previous lessons interface that used a sequence to populate the ID number.
For the lookup, you create a temporary index to join SRC_PRODUCT and TRG_PROD_FAMILY on
their FAMILY_NAME column.
Finally, you execute the interface, view the source code, and examine the inserted rows in the
TRG_PRODUCT target datastore.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n
Note: Completing this practice is critical for all the following practice sessions.

Your Tasks:
1.

Create a new ODI Interface with a temporary index on the source tables.

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 18

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

a.

Expand the project HandsOnLoads > HandsOn > Interfaces. Right-click Interfaces
and select New Interface. Name this interface INT_11-2. Click the Mapping tab.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 19

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

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 20

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

c.

Create 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.
You can reposition the Join as shown in the following screenshots.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 21

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

d.

Click 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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 22

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 23

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

2.

Execute the Interface and verify the results.


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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 24

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

b.

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

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
-tr the fourth step, Loading SrcSet0 - Create Temp. Indexes on Work. In
Amc. oDouble-click
n
n the Session Task, select the Code tab. View the source code.

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 25

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

d.

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 26

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

e.

In Designer Navigator, open the Interface INT_11-2, and select the Mapping tab.
Right-click the target datastore, and then select Data to view the 15 inserted rows.
Close the Data Editor window and the tabs.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 27

Practice 11-3: Using Data Sets with ODI Interface

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

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 system.

Background:
In this practice, you add a new data set to an interface. Building upon the interface INT_9-2
you created in Lesson 9, you will add a bulk feed of customer data from another system by
adding another data set.
First, you make a copy of interface INT_9-2, naming the copy as INT_11-3. This copy
includes the default data set you defined in INT_9-2.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

Now, you create a new data set, naming it BULK_CUST_DATA. For its source, you specify the
TRG_BULK_CUSTOMER datastore from the Oracle Sales Application model.
You specify the UNION operator to unite this new source of data with the default data set that
you specified in INT_9-2.
Next, you perform an execution simulation to preview the code that will be used for this new
data set with the UNION operator.
Finally, you execute the interface and verify the rows inserted into the target table.
.

Note: Completing this practice is critical for all the following practice sessions.

Your Tasks:
1.

Create an ODI interface with multiple data sets.

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 28

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

a.

In Designer navigator, right-click interface INT_9-2 and then duplicate it. Open the
duplicate interface and rename it INT_11-3.Open the Mapping tab.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 29

b.

To arrange tables, click the Perform Layout icon

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

Add/Remove DataSet icon

, and then click Yes. Click the

, and then click Add new DataSet

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 30

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

c.

Enter the new data set name: BULK_CUST_DATA. Select Operator: UNION. Close the
Datasets Configuration window.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 31

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

d.

In the Mapping tab, select the BULK_CUST_DATA data set tab. In the Design
navigator 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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 32

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

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 screenshot.
Note: The order of your source objects on the left side of the Flow diagram may be
different than the order shown in the following screenshot.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 33

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

f.

Open the Mapping tab again, select the BULK_CUST_DATA tab, and then save
interface INT_11-3.

a
s
a
h
)
comide

s
tic Gu
a
m ent
e
l
e
st Stud
e
h
ug this
h
@ use
a
d
n e to
a
p

ar cens
m
(a le li
a
nd ferab
a
r P ans
a
r
-tthe
Amg. oClick
n
button
. In the Execution dialog box, select the Simulation box to
n perform anExecute
execution simulation in the Development context. Click OK. In the
Simulation window, scroll down to approximately one third of the way, and view the
simulated code for the data set TRG_BULK_CUSTOMER with the UNION operator as
shown next.

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 34

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 35

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

2.

Execute interface INT_11-3 (do not select the Simulation check box) and verify the
execution results.
a. Execute interface INT_11-3.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 36

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

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.

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 37

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

s
a
h
)
m
o
c ide
s
c
ati t Gu
m
le den
e
t
es s Stu
h
g
u
hi
t
h
e
a@ o us
d
n
a se t
p

r
a cen
m
a
li
(
e
l
a
nd ferab
a
r P ans
a
Am on-tr
n

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

Practices for Lesson 11: Designing Interfaces: Advanced Topics 1


Chapter 11 - Page 38

Potrebbero piacerti anche