ODI 12C Integration and Administration - Activity Guide

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 510

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
Oracle Data a s
nIntegrator 12c:
t r
on- and Administration
Integration
n
s a eฺ
) h aActivity
u idGuide
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

D82167GC10
Edition 1.0
May 2014
D86566
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Disclaimer

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

The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS


The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
e to
ens
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Trademark Notice
e l ic
a l
brespective
r
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
fe
owners.
n s
n - tra
Author
n o
Steve Friedberg a
s ideฺ
h
) t Gu a
Technical Contributors and Reviewers m
o
c deBabu,
ฺSurendra n Rick Green, Viktor Tchemodanov,
Phil Scott, Gerry Jurrens, Brent Dayley,
o o tu
ah is SLeite
Julien Testut, Alex Kotopoulis, Alessandro
y
j d er@ se th
r ( a u Oracle Tutor
A jde
This book was published using:

i m ir
Vl ad
Table of Contents
Practices for Lesson 1: Introduction to Integration and Administration ....................................................1-1
Practices for Lesson 1: Overview ...................................................................................................................1-2
Practice 1-1: Logging In and Help Overview ..................................................................................................1-3
Practices for Lesson 2: Administering ODI Repositories .............................................................................2-1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Practices for Lesson 2: Overview ...................................................................................................................2-2


Practice 2-1: Creating and Connecting to ODI Master and Work Repositories ..............................................2-3
Practices for Lesson 3: ODI Topology Concepts ..........................................................................................3-1
Practices for Lesson 3: Overview ...................................................................................................................3-2
Practice 3-1: Configuring a Standalone Agent by Using the Common Administration Model.........................3-3
Practices for Lesson 4: Describing the Physical and Logical Architecture ...............................................4-1
Practices for Lesson 4: Overview ...................................................................................................................4-2
to
se
Practice 4-1: Working with Topology ..............................................................................................................4-3
Practices for Lesson 5: Setting Up a New ODI Project .................................................................................5-1 en

e l ic
bl
Practices for Lesson 5: Overview ...................................................................................................................5-2

r a
Practice 5-1: Setting Up a New ODI Project...................................................................................................5-3
fe
n s
Practices for Lesson 6: Oracle Data Integrator Model Concepts.................................................................6-1

- tra
Practices for Lesson 6: Overview ...................................................................................................................6-2
n
no
Practice 6-1: Creating Models by Reverse-Engineering.................................................................................6-3
a
Practices for Lesson 7: Organizing ODI Models and Creating ODI
h a s Datastores i d eฺ..........................................7-1
) t Gu
Practices for Lesson 7: Overview ...................................................................................................................7-2
m
o n
ฺc...........................................................................................8-1
Practice 7-1: Checking Data Quality in the Model ..........................................................................................7-3
e
o o d
ah is Stu
Practices for Lesson 8: ODI Mapping Concepts
y
Practices for Lesson 8: Overview ...................................................................................................................8-2
@ eSimple
Practice 8-1: Creating ODI r
d eMapping: thTransformations.......................................................................8-3
(
Practices for Lesson j s
a9: DesigninguMappings................................................................................................9-1
Practicesd
r
foreLesson 9: Overview ...................................................................................................................9-2
A j9-1:
m i r
Practice Creating ODI Mapping: Complex Transformations ...................................................................9-3

adi
Practice 9-2: Creating ODI Mapping: Implementing Lookup ..........................................................................9-23
Vl Practices for Lesson 10: Mappings: Monitoring and Troubleshooting .......................................................10-1
Practices for Lesson 10: Overview .................................................................................................................10-2
Practice 10-1: Creating ODI Mapping: Exporting a Flat File to a Relational Table .........................................10-3
Practices for Lesson 11: Designing Mappings: Advanced Topics 1 ...........................................................11-1
Practices for Lesson 11: Overview .................................................................................................................11-2
Practice 11-1: Using Native Sequences with ODI Mapping ...........................................................................11-3
Practice 11-2: Using Temporary Indexes .......................................................................................................11-16
Practice 11-3: Using Sets with ODI Mapping .................................................................................................11-25
Practices for Lesson 12: Designing Mappings: Advanced Topics 2 ...........................................................12-1
Practices for Lesson 12: Overview .................................................................................................................12-2
Practice 12-1: Creating and Using Reusable Mappings .................................................................................12-3
Practice 12-2: Developing a New Knowledge Module....................................................................................12-35
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 © 2014, Oracle and/or its affiliates. All rights reserved.

Oracle Data Integrator 12c: Integration and Administration Table of Contents


i
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 Packages with Variables and User Functions........................................................14-16
Practices for Lesson 15: Step-by-Step Debugger .........................................................................................15-1
Practices for Lesson 15: Overview .................................................................................................................15-2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Practice 15-1: Debugging Mappings ..............................................................................................................15-3


Practices for Lesson 16: Managing ODI Scenarios.......................................................................................16-1
Practices for Lesson 16: Overview .................................................................................................................16-2
Practice 16-1: Creating and Scheduling Scenarios ........................................................................................16-3
Practices for Lesson 17: Using Load Plans ...................................................................................................17-1
Practices for Lesson 17: Overview .................................................................................................................17-2
Practice 17-1: Using Load Plans ....................................................................................................................17-3
Practices for Lesson 18: Enforcing Data Quality with ODI ...........................................................................18-1
e to
Practices for Lesson 18: Overview .................................................................................................................18-2 ns
Practice 18-1: Enforcing Data Quality with ODI Mappings .............................................................................18-3 l ic e
bl e
Practices for Lesson 19: Working with Changed Data Capture ...................................................................19-1
fe r a
s
Practices for Lesson 19: Overview .................................................................................................................19-2
n
n - tra
Practice 19-1: Implementing Changed Data Capture .....................................................................................19-3

no
Practices for Lesson 20: Advanced ODI Administration ..............................................................................20-1
a
h a s ideฺ
Practices for Lesson 20: Overview .................................................................................................................20-2

) tG u
Practice 20-1: Setting Up ODI Security ..........................................................................................................20-3
m
Practice 20-2: Integration with Enterprise Manager and
o
ฺc den
Using ODI Console .................................................20-19

o o
y ah is Stu
j d er@ se th
r ( a u
A jde
i m ir
Vl ad

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

Oracle Data Integrator 12c: Integration and Administration Table of Contents


ii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 1:
a n to Integration
Introduction
h a s ideฺ
and
) Administration
Gu
ฺ c omChapter
e nt1
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

Copyright © 2014, 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
In this practice, you explore the ODI 12c lab environment, start ODI Studio, and log in. You also
practice using the Start Page and Help system.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 2
Practice 1-1: Logging In and Help Overview
Overview
In this practice, you examine the technical setup for the practices, start ODI, and connect to ODI
Studio.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
d m
iAssumptions
a
Vl All software is preinstalled. Databases are preconfigured and prepopulated with user data.
Tasks
1. View the major software components that are installed on your system (as shown in the
preceding diagram). Your environment has the following major components:
• Oracle Database 12c
− SQL Developer
• MySQL Database
• WebLogic Server 12c
• Oracle Data Integrator 12c
• Repository Creation Utility

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 3
2. View your machine’s desktop. Do NOT click yet, but simply note the following shortcuts:
a. ODI Studio 12c: Starts ODI Studio.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. SQL Developer: Starts SQL Developer, which provides access to the objects in Oracle
Database 12c through a GUI.

c. Terminal: Starts the terminal window to perform Linux commands.


e to
lic ens
b l e
f e ra
3. Reset the environment for your first practice.
ans
o n -tr
Note: Each practice in this course has its own setup script that you run at the beginning of
n
the practice. If you need to restart a practice from the beginning, you can execute the setup
a
h a s ideฺ
script again. To run the setup script, you have to be disconnected from ODI Studio.
) t Gu
a. If connected, disconnect from the ODI repository (select ODI > Disconnect).
m
o
ฺc den
Note: Alternatively, you can just close ODI Studio.
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a b. Start the Terminal window and execute the following command to change the directory:
cd /home/oracle/labs

[oracle@hostname ~]$ cd ~/labs


[oracle@hostname labs]$
c. Execute the command to reset your environment to Practice 1:
[oracle@hostname labs]$ ./reset01.sh
d. You are prompted to log off ODI. Verify that you disconnected from the ODI repository
(as directed in step 3a), and then press Enter.
YOU MUST BE LOGGED OFF OF ODI BEFORE RUNNING ************
Press [Enter] key to continue

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 4
e. Wait until this script completely executes (as shown below).
Note: This process may take up to one or two minutes. You may see an attempt to
drop a nonexistent object resulting in an error. You can safely ignore those errors.
Note: Do not close the Terminal window. You use it in each practice.
...many lines omitted for clarity...
Import: Release 12.1.0.1.0 - Production on Mon Jan 13 13:30:06 2014
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -


64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing
options
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** directory=lab_dumps
dumpfile=lab1.dmp schemas=dev_odi_repo,sales_dev,odi_temp,scott
TABLE_EXISTS_ACTION=REPLACE
e to
ens
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
lic
Processing object type SCHEMA_EXPORT/ROLE_GRANT
b l e
ra
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
f e
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
ans
o n -tr
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

a n
. . imported "DEV_ODI_REPO"."SNP_CONV_DT" 1.821 MB 36684 rows

h a
...many lines omitted for clarity... s ideฺ
. . imported "DEV_ODI_REPO"."SNP_MTXT" 692.3 KB 3449 rows

m ) t Gu
. . imported "SALES_DEV"."TRG_CUSTOMER_H" 0 KB 0 rows
o
ฺc den
. . imported "SALES_DEV"."TRG_REGION" 0 KB 0 rows
o o
ah is Stu
. . imported "SALES_DEV"."TRG_SALES" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
y
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

j d er@ se th
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

r (a u
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
jd e
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER

i r A Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at Day Month 14

di m 10:25:57 2014 elapsed 0 00:01:31

V l a [oracle@hostname labs]$
4. Start Oracle Data Integrator Studio 12c and explore the Start page.
a. Double-click the ODI Studio 12c desktop shortcut. ODI 12c starts.

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

e to
li cens
l e
leisure. f e rabat your
b. Examine the Start page. Note the online tutorials, which you can do later,

t r a ns
n on-
s a eฺ
) h a u id
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
d imir
Vla

c. Click the links provided on the Start page and view available resources. A web browser
starts. You may be prevented by firewalls from accessing the Internet. Some of the
resources are not local but are online.

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 6
d. From the main menu bar, select Help > Table of Contents and then ODI Studio
Online Help 12c > Using the Online Help > Opening the Online Help to read how
you can access help at any time.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d r@Help epanels
ethe th after you look at them.
( j
You can close s
u In a later lab, you will make a new repository.
aODI repository.
5. Connect tor the
de Connect To Repository. When prompted for Wallet Password, enter Welcome1.
a.AjClick
m ir All passwords are case-sensitive. Then click OK.
l a di
V

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

b. For Login Name, select DEV_ODI_REPO. Click OK.

e to
lic ens
b l e
f e ra
ans
o n -tr
Note: In this ODI setup, the repository, username SUPERVISOR, and password
Welcome1 are predefined for login.
a n
c. a s ideฺ
On the Designer tab, expand the Projects and Models accordions. In Projects, select
h
) t Gu
JunkForDemo > HandsOn. Expand and view the infrastructure for your practices.
m
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 8
In a later lab you will be creating a new project similar to this one.
d. Close ODI Studio. This automatically disconnects you from any open repositories.
This completes Practice 1-1. This completes the practices for Lesson 1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

e to
lic ens
b l e
f e ra
ra ns
Practices ofor
n -tLesson 2:
a n
Administering
a s d e ฺ ODI
) h Gui
Repositories
ฺ c omChapter
e nt2
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

Copyright © 2014, 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
To set up Oracle Data Integrator, first you have to create Master and Work repositories. Then,
create connections to the Master and Work repositories in ODI.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 2
Practice 2-1: Creating and Connecting to ODI Master and Work
Repositories
Overview
In this practice, you will use Repository Creation Utility (RCU) to create Master and Work
repositories. You will then create a connection and log in to ODI and connect to these
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

repositories.

Assumptions
You have already run ~/labs/reset01.sh in the previous lab.
Note: These are practice repositories. In later lessons, you use other Master and Work
repositories that are partially predefined with source and target objects.

Tasks
e to
1. Start RCU:
lic ens
a. Navigate to the directory $FMW_HOME/oracle_common/bin as shown below:
b l e
[oracle@hostname ~]$ cd $FMW_HOME/oracle_common/bin
f e ra
[oracle@hostname bin]$ pwd ans
o n
/u01/app/oracle/Middleware/Oracle_Home/oracle_common/bin-tr
b. To start RCU, execute the following command: a
n
s ideฺ
[oracle@hostname bin]$ ./rcu ) ha u
2. Use RCU to create ODI Master andฺc o m n t G
Work repositories:
o o d e
ah screen.
a. Click Next on the Welcome
S tu
y
@ e thi s
e r
( a jd u s
j d er
m ir A
l a di
V

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 3
b. On the Create Repository screen, accept the default: Create Repository; System Load
and Product Load as shown below. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
c. jd e
On the Database Connection details screen, enter the following parameters:
i r A
di m
V l a Parameter Value

Host Name localhost

Port 1521

Service Name orcl.us.oracle.com

Username sys

Password Welcome1

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

Practices for Lesson 2: Administering ODI Repositories


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
Click Next. er@ th
j d s e
a Warninguwindow is displayed, click Ignore.
Note: If(the
e r
r Ajd
d i mi
Vl a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 5
d. In the Checking Prerequisites window, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 6
e. On the Select Components screen, change the “Create new prefix:” to DEV1. Select:
Oracle Data Integrator: Master and Work Repository. Selecting that one item causes
many others to be selected. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
e Checking Prerequisites window, click OK.
jIndthe
ir A
f.

di m
V l a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 7
g. On the Schema Passwords screen, enter Welcome1 in the Password and in the
Confirm Password fields. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc enterdtheenparameters provided in the table below.
h. On the Custom Variables screen,
o o
Click Next.
y ah is Stu
j d er@ se th
Parameter
r ( a u Value
jd e
i r A
Supervisor Password Welcome1
di m
V l a Confirm Supervisor Password Welcome1

Work Repository Type D

Work Repository Name WORKREP1

Work Repository Password Welcome1

Confirm Work Repository Welcome1


Password

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

Practices for Lesson 2: Administering ODI Repositories


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
i.
er@ se screen,
On the Map Tablespaces
j d th click Next.
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 9
j. In the Confirmation window, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

k. After the Tablespaces are created, click OK in the Creating Tablespaces window.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 10
l. On the Summary Screen, click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
(
Note: This
r u takes several minutes.
a Create step
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 11
m. Were your Master and Work repositories successfully created? View the Summary.
Click Close on the Summary screen.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
3. e
On ODI Studio, create the connection to your new Master and Work repositories.
jd
i r A
a. Start ODI Studio. Click Connect to Repository. In the Enter Wallet Password window,
di m enter Welcome1. Click OK.
V l a Note: For the purpose of this practice, your Wallet password is predefined: Welcome1.

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

In the Oracle Data Integrator Login window, click New .

e to
lic ens
b l e
f e ra
ans
b. n -tr
Configure the new ODI Master Login as shown in the table below.
o
a n
Repository Connection Information
h a s ideฺ
m ) t Gu
Parameter o
c den
ฺValue
o o
Login Name y Stu
ah isODI_REPO1
d e r@ e th
User ( a j u s SUPERVISOR
r
A jde
Password
m ir Welcome1

l a di Database Connection (Master Repository)


V
Parameter Value

User DEV1_ODI_REPO

Password Welcome1

Driver List Oracle JDBC Driver

Driver Name oracle.jdbc.OracleDriver

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

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 13
Select Work Repository and click the magnifying glass to select WORKREP1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 14
Click Test to verify the connection. Click OK. Click OK again.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
j d e You click magnifying glass to select and then edit the JDBC URL. Also, click
Note:
r A magnifying glass to select Work repository Workrep 1, as shown below:

d i mi
Vl a

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

Practices for Lesson 2: Administering ODI Repositories


Chapter 2 - Page 15
4. Log in to ODI and view your newly created Master and Work repositories.
a. Select the Login ODI_REPO1. Enter the username SUPERVISOR and password
Welcome1. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Click the Topology tab. Expand the Repositories accordion bar. Under the Master
e to
ens
Repository node, expand Work Repositories. View your newly created Work repository
WORKREP1.
lic
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

This completes Practice 2-1. This completes the practices for Lesson 2.

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

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 3: ODI
a
Topology n Concepts
a uide s ฺ
) h 3G
c o mChaptern t
o o ฺ d e
ah is S t u
y
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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
In this practice, you create the ODI standalone agent using the Common Administration Model
(CAM).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 2
Practice 3-1: Configuring a Standalone Agent by Using the Common
Administration Model
Overview
In this practice, you configure an ODI domain with the Common Administration Model and you
create a standalone agent.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).

e to
lic ens
b l e
f e ra
b. In the Terminal window, execute the following command:
tra ns
./reset03.sh n -
When prompted, verify that you disconnected from a ntheoODI repository, and then press
a s ideฺ
Enter. Wait until this script completely executes.
h
Note: This process may take up to one m )minute.t Gu
o
ฺc~/labsden
[oracle@hostname ~]$ cd
o o tu
h ./reset03.sh
[oracle@hostname a
y labs]$
s S
i BEFORE RUNNING *************
e r
YOU MUST BE LOGGED@ OFFeOFthODI
a jd key utoscontinue
Press [Enter]
(
d e r
(...many lines omitted for clarity...)

r AjProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

d i mi Processing object type SCHEMA_EXPORT/STATISTICS/MARKER

Vl a Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at Day Month 14


11:00:53 2014 elapsed 0 00:01:39
[oracle@hostname labs]$
2. In ODI 12c, you create an agent by using the Common Administration Model (CAM). You
first need to create a new CAM domain.
a. Open a new Terminal window (or new tab within the other window) and execute the
following command to change the directory:

[oracle@hostname ~]$ cd $ODI_HOME/common/bin


[oracle@hostname bin]$ pwd
/u01/app/oracle/Middleware/Oracle_Home/odi/common/bin
[oracle@hostname bin]$

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 3
b. Execute the following command to start the Configuration Wizard:
[oracle@hostname bin]$ ./config.sh
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
c. In the wizard, select “Create a new domain.” In the Domain Location path, change the
b l e
domain name to agent1. As a result, your Domain Location path should now be the
f e ra
following (all on one line):
ans
o n -tr
/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/agent1
Click Next.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 4
d. In the Templates selection window, select “Oracle Data Integrator – Standalone
Collocated Agent – 12.1.2.0 [odi]” (other selections are performed automatically). Click
Next.
Note: The “Basic WebLogic Server Domain -12.1.2.0 [wlserver]” template is
preselected by default.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 5
e. On the Administrator Account screen, enter Welcome1 twice as the password.
Note: The name of the account is set to weblogic.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 6
f. On the “Domain Mode and JDK” screen, select Development as the Domain Mode,
and use the default JDK. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 7
g. On the Database Configuration Type screen, select and edit the parameters as shown
below. Then click Get RCU Configuration.
− Vendor: Oracle
− Driver: *Oracle’s Driver (Thin) for Service connections, Ver…
− DBMS/Service: orcl.us.oracle.com
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

− Host Name: localhost


− Port: 1521
− Schema Owner: DEV_STB
− Schema Password: Welcome1

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 8
h. Verify successful connection and configuration (as shown below). Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 9
i. On the JDBC Component Schema screen, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 10
j. On the JDBC Component Schema test screen, verify the test status for each
component schema (the icon indicates success). Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 11
k. On the Advanced Configuration screen, select System Components. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 12
l. On the System Components screen, accept the default parameters shown below. Click
Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 13
m. On the ODI Server Configuration screen, enter Welcome1 in the Supervisor Password
field. Accept the other default parameters. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 14
n. On the Machines screen, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 15
o. On the “Assign System Components to Machines” screen, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 16
p. View the Configuration Summary screen, and then click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 17
q. Follow the progress on the Configuration Progress screen. Click Next after the domain
is created successfully. On the next screen, note your domain location and the admin
server URL.
Note: The configuration process may take several minutes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 18
r. Click Finish.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu
y ahto theisODISrepository.
3. Start ODI Studio and connect
a. Double-click the
j d er@
ODI 12c
s e th shortcut to start ODI.
Studio

r ( a u
A jde
r
dimi
Vla
b. Click “Connect To Repository.” When prompted, enter Welcome1 in the Wallet
Password field.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 19
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

c. Select DEV_ODI_REPO in the Login Name field. Enter Welcome1 as the password.

e to
lic ens
b l e
f e ra
ans
4. Create a new ODI agent.
o n -tr
a n
a. In ODI Studio, click the Topology tab. Expand the Physical Architecture accordion and
a s ideฺ
then expand the Agents node. Note that no agents have been created in ODI.
h
) t Gu
Right-click the Agents node and select New Agent.
m
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 20
b. Enter OracleDIAgent1 as the name of the agent (the default name that was
previously specified in the Configuration Wizard). Specify localhost as the host and
20910 as the port. Click Save.
Note: The agent name is case-sensitive.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
Leave this tab open for the moment.
t ra ns
n -
c.
no
In the Terminal window, execute the following command to change directory:
a
[oracle@hostname]$ cd $FMW_HOME
h a s ideฺ
) t Gu
[oracle@hostname]$ cd user_projects/domains/agent1/bin
m
[oracle@hostname bin]$ pwd o
ฺc den
h o o tu
/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/agent1/bin
y abin]$ s S
[oracle@hostname
e r @ command:
e t hi
d. Execute the
( a jdfollowing
u s
j d er
[oracle@hostname bin]$ ./agent.sh -NAME=OracleDIAgent1
A Note: Ignore any notification and warning messages.
d imir
Vla

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 21
e. Verify that the ODI agent is started (as shown below). Do not close this terminal
window; minimize it instead.
(...many lines omitted for clarity...)
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_21/jre/lib/jfr.jar'
*sys-package-mgr*: processing new jar,
'/usr/java/jdk1.7.0_21/jre/lib/ext/sunpkcs11.jar'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

*sys-package-mgr*: processing new jar,


'/usr/java/jdk1.7.0_21/jre/lib/ext/sunjce_provider.jar'
*sys-package-mgr*: processing new jar,
'/usr/java/jdk1.7.0_21/jre/lib/ext/sunec.jar'
*sys-package-mgr*: processing new jar,
'/usr/java/jdk1.7.0_21/jre/lib/ext/dnsns.jar'
*sys-package-mgr*: processing new jar,
'/usr/java/jdk1.7.0_21/jre/lib/ext/zipfs.jar'
*sys-package-mgr*: processing new jar,
'/usr/java/jdk1.7.0_21/jre/lib/ext/localedata.jar'
e to
2014-01-14 18:58:21.575 NOTIFICATION New data source:
[DEV_ODI_REPO/*******@jdbc:oracle:thin:@(description=(address=(host=localhost)
lic ens
(protocol=tcp)(port=1521))(connect_data=(service_name=ORCL.US.ORACLE.COM)(serv
b l e
er=dedicated)))]
f e ra
ns
2014-01-14 18:58:22.358 NOTIFICATION ODI-1111 Agent OracleDIAgent1 started.

tra
Agent version: 12.1.2 - 17/09/2013. Port: 20910. JMX Port: 21910.

n -
2014-01-14 18:58:22.358 NOTIFICATION ODI-1136 Starting Schedulers on Agent
OracleDIAgent1.
a no
h a s ideฺ
2014-01-14 18:58:23.452 NOTIFICATION ODI-1137 Scheduler started for work

) t Gu
repository workrep on Agent OracleDIAgent1.
m
o n> Agents > OracleDIAgent1 and right-
ฺcArchitecture
e
o o d
ah is Sgotuto the open OracleDIAgent1 tab and click
f. Go back to Topology > Physical
click and select Test;yalternatively,
@ e ttoh your agent. Verify that the connection is successful and
Test to test the rconnection
e
j d s OracleDIAgent1 tab.
then clickaOK. Closeuthe
(
j d er
A
d imir
Vla

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
Even though the Physical Agent tests correctly, you still need to make a logical agent.
That is in the next lab. tra ns
n -
5. Stop your standalone agent.
a no
h a s ideฺ
a. Open a new Terminal window (or new tab within the other terminal window) and
) t Gu
execute the command to change directory:
m
o
ฺc den
[oracle@hostname]$ cd $FMW_HOME
o o
ah is Stu
[oracle@hostname]$ cd user_projects/domains/agent1/bin
y
er@ se th
[oracle@hostname bin]$ pwd

( a j d
/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/agent1/bin
u bin]$
r
[oracle@hostname
de the OracleDIAgent1 standalone agent:
b.AjStop

d imir [oracle@hostname bin]$ ./agentstop.sh -NAME=OracleDIAgent1


Vla Alternatively, you could have just gone to the terminal with the agent running in it, and
pressed Ctrl + C, but that is less graceful and a generally bad habit.
c. Exit ODI Studio.
This completes Practice 3-1. This completes the practices for Lesson 3.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 23
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 24
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices ofor
n -tLesson 4:
a n the Physical and
Describing
h a s ideฺ
Logical
) GuArchitecture
ฺ c omChapter
e nt4
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

Copyright © 2014, 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
In this practice, you define the work infrastructure in the topology by creating contexts, a data
server, and physical and logical schemas.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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
Overview
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
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

new data server and its attached physical schemas.


Data Server: ORACLE_ORCL_LOCAL
Define two of three schemas available in this instance:
Schema Description
SALES_DEV Schema storing the target tables for development purposes
SALES_PROD Schema storing the production target tables to
ODI_TEMP Schema that is used to store ODI temporary objects (not used c inen
se
this practice) l e li
b
rastructures
Both the SALES_DEV and SALES_PROD physical schemas contain identical ftable
s e and
correspond to the same logical schema called ORACLE_ORCL_LOCAL_SALES.
t r a n The mapping for
this logical schema depends on the context. n -
opractice
n
a eฺ sessions.
Note: Completing these tasks is critical for all subsequent
s
ha uid
)
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
i m ir
Vl ad

This practice consists of the following six steps:


1. Define the Production context.
2. Define the Development context. (A third context, Global, is already pre-seeded for you.)
3. Define the ORACLE_ORCL_LOCAL data server.
4. Define the ODI physical schemas for the data server: SALES_DEV, SALES_PROD.
5. Define the ORACLE_ORCL_LOCAL_SALES ODI logical schema.
6. Map the logical schema to the two physical schemas, in terms of the three contexts.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 3
Your Tasks
1. Reset the environment for your practice.
a. If connected, disconnect from the ODI repository (select ODI > Disconnect).
Note: Alternatively, you can just close ODI Studio.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Start the Terminal window and execute the following command to change the directory:
cd /home/oracle/labs
e to
lic ens
b l e
f e ra
tra ns
n -
[oracle@hostname ~]$ cd ~/labs
a no
[oracle@hostname labs]$
h a s ideฺ
m ) t GtouPractice 4:
c. Execute the command to reset your o environment
ฺc den
o o
ah is Stu
./reset04.sh
2. y
Connect to the ODI repository.

j d er@
a. If it is not already started,
s e th ODI Studio.
start
(
b. Click Connect
r u
a To Repository. When prompted for Wallet Password, enter Welcome1.
jd
Thene click OK.
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


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

c. For Login Name, select DEV_ODI_REPO. Click OK.


Note: In this ODI environment, the username SUPERVISOR and password Welcome1
are predefined for login.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
3. Create a new context:
h a s ideฺ
m G u accordion bar to expand it.
a. Click the Topology tab, and then click )the Contexts
o
ฺc den t
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
r
dimi
Vla
b. Click the New Context icon on the Contexts bar, and then select New Context.

c. Enter your context parameters as shown below. The context window should appear as
follows.
− Name: Production
− Code: PRODUCTION (filled in automatically in uppercase)

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 5
− Password: Leave this field empty.
− Default: Leave this check box unselected.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
d. Create another new context, repeating the operations:
lic ens
− Name: Development e
b l
− Code: DEVELOPMENT (filled in automatically in uppercase)
f e ra
− Password: Leave this field empty.
tra ns
− Default: Select this check box. n -
a no
h a eฺ All
s ClickidSave
Click Yes to confirm in the Confirmation window. .

m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 6
The contexts should appear as follows:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Notice the very small checkmark on Development to indicate that it is the default.
4. Create an ORACLE_ORCL_LOCAL data server:
a. Click the Physical Architecture bar. Expand the Technologies node, scroll down and
e to
ens
select the Oracle node, and then right-click and select New Data Server.
lic
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 7
b. Enter the following information on the Definition tab:
− Name: ORACLE_ORCL_LOCAL
− Instance / dblink (Data Server): ORCL
− User: system
− Password: Welcome1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 8
c. Click the JDBC tab. Click Search to the right of the JDBC Driver field. In the
window that appears, select Oracle JDBC Driver, and then click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
d. Click Search -tr
to the right of the JDBC URL field. In the URL examples window,
o n
n
select the first URL in the Name list, and click OK.
a
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 9
e. Edit the JDBC URL to match the following:
jdbc:oracle:thin:@localhost:1521:orcl
The JDBC tab should now appear as follows:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
5. Test this data server:
a. Click Test Connection. In the Confirmation dialog box, click Yes to confirm saving lic ens
your data before testing the connection. In the Information window, click OK. In the b l e
Test Connection dialog box, click Test. f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

b. In the Information dialog box that reports a successful connection, click OK.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 10
6. 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: ODI_TEMP
− Default check box: Selected
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 11
b. In the new window that appears, select SALES_DEV from the Schema (Schema)
drop-down list, and then select ODI_TEMP from the Schema (Work Schema) drop-
down list. Select the Default check box. In the Confirmation window that appears, click
OK. Leave all the other fields unchanged. Click Save . Click OK in the Information
window that appears.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

c. Expand: Oracle > ORACLE_ORCL_LOCAL. The Physical schema


ORACLE_ORCL_LOCAL.SALES_DEV appears in the tree view:

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 12
7. Create a second physical schema for the ORACLE_ORCL_LOCAL data server. Name it
ORACLE_ORCL_LOCAL.SALES_PROD. The name gets constructed automatically from the
information below:
− Data Schema: SALES_PROD
− Work Schema: ODI_TEMP
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

− Default Schema: Not selected


a. Select the ORACLE_ORCL_LOCAL data server in the tree view, and then right-click and
select New Physical Schema.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
b. In the Physical Schema panel, ฺselect e n
c SALES_PROD from the Schema (Schema) drop-
o o
down list, and then selecthODI_TEMPtu
d
from the Schema (Work Schema) drop-down
list. Confirm that the y
a is Sbox is not selected, and leave all the other fields
Default check
@
er Savese t.hIn the Information window, click OK.
unchanged.
( a j dClick
u
r
A jde
d imir
Vla

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

8. Create a logical schema, ORACLE_ORCL_LOCAL_SALES, and map this schema to different


e to
physical schemas, for the different contexts.
− Development Context: To ORACLE_ORCL_LOCAL.SALES_DEV physical schema l ic ens
bl e
− Global Context: To ORACLE_ORCL_LOCAL.SALES_DEV physicalrschema a
fephysical schema
− Production Context: To ORACLE_ORCL_LOCAL.SALES_PROD n s
a expand the
a. In Topology Navigator, select the Logical Architecturentab- trand
Technologies node. Select Oracle, right-click and n o New Logical Schema.
select
a
s ideฺ
h a
) t Gu
o m
o o ฺc den
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 14
b. Enter the name of the logical schema: ORACLE_ORCL_LOCAL_SALES. To map this
logical schema to physical schemas in different contexts, from the drop-down lists,
select the appropriate physical schema for each context, as shown in the following
screen. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
9. The logical schema FILE_DEMO_SRC is predefined for you and is mapped in the
lic ens
predefined Global context to a physical schema that represents a subfolder in a file system.
b l e
Map FILE_DEMO_SRC to the same physical schemas in the new Development and
f e ra
Production contexts that you defined earlier.
ans
o n -tr
a. In the Logical Architecture, expand the File node, and double-click the
n
FILE_DEMO_SRC logical schema. Ensure that the logical schema FILE_DEMO_SRC is
a
mapped to the physical schema
h a s ideฺ
) t Gu
FILE_GENERIC./home/oracle/labs/files/flat_files
m
o
in the Development, Global, and Production contexts, as follows. Click Save.
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

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


• In XML technology, the logical schema XML_DIM_GEO should be mapped to the
physical schema XML_GEO_DIM.GEO, as follows. Click Save.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 16
• In MySQL, the logical schema MySQL_SALES_DEV should be mapped to the
physical schema LOCAL_MYSQL.sales_dev in all contexts.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ open
Close any remaining
s e h Save your work if prompted to do so.
ttabs.
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 17
10. You have set up standalone ODI agent OracleDIAgent1 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
OracleDIAgent1. Similarly, open the Logical Architecture Agent standalone. Ensure
that this Logical Agent, standalone, is linked to Physical Agent OracleDIAgent1 in
all three contexts as follows. Save your changes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
A jde
m irb. Restart the agent in a terminal window.
l a di
V [oracle@hostname]$ cd $FMW_HOME
[oracle@hostname]$ cd user_projects/domains/agent1/bin
[oracle@hostname bin]$ pwd
/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/agent1/bin
[oracle@hostname bin]$ ./agent.sh -NAME=OracleDIAgent1
...many lines omitted for clarity...
2014-01-14 18:58:21.575 NOTIFICATION New data source:
[DEV_ODI_REPO/*******@jdbc:oracle:thin:@(description=(address=(host=localhost)
(protocol=tcp)(port=1521))(connect_data=(service_name=ORCL.US.ORACLE.COM)(serv
er=dedicated)))]
2014-01-14 18:58:22.358 NOTIFICATION ODI-1111 Agent OracleDIAgent1 started.
Agent version: 12.1.2 - 17/09/2013. Port: 20910. JMX Port: 21910.
2014-01-14 18:58:22.358 NOTIFICATION ODI-1136 Starting Schedulers on Agent
OracleDIAgent1.
2014-01-14 18:58:23.452 NOTIFICATION ODI-1137 Scheduler started for work
repository workrep on Agent OracleDIAgent1.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 19
c. In the Physical agent’s OracleDIAgent1 tab, click Test, and verify successful
connection. Click OK, and then close all the tabs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
d. To kill the agent in the terminal window, press Ctrl + C. There are more graceful ways
f e ra
to stop the agent, but this is fine for the lab.
ans
e. Exit ODI Studio.
o n -tr
n
This completes Practice 4-1. This completes the practices for Lesson 4.
a
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 20
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 5:
Settinga n a New ODI Project
Up
a uide s ฺ
) h 5G
c o mChaptern t
o o ฺ d e
ah is S t u
y
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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
In this practice, you create a new ODI project and import Knowledge Modules that will be used
in subsequent practice sessions.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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
Overview
You create a project named HandsOnLoads with a folder named HandsOn. You import
knowledge modules for working with three sources (MySQL, XML, and File) and one target
(Oracle).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Note: Completing this practice is critical for all the following practice sessions.

Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).

e to
lic ens
b l e
f e ra
tra ns
b. In the Terminal window, execute the following commands:
n -
[oracle@hostname ~]$ cd ~/labs
a no
[oracle@hostname labs]$ ./reset05.sh
h a s ideฺ
m ) tfrom
When prompted, verify that you disconnected G uthe ODI repository, and then press
o
ฺc executes.
e n
o
Enter. Wait until this script completely
o d
tu minute.
Note: This process may
y ahtake up
s S
to one
2. r @ e thi
Connect to the ODI repository.
e
a
a. If necessary,
( jd restartuODI
s Studio from the desktop.
d
b. Click
j er“Connect To Repository.” When prompted for Wallet Password, enter Welcome1.
m ir A Then click OK.
l a di
V

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

Practices for Lesson 5: Setting Up a New ODI Project


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

c. For Login Name, select DEV_ODI_REPO. Click OK.


Note: In this ODI setup, the username SUPERVISOR and password Welcome1 are
predefined for login.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s HandsOn.
3. Create a project, HandsOnLoads, with a folder called
i d eฺ
m )bar, click
G u
o
a. On the Designer tab, click the Projects
ฺc den t New Project , and then select
New Project.
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
r
dimi
Vla b. Enter the name of the project: HandsOnLoads. The Code field is automatically filled
with your Name field entry in uppercase.

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 4
c. Click Save to create the project. The project appears in the tree view. Expand the
HandsOnLoads project node.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

d. ODI creates a folder named FirstFolder. Double-click this folder. In the editing
window that appears, change the name in the Name field to HandsOn. Click Save.
e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
c required
ฺare e nfor working with the following technologies:
o
4. Import the Knowledge Modules that
o d
• Sources: y ah is Stu
− MySQL er@ th
− XML(a j d u s e
r
A j−deFile
r
dimi • Targets:
Vla − Oracle

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 5
a. In Designer > Projects, expand the HandsOnLoads project node. Right-click the
Knowledge Modules node, and then select Import Knowledge Modules.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
b. -tr
The Import Knowledge Modules (XML File) window appears. In the File Import
o n
n
directory field, navigate to the folder xml-reference located at:
a
a s ideฺ
/u01/app/oracle/Middleware/Oracle_Home/odi/sdk/xml-reference
h
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 7
c. Select the following knowledge modules that will be used in this project. Be very careful
in making your selections, because there are several knowledge modules that have
similar names. Click OK.
− CKM SQL (this may automatically select CKM Hive too, but that is a bug)
− CKM Oracle
− IKM Oracle Incremental Update
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

− IKM SQL Control Append


− LKM File to SQL
− LKM SQL to Oracle

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

e to
lic ens
b l e
f e ra
ans
d. n -tr
Review the Import Report, and then click Close.
o
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

If you see that you imported Hive as well, you can ignore it.

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 10
e. Check the imported Knowledge Modules by expanding corresponding nodes under
HandsOnLoads > Knowledge Modules, as shown here:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no enable you to share
5. Look at Global Knowledge Modules. Global Knowledge
a
Modules
s A bestd ฺ is to import as Global
epractice
specific knowledge modules across multiple projects.h
) t Gused i
u by multiple projects.
Knowledge Modules those KMs that will be
o m frequently
c to dimport n the Knowledge Module once, rather than
− One benefit is that you only
o o ฺneed e
ah using
import it into each project Sit.tu
y s
hi need to modify the Knowledge Module, the modification
@is thateiftyou
− Another benefit
e r
( a jd touallsprojects using the Knowledge Module.
will propagate

j d er Designer Navigator, expand the Global Objects tab.


a. In the

m ir A
l a di
V

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 11
b. Right-click Loading (LKM) and select Import Knowledge Modules.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
c. The Import Knowledge Modules (XML File) window appears. Scroll down the list and
f e ra
select IKM SQL to SQL Control Append. Click OK.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 12
d. The Import Report appears, showing IKM SQL to SQL Control Append. Click CLOSE.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu
y ahModules
e. In the Global Knowledge s Snode, expand Integration (IKM). The IKM SQL to
e r
SQL Control Append
e hi module is now ready to be shared among multiple
@ knowledge
t
projects.ajd u s
er (
A j d
d imir
Vla

Note: You may have already had a copy of IKM SQL to SQL Control Append, in which
case you now also have another copy. You can ignore that copy.
Note: This example is to practice creating Global Knowledge Modules. You will not be
using this particular Global Knowledge Module in subsequent lab practices.

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 13
f. Close ODI Studio.
This completes Practice 5-1. This completes the practices for Lesson 5.c
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 6:
Oracle a n Integrator Model
Data
h a s ideฺ
Concepts
) Gu
ฺ c omChapter
e nt6
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

Copyright © 2014, 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
In this practice, you create the models corresponding to the data, and reverse-engineer the
schemas’ data structures.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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 Models by Reverse-Engineering
Overview
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
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

structure of an XML file to a Geographic Information model that you define.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 3
Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. In the Terminal window, execute the following commands:


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset06.sh
e to
When prompted, verify that you disconnected from the ODI repository, and then pressns
Enter. Wait until this script completely executes. l ic e
bl e
Note: This process may take up to one minute.
fe r a
2. Connect to the ODI repository.
n s
a. If necessary, restart ODI Studio from the desktop.
n - tra
b. Click “Connect To Repository.” When prompted for n o Password, enter Welcome1.
Wallet
Then click OK. a
s ideฺ
h a
) t Gu
o m
o o ฺc den
y ah is Stu
j d er@ se th
r ( a u
A jde
m ir
l a di
V

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 4
c. For Login Name, select DEV_ODI_REPO. Click OK.
Note: In this ODI setup, the username SUPERVISOR and password Welcome1 are
predefined for login.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

3. Create a model for the Oracle schema.


e to
ens
a. In the Designer Navigator, click the Models bar.
lic
b. Click the New Model icon and then select New Model.
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
c. j d
Specify (entereorr@ s e
select)
th
the following parameters on the Definition tab:
r
• eName:
u Application
(a Oracle Sales
jd
A• Code: ORACLE_SALES_APPLICATION (entered automatically in upper case)
i m ir
d • Technology: Oracle
Vla • Logical Schema: ORACLE_ORCL_LOCAL_SALES

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 5
The Definition tab should look like the following:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
l ic ens
e
bl select (or
r a
d. Click the Reverse Engineer tab (make sure it is the tab, not the button),
feSave.
and
s
simply confirm) Development from the Context drop-down list. Click
n
n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 6
4. Reverse-engineer all the tables in this model.
a. Click the Reverse Engineer button.
Note: The progress of the reverse-engineering process is shown on the status bar.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
b. o n -tr
Verify the model reverse-engineered successfully. In the tree view, expand the Oracle
a n
Sales Application model. The datastores of the model appear.
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 7
c. Expand the TRG_CUSTOMER datastore, and then expand the Attributes and Constraints
nodes. The list of columns and constraints that were reverse-engineered for this table
appear in the tree view.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a
Check that the columns and constraints that were no
reverse-engineered for the
s e ฺ
hadefinition
TRG_CUSTOMER table correspond to its data
) u idlanguage (DDL) given below.
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 8
This was the DDL that was used to create the target customer table:
CREATE TABLE trg_customer (
cust_id NUMERIC(10) NOT NULL,
dear VARCHAR(4),
cust_name VARCHAR(50),
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

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, e to
CONSTRAINT pk_trg_customer PRIMARY KEY (cust_id),
lic ens
CONSTRAINT fk_cust_city FOREIGN KEY (city_id)
b l e
REFERENCES trg_city (city_id));
f e ra
tra
Note: The constraint called FK_SALES_CUST TRG_SALES is defined on another table. ns
n -
Because it references TRG_CUSTOMER, it also appears here.
a no
d. Close the Oracle Sales Applications tab and model.
5. Create a model for an XML file. h a s ideฺ
m ) t Gu
a. Click the New Model icon o
ฺcand thene n New Model.
select
o o d
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 9
b. Specify (enter, select, or confirm) the following parameters on the Definition tab:
• Name: Geographic Information
• Code: GEOGRAPHIC_INFORMATION (entered automatically in uppercase)
• Technology: XML
• Logical Schema: XML_DIM_GEO (selected by default)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

The Definition tab should appear as below. Click the Reverse Engineer tab.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
c dfrom
c. Select (or simply confirm) Development
ฺ e n the Context drop-down list. Click Save.
h o
o Stu
a
y his
e r @ e t
( a j d u s
r
A jde
d imir
Vla

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 10
6. Reverse-engineer all the tables in this model.
a. Click the Reverse Engineer button.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
Note: The progress of the reverse-engineering process is shown
t r a nson the status bar.
-the tree view, expand the
onmodel
b. Verify that the model reverse-engineered successfully. In
Geographic Information model. The datastores ofn the appear.
a ฺ
) has uide
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 11
7. Using Linux’s Applications > System Tools > File Browser (or equivalent), open the XML file
GEO_DIM.xml corresponding to the XML model that you have reverse-engineered.
a. Go to the folder /home/oracle/labs/files/xml/.
b. Right-click the GEO_DIM.xml file and select Open with “Firefox Web browser”.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o u
there:
y ahas shown
c. The file structure appears s S
e r @ e thi
( a jd u s
j d er
A
d imir
Vla

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

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 12
8. Compare the XML file content with the reverse-engineered structure in the Hierarchical view.
In Designer’s tree view, expand the Geographic Information node and then the Hierarchy
node. Expand the datastores under this node.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
The hierarchy of the y XML Stu here. The XML file has been mapped to a
ahfile isisreproduced
r@witheforeign
relational structure,
hierarchy. jde
th keys to map the links between the different levels of
a
(desktop. u s
9. r
Clean upethe
jd
a.A Close the XML Browser (Firefox).
m i r
l a di b. Close the Geographic Information model tab.
V c. Close ODI Studio.
This completes Practice 6-1. This completes the practices for Lesson 6.

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 13
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 7:
a n ODI Models and
Organizing
h a s ideฺ
Creating
) GuODI Datastores
ฺ c omChapter
e nt7
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

Copyright © 2014, 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
In this practice, you check the quality of data in the models and define constraints on these
models.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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
Overview
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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

First, you create a new model, MySQL_ORDERS_APPLICATION, as a duplicate of the model


MyQL_SRC.
You then create a referential constraint on the SRC_CUSTOMER table’s 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.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Copyright © 2014, 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
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. In the Terminal window, execute the following reset commands:


When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
e to
[oracle@hostname ~]$ cd ~/labs
lic ens
[oracle@hostname labs]$ ./reset07.sh
b l e
Note: This process may take one minute or more to complete. f e ra
c. Restart ODI Studio from the desktop.
tra ns
n -
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past. a no
h a s ideฺ
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. m ) t Gu
o
ฺc den
o
2. Create a new model, MySQL_ORDERS_APPLICATION_1, as a duplicate of the model MySQL
o
Orders Application.
y ah is Stu
d e r@the Models
a. In Designer, open
e th bar. Right-click the MySQL Orders Application
( j u s
a select Duplicate
model and Selection to duplicate the datastore. Click Yes.
r
A jde
d imir
Vla

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

b. Open Copy of MySQL Orders Application and rename it MySQL_Orders


Application_1. For Code, enter MYSQL_ORDERS_APPLICATION1. Click Save to
save the model.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
c. e receive a warning message, click Yes to finish saving. Close the tab.
If you
j d
r A
d i mi
Vl a

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 5
3. Create a reference constraint between the SRC_CUSTOMER and SRC_CITY datastores in the
new model. This reference is on the CITY_ID column.
a. Expand the MYSQL_ORDERS_APPLICATION1 model, and then expand the
SRC_CUSTOMER datastore.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b. Right-click the Constraints node, and select the New Reference option. b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

c. In the Parent Model/Table sections, from the Table drop-down list, select the
SRC_CITY table. The name of the constraint is automatically generated.

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 6
d. Click the Attributes tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e. 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.
e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m G u that the phone number contains
) tot check
4. o
Create a condition constraint on SRC_CUSTOMER
ฺc den
six or more characters.
o o tuSRC_CUSTOMER, right-click, and select the New
h againSfor
a. Select the Constraints
y anode s
r
Condition option.
e @ e thi
( a jd u s
j d er
m ir A
l a di
V

b. Fill in the new Condition fields:


− Name: Phone Number Length
− Type: Oracle Data Integrator Condition
− Where: LENGTH(SRC_CUSTOMER.PHONE) > 6
− Message: A phone number should contain more than 6 characters.

Note: You can also use the Expression Editor icon to graphically edit the
expression.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 7
c. Click the Validation icon to validate your expression syntax.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

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

e to
lic ens
b l e
f e ra
tra ns
n -
5. no model.
Run a static check on the MySQL_Orders_Application1
a
a s and d ฺ the Control tab.
eclick
a. Open the MySQL_Orders_Application1 h model
) t Gu i
o m
o o ฺc den
y ah is Stu
j d er@ se th
r ( a u
A jde
m ir
l a di
V

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 8
b. Select the knowledge module CKM SQL.HandsOnLoads. Click Save. Close the
MySQL Orders Application1 model tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
6. Run a check against the model.
b l e
a. Select the MySQL_Orders_Application1 model in the tree view, right-click, and
f e ra
select Control > Check.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 9
b. In the Run dialog box, select Development context and then click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

to
c. Click OK when the Information dialog box notifies you that the session has started. en
se
e l ic
r a bl
n s fe
n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 10
7. Click the Operator tab . (If there is no Operator tab, go to the main menu, F10 >
Window > ODI Operator Navigator.) The Operator window appears. Expand Session List
> All Executions. Expand the MySQL_Orders_Application1 session. The session
should appear complete, containing steps marked with check marks and warnings, as
shown below.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 11
8. Review the errors detected in the SRC_CUSTOMER datastore.
a. Click the Designer tab. On the Models bar, expand MySQL_Orders_Application1
model, select the SRC_CUSTOMER datastore, right-click, and select Control > Errors.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 12
b. View the table that lists the errors detected in your table. You have one join error and
five invalid phone numbers. Each line also contains the contents of the invalid record.
Scroll all the way to the right to examine the extra columns in this error report.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
9. Clean up the desktop.
b l e
a. Close the Errors tab.
f e ra
b. Close ODI Studio.
ans
n -tr
This completes Practice 7-1. This completes the practices for Lesson 7.
o
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 13
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores
Chapter 7 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 8: ODI
Mappinga nConcepts
a uide s ฺ
) h 8G
c o mChaptern t
o o ฺ d e
ah is S t u
y
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 1
Practices for Lesson 8: Overview
Practice Overview
In this practice, you create simple mappings, run these mappings, and verify their execution.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


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

These mappings 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
mapping to perform transformations. In this practice, you create simple mappings with one
target table and a single source. You will run these mappings and check the execution.
In this practice, you create three mappings. First, you create a mapping called MAP_8-1,
loading the TRG_COUNTRY datastore in the Oracle Sales Application model with the content of
e to
the SRC_REGION table from the MySQL Orders Application model. This simple mapping has no
transformations. lic ens
The second mapping, MAP_8-2, is a duplicate of MAP_8-1, to which flow control is activated b l e
and constraints in the target table are checked. f e ra
ans
o n -tr
The third mapping, MAP_8-3, loads the TRG_COUNTRY datastore in the Oracle Sales
Application model with the content of the SRC_CITY table from the MySQL Orders Application
a n
model. In this mapping, flow control is activated, constraints in the target table are checked, and
a s ideฺ
city population values are transformed from individual to times 1,000.
h
m ) t Gu
Note: Completing this practice is critical for other practice sessions.
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

[oracle@hostname ~]$ cd ~/labs


[oracle@hostname labs]$ ./reset08.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in e to
the past.
lic ens
2. Create a mapping called MAP_8-1, loading the TRG_COUNTRY datastore in the Oracle Sales
b l e
Application model with the content of the SRC_REGION table from the MySQL Orders
f e ra
Application model. Map the columns of the same name without any transformation. Ensure
ans
that you take only distinct records.
o n -tr
n
a. In Designer, click the Projects tab, and expand the HandsOnLoads project. Expand
a
h a s ideฺ
the HandsOn folder. Select the Mappings node, right-click, and select the New
Mapping option.
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 4
b. In the Mapping window, enter MAP_8-1 as the name of the mapping. Deselect Create
Empty Dataset. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

to
c. Click the Logical tab. Arrange the panels so that you can see the Properties MAP_8-1 e n se
panel and fields. You may want to not view the thumbnails at this time.
e l ic
r a bl
n s fe
n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 5
d. In the Designer Navigator to the left, click the Models bar. In the tree view, expand the
Oracle Sales Application model. Drag the TRG_COUNTRY datastore from the tree
view to the right side of the modeling zone (see the previous screen: the panel with text
stating “Drag objects from the navigator here…”). The datastore model appears in this
zone.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 6
e. Expand the MySQL Orders Application model and drag the SRC_REGION datastore
from the model tree to the left side of the modeling zone in your diagram.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
f.
A de may be multiple
jThere regions per country. If you mapped SRC_REGIONS directly to

m ir TRG_COUNTRY, you would get duplicates. To prevent duplicates, drag a Distinct

l a di component in between the two models.


V

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 7
g. Connect the two models through the Distinct component, source to target. Drag the
source-right port (circle) to one side of the Distinct, drag the other side of the Distinct to
the target-left port (circle).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

h. An Attribute Matching dialog box appears each time you connect to the Distinct
component. Click OK each time. Now the system automatically maps attributes by
name in the source and target datastores.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
then

The grey (filled) arrows indicate which fields auto-mapped, whereas the white (hollow)
arrows indicate which did not automap. (Later you will see yellow arrows.) You may
need to drag the bottom frame handle of the DISTINCT down to see all of the fields.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 8
i. If you left it like this default mapping, ODI would think that each region should be
distinct, but then you would get duplicate countries. So select and delete the
DISTINCT.REGION_ID attribute.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
And also delete DISTINCT.REGION. You should be left with this:

a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 9
j. Select TRG_COUNTRY, and in the Properties panel, change the Target > Integration
Type to Incremental Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 10
k. Click the Physical tab. After the flow diagram initializes, you may want to use the
zoom-out button to see all the objects in the diagram. There is nothing you need to do
here at the moment, but it is interesting to click objects to see their properties. Do not
change anything here yet.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
l. Click Save to save your mapping. If the Locking Object window appears, select “Don’t
show this window next time,” and click Yes.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 11
3. Run this mapping, and check the content of the TRG_COUNTRY table.
a. Expand the Mappings node, right-click the newly created MAP_8-1, and select Run.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
@ e th
erExecution
b. Click OK injdthe s window, and then click OK when the Session Started
( a u
j d er
message appears.
A
d imir
Vla

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

Note: You may need to click the Refresh button to view the new session.

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

Practices for Lesson 8: ODI Mapping Concepts


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

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
The warning about Drop work table m ) t Gignored.
can be safely
u
o
c Logical
ฺthe e ntab. Right-click TRG_COUNTRY, and then
o
e. In your mapping window, click
o d
select Data. y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 13
f. A window appears with the loaded data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
Verify your data and close this window. ClosesMAP_8-1etab.
a d ฺ If the Unlocking Object
window appears, select the “Don’t show) h
this u
window inext time” check box and click
m G
Yes.
o ฺ co dent
a h o Stu
@ y his
d e r e t
( a j u s
e r
r Ajd
d i mi
Vl a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 14
4. Create a mapping called MAP_8-2 that loads the TRG_REGION datastore in the Oracle
Sales Application model with the content of the SRC_REGION table from the MySQL Orders
Application model. 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 mapping uses the same source as the previous one, you will
duplicate MAP_8-1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

a. Click the Designer tab. Expand the Projects bar, the HandsOnLoads project, and the
HandsOn folder. Expand the Mappings node and select MAP_8-1. Right-click and
select Duplicate Selection, and then click Yes in the confirmation box. A copy of your
mapping appears.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 15
b. Double-click the mapping Copy of MAP_8-1 to edit it. Click the Overview tab. In the
Definition > Name field, change the name to MAP_8-2, and then click the Logical tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
c. Click Perform Layout a
to realign the view
h i d eฺ zone.
sof the modeling
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 16
d. Right-click TRG_COUNTRY and click Delete.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
ens
e. Confirm the Delete by clicking Yes.
lic
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m
f. Select and delete the connector from ) t Guto DISTINCT. Deselect “Preserve
SRC_REGION
downstream expressions.” o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 17
g. In the Designer tab, click the Models bar, and then drag the TRG_REGION datastore
from the Oracle Sales Application model to the modeling zone. Leave the source
datastore unchanged.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
h. -tr
Connect everything together for the proper flow.
o n
n
1) Connect the right side of SRC_REGION to the left side of DISTINCT. Click OK to
a
h a s ideฺ
accept the default Attribute matching.

m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 18
2) Connect the right side of DISTINCT to the left side of TRG_REGION. Click OK to
accept the default Attribute matching.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
3)
jd eIt should now look like this:
i r A
di m
V l a

The grey arrows indicate which fields auto-mapped, whereas the white arrows indicate
which did not automap.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 19
i. Click TRG_REGION and in the Properties panel, change Target > Integration Type to
Incremental Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 20
j. Click the Physical tab, then click TRG_REGION, and change the Integration Knowledge
Module to IKM Oracle Incremental Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
Note that in the Properties section Options list, the FLOW_CONTROL is set to True.
k. Scroll down to verify in Physical > Check Knowledge Module that the selected Check
Knowledge Module is CKM Oracle.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 21
l. Click the Logical tab. Verify that in the Logical > Constraints section, the value for
each of the two Constraints should be “true”.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
m. Click Save to save your mapping. f e ra
ans
a. Click Run. o n -tr
5. Run this mapping, and check the contents of the TRG_REGION table.

a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
b. Click OK in the Execution window, and then click OK when the Session Started
message appears.

Note: Do not let the name MAP_8-1_DS bother you, that is okay, it really is MAP_8-2.
If it does bother you, you could have changed it on the Physical tab.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 22
c. In ODI Operator, verify that your new mapping executed successfully. You may need to
refresh the list by contracting and then expanding the All Executions node in the
Session List:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
(
d. In ther Mapping
u click the Logical tab. Select the TRG_REGION target datastore
a window,
A de the name of the datastore), right-click, and select Data. A window appears with
j(click
d imir the loaded data.
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 23
e. Verify the data, close this window, and then close your mapping MAP_8-2.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
6. Create a mapping called MAP_8-3 that o
ฺc loadsdthee nTRG_CITY datastore in the Oracle Sales
o o of thetu
ah control
Application model with the contents
Application model. Ensureythat flowis
S SRC_CITY table from the MySQL Orders
is activated and all constraints in the target table
are checked. You need
j d er@to transform
s e th the city population values because the target table unit
is “thousands
r ( u whereas the source table unit is “inhabitants.”
aof inhabitants,”
e open, click the Designer tab, and click the Projects bar. Expand HandsOnLoads
a. jIfdnot
A
ir > HandsOn folder. Right-click the Mappings node and select New Mapping.
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 24
b. In the Mapping Definition tab, enter the name MAP_8-3. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

c. Click the Logical tab. Open the Designer > Models > Oracle Sales Application
model. Drag the TRG_CITY datastore from the tree view to the model zone. The
datastore appears in this zone.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 25
d. Expand the MySQL Orders Application model and drag the SRC_CITY datastore
from the model tree to the model zone of your diagram.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
e. Connect SRC_CITY to TRG_CITY. (Because they are
a nothe same number, names, and
h a s ideฺ
types of columns, you do not need a Distinct component.)

m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 26
f. Click OK to perform Attribute Matching.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
(
Note:r All u are grey, none of the arrows are white, and all fields mapped
aof the arrows
de though the column order was different.
Ajeven
i m irg. Select the POPULATION column in the target TRG_CITY datastore.

Vl ad

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 27
h. In the POPULATION - Properties section of the Property Inspector, in the Target 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 down.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
i. a
To verify the mapping (and the transformation
h i d eฺ click Validate the Mapping
sexpression),
m ) t Gu
. Close the Validation Results window.
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 28
j. Click the Logical tab. Click TRG_CITY. In TRG_CITY - Properties > Target >
Integration Type, select Incremental Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 29
k. Click Physical and click TRG_CITY. In the TRG_CITY - Properties, scroll down the
Integration Knowledge Module. Select IKM Oracle Incremental Update. In the
Options list, scroll to FLOW_CONTROL, and ensure that it is set to True.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 30
l. Click Physical and click TRG_CITY. Ensure that the selected Check Knowledge
Module is CKM Oracle.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 31
m. Click Logical and click TRG_CITY. In TRG_CITY - Properties > Constraints, the value
for each Constraint should be “true”. Click Save to save your mapping. Close your
mapping editor tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 32
7. Run this mapping, and check the content of the TRG_CITY table.
a. In Designer > Projects, right-click mapping MAP_8-3, and then select Run.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc and dthen
e n
o o
b. Click OK in the Execution window,
tu click OK when the “Session started”
message appears. yah S
r @ t h is
( a jde use
j d er
A
d imir
Vla

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 33
c. Open the Operator Navigator and verify that your mapping session executed
successfully:

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


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
d. e look at some of the “Drop xxxx table” warnings, they are present because the
jIfdyou
A
ir temporary work table was not there to be dropped, because by default ODI cleaned up
di m after itself in the past before this particular run. There are numerous ways of dealing
V l a with this warning, all of which are optional. These messages can be safely ignored.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 34
e. In the Designer navigator, open the Models bar. In the Oracle Sales Application
model, right-click the TRG_CITY datastore and click View Data. A window appears
with the loaded data. Scroll down and view the total number of loaded records and
loaded data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

f. Verify the data, and then close the Data: TRG_CITY tab.
Note: The POPULATION column should show thousands of inhabitants.
8. Clean up the desktop by closing ODI Studio.
This completes Practice 8-1. This completes the practices for Lesson 8.

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 35
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 36
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 9:
a
Designingn Mappings
a uide s ฺ
) h 9G
c o mChaptern t
o o ฺ d e
ah is S t u
y
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 1
Practices for Lesson 9: Overview
Practices Overview
In Practice 9-1, you create a mapping with several sources.
In Practice 9-2, you implement a lookup by using the mapping created in the previous practice,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

perform execution simulation, and run the newly created mapping.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


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

a date when data was updated.

Background
In the previous practices, you created simple ODI mappings.
In this practice, you create a more complex mapping with several sources to load the
TRG_CUSTOMER datastore in the Oracle Sales Application model with the contents 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
e to
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. lic ens
Create mapping MAP_9-1 b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
Your Tasks
di m
1. Reset your practice environment.
V l a a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset09.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 3
2. Create a mapping called MAP_9-1, loading the TRG_CUSTOMER datastore in the Oracle
Sales Application model.
a. In ODI Designer, click the Projects bar and then Mappings. Right-click and select
New Mapping. In the New Mapping window, enter MAP_9-1, and then click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
b. -tr
Make sure the Properties panel is visible at the same time as the Logical model zone.
o n
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 4
c. In the Designer Navigator, click the Models bar, and then in the tree view, expand the
Oracle Sales Application model. Drag the TRG_CUSTOMER datastore from the tree
view to the right side of the model zone. The datastore appears in this zone.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
d. In the Design navigator Models bar, expand the FLAT_FILE_SRC
t r a nsofmodel. Drag the

on-
SRC_SALES_PERSON datastore to the left side of the model zone your diagram.
n
a eฺ
h a s id
) u
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 5
e. Fix the datastore alias to be more descriptive but still short. Select the datastore you
just dragged labeled TES, and change the Properties > General > Name to
SRC_SALES_PERSON.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺcbar, expand
e nthe MySQL Orders Application model
o
f. In the Design navigator Models
o d
and drag the SRC_CUSTOMER
y s Stu to the model zone of your diagram, under the
ah idatastore
SRC_SALES_PERSON
e r @ datastore.
e t h Your diagram should resemble the following:
( a jd u s
j d er
A
d imir
Vla

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 6
g. Drag a Join component to in between the SRC_ and TRG_ datastores.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
h. In the diagram, drag the CUSTID column from the SRC_CUSTOMER source to the
b l e
workbench (the white background). A Filter component appears for the CUSTID
f e ra
column.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 7
i. Drag the ID column of the SRC_SALES_PERSON datastore to the left connector (circle)
on the Join. Drag the right connector of the Filter to the left connector of the Join. A join
appears between these two sources.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 8
j. Select the Join. Drag the SALES_PERS_ID column from the SRC_CUSTOMER source
datastore to the JOIN - Properties > Condition > Join Condition. Put an equals sign
between the fields in the condition. It should read:
SRC_SALES_PERSON.ID = SRC_CUSTOMER.SALES_PERS_ID
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 9
k. Click the Filter. Edit the filter expression to:
SRC_CUSTOMER.CUSTID < 105
Set Execute on Hint to Source.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 10
l. Drag the right port on the Join to the left TRG_CUSTOMER port. Accept the Attribute
Matching. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 11
m. Select and drag the CUSTID column from the SRC_CUSTOMER source datastore to the
CUST_ID column in the TRG_CUSTOMER target datastore. Select the CUST_ID column
in TRG_CUSTOMER. The target CUST_ID – Property Inspector panel shows the
mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 12
n. Select the CUST_NAME column in the Target Datastore zone. The CUST_NAME –
Property Inspector panel changes to show an empty (unmapped) Expression field in
the Target Properties section.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 13
o. Drag the FIRST_NAME and LAST_NAME columns from the SRC_CUSTOMER source to
the Mapping: CUST_NAME Expression field, and then edit the mapping to have the
following mapping expression:
INITCAP(SRC_CUSTOMER.FIRST_NAME) || ' ' ||
INITCAP(SRC_CUSTOMER.LAST_NAME)
Note: If you drag LAST_NAME to the CUST_NAME Expression field in one smooth
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

motion, you will not have any trouble. But if you select LAST_NAME, release the mouse
button, and then try to drag, you will find that the Expression field has changed. You
may find it easier to use the Expression Advanced Editor (to the right of the
Expression field, the gear icon is only displayed if you move the cursor near it). Or you
can freeze the contents of the CUST_NAME tab by right-clicking it.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 14
p. 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(SRC_SALES_PERSON.LASTNAME)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 15
q. Select the UPD_DATE column in the TRG_CUSTOMER datastore and enter the SYSDATE
in the Target Expression field. Ensure that the Active check box is selected for the
UPD_DATE column of the target datastore.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 16
r. Repeat the previous step for the CRE_DATE column. Because the value of the
CRE_DATE column should not be changed later, deselect Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 17
s. Click the Physical tab. In TARGET_GROUP > ORACLE_ORCL_LOCAL_SALES_UNIT,
click FILTER_AP (Access Point). In the Source Set Properties Loading Knowledge
Module, select LKM SQL to Oracle.
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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 18
t. In the same ORACLE_ORCL_LOCAL_SALES_UNIT, click SRC_SALES. In the Source
Set Properties Loading Knowledge Module, select LKM File to SQL.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 19
u. On the Physical tab, click the TRG_CUSTOMER datastore. In Properties > IKM >
Options, set DELETE_ALL to Value True, and deselect Use Default. Click Save.
Note: By setting DELETE_ALL to True, you ensure that the table is cleared before you
populate it with new data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 20
3. Run this mapping, and check the content of the TRG_CUSTOMER table.

a. On the Projects tab, select mapping MAP_9-1. Click Run .


b. Click OK in the Execution window, and then click OK when the “Session started”
message appears. Open Operator, and verify that your Mapping executed
successfully.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 21
c. Return to Designer, click the Models bar, and select the TRG_CUSTOMER target
datastore (click the name of the datastore). Right-click and select View Data option. A
window opens with the four rows of loaded data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h i d eฺ columns got updated.
Scroll right and make sure the CRE_DATE andsSALES_PERS
a
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
e
ird. Ajd
i m Close this data window, and then close your mapping.
Vl ad This completes Practice 9-1. Continue on with Practice 9-2.

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

Practices for Lesson 9: Designing Mappings


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

Background
In the previous practices, you created a mapping 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.
e to
Your Tasks lic ens
1. Create an ODI mapping with a new lookup. b l e
a. In the Designer, duplicate mapping MAP_9-1. f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 23
b. In the Projects > HandsOn > Mappings, click the new map copy to open and rename it
MAP_9-2.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
c. On the Logical tab, click Perform Layout
o n -tr to arrange the datastores in the diagram.

a n
Drag a Lookup
s ideฺ
component to the diagram.
h a
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 24
d. Some of the existing flow needs to be rerouted, so some of the connector lines need to
be deleted. Select and delete the line between Filter and Join. Keep the default of
Preserve downstream expressions. With the connector gone, it should look like this (do
not worry if your icons are in a different location):
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
A
e.
de Designer > Models > FLAT_FILE_SRC, drag the SRC_AGE_GROUP datastore to
jFrom
m ir
l a di the diagram.
V

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 25
f. Fix the datastore alias to be more descriptive but still short. Select the datastore you
just dragged labeled SRC, and change the Properties > General > Name to
SRC_AGE_GROUP.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 26
g. Connect the right output of the Filter to the left input of the Lookup.
Connect the right port of the SRC_AGE_GROUP to the input of the Lookup.
Connect the output of the Lookup to the input of the Join.
Click Lookup to verify that the Properties > Connector Points are:
DRIVER_INPUT1 = FILTER
LOOKUP_INPUT1 = SRC_AGE_GROUP
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

OUTPUT1 = JOIN_INPUT2

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

h. Still on LOOKUP - Properties, click the Match Row Rules tab, and change Multiple
Match Rows to Error:mulitple rows will cause mapping fail.

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 27
i. Drag SRC_AGE_GROUP AGE_RANGE to TRG_CUSTOMER AGE_RANGE (if you had done
the automatic Attribute Matching in a different order, this would have happened
automatically).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
j. Click Perform Layout a ns to this:
, the mapping may now look more similar
t r
n on-
s a eฺ
) h a u id
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 28
k. Select Lookup. Invoke the Lookup Condition Advanced Editor (click the gear).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 29
l. Drag the attributes and functions as needed. Edit the lookup condition to read:
SRC_CUSTOMER.AGE BETWEEN SRC_AGE_GROUP.AGE_MIN AND
SRC_AGE_GROUP.AGE_MAX
Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 30
m. Select TRG_CUSTOMER and change the Properties > Target > Integration Type to
Incremental Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 31
n. On the Physical tab, click TRG_CUSTOMER and set Properties IKM Selector to IKM
Oracle Incremental Update.
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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 32
o. Click an empty area of the Physical diagram, and change the Name to MAP_9-2_DS.
Save MAP_9-2.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
A
p. dethe Designer Projects tab, select MAP_9-2, and then click the
jOn icon to execute
m ir your mapping. Select the Simulation check box, and then click OK.
l a di
V

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 33
q. In the Simulation window, note the generated code, and then click Close.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o u
h view theStlookup
2. Run the MAP_9-2 mapping y aand i s data.
@
erto runsyour t h
e mapping . Click OK. Click OK again.
( a d
a. Click Run jagain
u
j d er Do not select the Simulation check box.
Note:

m i rA
di
Vla

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 34
b. Click the Operator tab and verify that your mapping MAP_9-2 successfully executed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
c. Double-click j d er@
step e thperforms a lookup operation on the source flat file
140,swhich
r ( a
SRC_AGE_GROUP u data), and then click the Code tab. View the code on the
(Load
A de and on the target.
jsource
d imir
Vla

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

Practices for Lesson 9: Designing Mappings


Chapter 9 - Page 35
d. Switch from the Operator Navigator to the Designer Navigator on the Projects tab, and
open the MAP_9-2 mapping if it is not still open. Click the mapping’s Logical tab.
Right-click TRG_CUSTOMER, and then select the Data option. View your lookup data to
verify that AGE_RANGE got populated correctly. Close the Data Editor window. Verify
that your mapping is saved and then close the tabs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
e. Clean up the desktop by closing ODI Studio.
This completes Practice 9-2. This completes the practices for Lesson 9.

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

Practices for Lesson 9: Designing Mappings


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

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 10:
a
Mappings:n Monitoring and
h a s ideฺ
Troubleshooting
) Gu
ฺ c omChapter
e nt10
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 1
Practices for Lesson 10: Overview
Practices Overview
In this practice, you create a mapping to export a flat file to a relational table, perform execution
simulation, execute the newly created mapping, and check quality of data loaded in the table.
You also learn how to filter a log to display errors.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


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

verify the quality of data loaded into the table.

Background
In the previous practices, you learned how to create ODI Mappings, 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 a mapping to export data from a flat
file to a relational table, execute and monitor the Mapping with ODI, and check data quality.
Note: Completing this practice is critical for all the following practice sessions. e to
In this practice, you perform the following 10 steps:
lic ens
1. In Topology Navigator, define the
b l e
FILE_GENERIC./home/oracle/labs/files/my_flat_files physical schema.
f e ra
2. In Topology Navigator, define the FLAT_FILES_SRC logical schema.
tra ns
3. In Designer Navigator, create the Export-FF-RT project.
o n -
4. In Designer Navigator, create the Flat_File_1 source a nmodel.
a. Create the SRC_SALES_PERSON datastore. h a s ideฺ
m ) t Gu
b. Point to the resource: o
ฺc den
o o tu
/home/oracle/labs/files/my_flat_files/SRC_SALES_PERSON.TXT.
h the S
c. Reverse-engineer and y aformat s data (fixed length positions, data types).
5. r
In SQL Developer,ecreate@ theeRDBMS
t hi schema ODI_STAGE to host the ODI target
datastore. (aj
d u s
d r
eDeveloper,
6. j
In SQL
A create the TRG_SALES_PERSON table to serve as the ODI datastore for

i7.m irthe target model.


a d In Topology Navigator, create the ODI target data server, ODI_STAGE; physical schema
Vl 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 mapping to perform the flat file–to-RDBMS table transformation.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

[oracle@hostname ~]$ cd ~/labs


[oracle@hostname labs]$ ./reset10.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in e to
the past.
lic ens
2. Create a new physical schema for the source flat-file model.
b l e
a. Click Topology navigator. In Topology navigator, click the Physical Architecture bar
f e ra
and expand Technologies > File. Right-click FILE_GENERIC and select New
ans
Physical Schema.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 4
b. For the Directory (Schema) and Directory (Work Schema) fields, enter the path to the
directory where your input flat files are located
(/home/oracle/labs/files/my_flat_files). Note that you cannot use
shortcuts such as ~ (tilde) for /home/oracle/. The Name changes automatically as
you type the schema names. Select the Default check box and click Yes in the
Confirmation window, and then click Save. In the Information window that reminds you
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

that no context has been specified for this schema, click OK. Close the editing window
for your new physical schema.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 5
c. Verify that your new Physical schema was added under the FILE_GENERIC data
server in the Technologies tree view.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
d. Open Logical Architecture, navigate to Technologies > File, right-click File, and
f e ra
select New Logical Schema.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 6
e. Enter the Logical Schema name: FLAT_FILES_SRC, and select the Physical schema
FILE_GENERIC./home/oracle/labs/files/my_flat_files in all three
contexts as shown here. Click Save and close the editing window.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

f. Verify that your new Logical schema was added under the File node in the
Technologies tree view.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
a d i3.m Create the new project in ODI.
Vl a. Open the Designer tab and then click Projects. In the window that opens, click New
Project and then select New Project to add a new project.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 7
b. On the screen that appears, set the Name of the project to Export-FF-RT in the
Definition > Name field. The Code field is filled in automatically in uppercase. Click
Save, and then close the tab. The newly created Export-FF-RT project now appears
in the Projects pane.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

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


a. In ODI Designer, click the Models bar, and then click New Model . Then select
e to
ens
the New Model option to insert a new model.
lic
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tuvalues provided in the following table. Click the
y ah enter
b. On the screen that follows, s S
the
Reverse Engineer
e r @tab.eSetththei Context to Development. Click the Save icon.
( a jd u s
j d er
Parameter Value

A Name
mir
Flat_File_1
d i
Vla Technology File

Logical Schema FLAT_FILES_SRC

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
5. Create a new ODI source datastore.
i r A
a. Right-click the newly created Flat_File_1 model, and then select New Datastore.
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 9
b. On the Datastore screen, set Name to SRC_SALES_PERSON, and the Alias to SRC.
Click Search next to the Resource Name field.
Navigate to the /home/oracle/labs/files/my_flat_files folder, and then
select the SRC_SALES_PERSON.txt file. Click Open.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
er@Setse
c. Click the Files tab.
j d
h Format to Fixed, and then click the Attributes tab.
thetFile

r ( a u
A jde
d imir
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 10
d. On the Attributes tab, click Reverse Engineer. A Confirmation message appears,
asking you to save your changes. Click Yes. The Column Setup Wizard appears.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 11
e. Place the cursor and then click the ruler at the beginning of each column as shown
next. The wizard marks each column with red dots as shown in the following
screenshots.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m f. After the columns are marked, click each column data to select a column, and then set
V l a 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.
Column Name Data type

C1 SALES_PERSON_ID numeric

C2 FIRST_NAME string

C3 LAST_NAME string

C4 DATE_HIRED string

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
A de OK when you have finished.
jClick
m irg. The columns should look like the following. Click Save to save the model. If the
l a di Unlocking Object window appears, select the check box and click OK. Expand
V Flat_File_1 > SRC_SALES_PERSON > Attributes and view the newly created
columns.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


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

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d e r@model,e right-click
h. In the Flat_File_1 th the SRC_SALES_PERSON datastore, and then
j s
u all tabs as shown next.
a Data. Close
select View
(
r
A jde
d imir
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
6. You must create a schema to host the ODI target datastore.
a noTo create a new RDBMS
schema for the ODI datastore, perform the following
h a s ideฺ
steps:
a. Open the Oracle SQL Developer window
m ) (or u / as sysdba). You will
sqlplus
G
create the schema by executing the
o ฺ coidentified
d e ntSQLbycommands:
following
create user <MY_SCHEMA>
h o t u <MY_PASSWD>
S temporary tablespace <MY_TEMP>;
default tablespace
@ ya <MY_TBS>
h i s
econnection
Note: If it is not
d t
ralreadyestarted, you need to start SQL Developer and open the
a
Administrator
( j u s (Username: system, Password: Welcome1). Refer to
j d er 2-1.
Practice

m ir AIn this command:


l a di • <MY_SCHEMA> corresponds to the name of the schema that you want to create:
V ODI_STAGE
• <MY_PASSWD> 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.
Note: These commands also are provided in the text file lab10.txt, which is located
in the /home/labs/ folder.
create user ODI_STAGE identified by ODI_STAGE default tablespace
users temporary tablespace temp;

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 15
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Grant connect privileges to the newly created user account by executing the following
SQL command: e to
grant connect, resource, create trigger, create view, unlimited
lic ens
tablespace to ODI_STAGE;
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r
7. Now you need ( ato create aunew ODI datastore for the target model. This datastore will be
de the ODI Mapping. To create a new ODI target datastore, perform the following
used jwithin
A
r
dimisteps:
Vla
a. In SQL Developer, create a new connection called ODI_STAGE. Enter the username as
ODI_STAGE with the password ODI_STAGE. For SID, enter orcl. Click Test to verify
the connection. Click Save and then click Connect.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 16
b. Create your target table by executing the following SQL commands. Expand the
connection, ODI_STAGE > Tables > TRG_SALES_PERSON, and verify that the table is
created successfully.
CREATE table ODI_STAGE.TRG_SALES_PERSON (
SALES_PERSON_ID NUMBER(8,0) NOT NULL,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

FIRST_NAME VARCHAR2(80),
LAST_NAME VARCHAR2(80),
DATE_HIRED VARCHAR2(80),
DATE_UPDATED DATE NOT NULL,
constraint TRG_SALES_PERSON_PK primary key (SALES_PERSON_ID)
)

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 17
c. Disconnect user ODI_STAGE.
If using SQL Developer, right-click Connections and select Disconnect Connections.
If using sqlplus, exit.
8. 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:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

a. In ODI, open ODI Topology Navigator and then select the Physical Architecture bar.
Click the icon on the end, and select Hide Unused Technologies (this cleans up the
display).

e to
lic ens
b l e
f e ra
tra ns
n -
a no
a
b. Expand Technologies, right-click Oracle,hand eฺ Data Server.
s selectidNew
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 18
c. In Data Server: New Object, enter the Definition values provided in the following table.
Click the JDBC tab.
Parameter Value

Name ODI_STAGE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Instance/dblink (Data Server) orcl

User ODI_STAGE

Password (case sensitive) ODI_STAGE

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d. Click fore
d r@Driver.
JDBC e thSelect Oracle JDBC Driver. Click OK. Click for JDBC
( j u s
a jdbc:oracle:thin:@<host>:<port>:<sid>,
Url, select and then click OK. Edit the URL
r
e jdbc:oracle:thin:@localhost:1521:orcl for Oracle Database.
Ajtodread:
i m ir
d
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 19
Note: Do not copy and paste in the JDBC Url field. This action may cause problems
with entering a valid URL string.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m e. Click Test Connection. In the window that opens, click Yes to save your data. In the
V l a Information window, click OK. Click Test to verify a successful connection. Click OK.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


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

f. On the Physical Architecture tab, expand Oracle technology node, right-click


ODI_STAGE data server, and then select New Physical Schema.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 21
g. In the Schema (Schema) and Schema (Work Schema) fields, select ODI_STAGE
schema from the drop-down list. Click Save. 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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
a s idtabeand ฺ
h. In Topology Navigator, open the Logical h u Logical Schema.
Architecture
) selectt G expand Technologies.
co den
Right-click Oracle technology and m
then New
o ฺ
o Stu
a h
y his
e r @ e t
( a j d u s
r
A jde
d imir
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 22
i. Name the logical schema ODI_STAGE. In all three contexts, connect this logical
schema to the ODI_STAGE physical schema as shown here. Click Save and then close
the tabs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

9. Create a new ODI target model that will be used within your ODI Mapping. To create a new
ODI target model, perform the following steps:
a. Open ODI Designer. Click the Models bar and select New Model. On the panel that e to
appears, enter the Definition values provided in the following table. Click the Reverse
lic ens
Engineer tab (make sure it is the tab, not the button).
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
( a
Parameter
r u Value
e
r AjdName Oracle_RDBMS1

d i mi Technology Oracle
Vl a
Logical Schema ODI_STAGE

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 23
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
b. On the Reverse Engineer tab, ensure that Context is set to Development. Click Savens
and then close the Oracle_RDBMS1 tab. l ic e
bl e
fe r a
n s
n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 24
c. On the Models tab, right-click the Oracle_RDBMS1 model. Select Reverse Engineer.
To verify that the TRG_SALES_PERSON datastore is successfully reversed, expand the
model as shown here.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 25
10. Create a new ODI Mapping 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 Mappings and select New Mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
l ic ens
b. e
l OK.
On the screen that follows, enter the mapping name as MAP-EXP-FF-RT.bClick
fe r a
n s
n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 26
c. Make sure the Properties panel is visible on the bottom of the screen. Click the Models
bar to drag the source and target to the diagram. Drag the SRC_SALES_PERSON.txt
datastore from the Flat_File_1 model to the model container. Drag the
TRG_SALES_PERSON datastore from the Oracle_RDBMS1 model to the model
container.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 27
d. Connect source to target. When Designer asks if you want to perform Attribute
Mapping, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 28
e. Set the value for the DATE_UPDATED column in Target Datastore to the system date by
performing the following: In Target Datastore, select DATE_UPDATED. In the
Expression field, enter SYSDATE. Select Staging in the Execute on Hint. Ensure that
the Active check box is selected.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
er@ secolumn
f. Select the FIRST_NAME
j d th in Target Datastore and edit the mapping to read:
r ( a u
LTRIM(SRC.FIRST_NAME). This function removes left spaces in the FIRST_NAME
jd e
column. In Execute on Hint, select Staging. Repeat this step for columns LAST_NAME
A
d imir and DATE_HIRED. Refer to the mapping implementation provided in the following
table.
Vla Column Mapping implementation

FIRST NAME LTRIM(SRC.FIRST_NAME)


LAST NAME LTRIM(SRC.LAST_NAME)
DATE HIRED LTRIM(SRC.DATE_HIRED)

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


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

e to
lic ens
b l e
f e ra
tra ns
n -
a no
Click Save.
h a s ideฺ
) ttoGa urelational table target. The
g. For this mapping, you export a flat file directly
m
o
knowledge modules required forcthis mapping n are LKM File to SQL and IKM SQL
ฺthe KMs,dclick
e
o o
ah is Stuproject, expand the Knowledge Modules folder.
Incremental Update. To import the Designer Navigator’s Projects tab in
the left panel. In the y
Export-FF-RT

j d er@(LKM)
Right-click Loading
s e h select Import Knowledge Modules.
tand
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 30
h. 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:
/u01/app/oracle/Middleware/Oracle_Home/odi/sdk/xml-reference.
Select IKM SQL Incremental Update (row by row) and LKM File to SQL. Click OK.
Close the Import Report window. View the imported KMs in the Projects tree view.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 31
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 32
i. In the MAP-EXP-FF-RT mapping in the right panel, click the Physical tab. Click the
SRC_AP (Access Point) 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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 33
j. Back on the Logical tab, select TRG_SALES_PERSON, then in the Target > Integration
Type: select Incremental Update from the drop-down list.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 34
k. Back on the Physical tab, select TRG_SALES_PERSON datastore. In the Properties >
Integration Knowledge Module drop-down list, select IKM SQL Incremental Update
(row by row). Set the IKM Options FLOW_CONTROL to False. Set the IKM Options
DELETE_ALL to True. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

l. To test your mapping, click Execute . The following screen appears. Retain the
defaults and click OK. On the Information screen, click OK.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 35
m. Open ODI Operator and verify that your mapping was executed successfully. In
Operator, click the Session List tab, select All Executions, and then click Refresh
. View the execution results for the mapping MAP-EXP-FF-RT.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
n.
A de
jclose
Double-click step 50. View the number of rows inserted into the target table (16).Then

m i r the Session Task window.

l a di
V

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 36
11. Enable filtering rows with Sales_Person_ID > 30. There are several ways you could do
this, but this way preserves the existing column mapping expressions.
a. On the MAP-EXP-FF-RT Logical tab, delete the connector between SRC and
TRG_SALES_PERSON. Select the arrow and press the Del key. Click Yes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 37
b. Drag SRC SALES_PERSON_ID to in between the source and target datastores. This
creates a Filter Component. Select the Filter. In Filter - Properties > Condition, edit the
Filter Condition to read: SRC.SALES_PERSON_ID > 30. For Execution Hint, select
Staging. For Connector Points > Output Connector Points > OUTPUT1, change
Connected To to TRG_SALES_PERSON.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
The Attribute Matchings (grey arrows) should be preserved in TRG_SALES_PERSON as
shown below:

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 38
12. Use the Attributes panel to quickly capitalize the first letter of each last name and first name,
leaving the other characters in lowercase.
a. Select TRG_SALES_PERSON. Scroll down and expand the Attributes section. In the
Expression column, click the LTRIM(SRC.FIRST_NAME) field, and then select the
Editor icon (the ellipsis).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu
y ahedit the
b. In the Expression Editor, i s S
expression to read:
e r @ e t h Click OK.
(a j d
INITCAP(LTRIM(SRC.FIRST_NAME)).
u s
e r
A jd
mi r
d i
Vla

c. Repeat the previous step for the column LAST_NAME. Your result is shown in the
following screenshot. Click the Logical tab and Save your mapping .

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 39
13. Execute your modified mapping and verify the result.

a. In Designer, execute your mapping . In the Execution dialog box, click OK. In the
Information dialog box, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Open ODI Operator and verify that the mapping executed successfully. Open step 110 e to
– Insert flow into I$ table. Click the Code tab, and view your modifications.
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 40
c. In Designer > Models, right-click TRG_SALES_PERSON. Select View Data. View the
filtered rows (SALES_PERSON_ID > 30) inserted in the table. Close your Data Editor
and the tabs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
14. Clean up the desktop by closing ODI Studio.
o n -tr
This completes Practice 10-1. This completes the practices for Lesson 10.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 41
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 42
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 11:
a
Designingn Mappings:
h a s ideฺ
Advanced
) Gu Topics 1
ฺ c omChapter
e nt11
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 1
Practices for Lesson 11: Overview
Practices Overview
In Practice 11-1, you create and use a native sequence for an ODI mapping. In Practice 11-2,
you create temporary indexes for an ODI mapping. In Practice 11-3, you use datasets with an
ODI mapping for data transformation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


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

for the target table.

Background
In this practice, you first use ODI to define the procedure Create_ORCL_SEQ_FAM_ID. You
then execute this procedure, which creates the sequence SEQ_FAMILY_ID in the RDBMS.
Next, you use ODI to create an ODI definition of the native sequence that you just created in the
RDBMS, using the same name, SEQ_FAMILY_ID.
Finally, you create and execute the mapping MAP_11-1 to load the TRG_PROD_FAMILY target e to
table by using the new native sequence to generate ID numbers for that table.
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu
y ah is critical
Note: Completing this practice s S
i for all the following practice sessions.
e r @ t h
Your Tasks (ajd u se
1. Resetjd er practice environment.
your

m i ra.A Disconnect from the ODI repository (or just close ODI Studio).
Vl adi b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset11.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 3
2. Create and execute an ODI procedure that creates an Oracle native sequence.
a. 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. Deselect Multi-Connections. Set the Target technology
to Oracle, as shown below. Click the Tasks tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 4
b. Arrange the Properties panel to be visible below the Procedure. In the Tasks tab, click
Add to add a task command. In the General > Name field, enter Create ORCL
SEQ. In the Target Command, in the Schema drop-down list, select
ORACLE_ORCL_LOCAL_SALES. In the Command field, enter the command shown in
the following screenshot.
Note: Copy and paste this command from ~/labs/lab11.txt.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

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

e to
li cens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 5
c. Run the procedure Create_ORCL_SEQ_FAM_ID and verify the result of the execution
in the Operator Navigator.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 6
d. Open SQL Developer and expand Connections > 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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu
ah in ODI.
3. Create a new Native Sequence
y s S
a. Open Designer.rClick
e t hi tab and expand HandsOnLoads > HandsOn. Right-
@ thee Projects
a jd and
click Sequences,
( u sthen select New Sequence.
j d er
m i rA
di
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 7
b. Name the new sequence SEQ_FAMILY_ID. Select the Native sequence option. In the
schema field, select ORACLE_ORCL_LOCAL_SALES. Click the icon. In the window
that follows, select the DEVELOPMENT context, and then select the native sequence
SEQ_FAMILY_ID. Click OK. Your screen should look like the screenshot on the next
page. Save the sequence, and then close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


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

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
) table
4. Create a new mapping to load the Product Family
m G uby using the Native Sequence.
o t
ฺc de>nHandsOn, right-click Mappings, and select
a. In Designer > Projects > HandsOnLoads
o o
a is Stu name, MAP_11-1. Click OK.
New Mapping. Enter thehnew mapping
y
j d er@ se th
r ( a u
A jde
r
dimi
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 9
b. In the Models bar, expand MySQL Orders Application model and Oracle Sales
Application model. Drag the SRC_PRODUCT datastore from the MySQL Orders
Application model to the left side of the model area in your mapping. Drag the
TRG_PROD_FAMILY datastore from the Oracle Sales Application model to the right
side of the target area. Drag a Distinct component in the middle.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m G u
) to Distinct.
o
c. Drag FAMILY_NAME from SRC_PRODUCT
ฺc den t
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla
That causes a connection from SRC_PRODUCT to Distinct.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 10
d. Connect the Distinct to the target. Deselect Create Attributes On Source. Click OK to
perform Attribute Matching.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
A jde
m ir You should now have grey arrows on FAMILY_NAME.
l a di
V

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 11
e. In TRG_PROD_FAMILY, select FAMILY_ID, to open the FAMILY_ID - Properties >
Target > Expression field. Click the Expression Advanced Editor (the gear).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
f. Expand ODI Objects > Project Sequences > SEQ_FAMILY_ID, and then drag
ans
NEXTVAL to the Expression area. Click OK.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 12
g. In FAMILY_ID - Properties > Target, change Execute on Hint to Target.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 13
h. Click the Physical tab, click the target datastore TRG_PROD_FAMILY, and then set
IKM Selector to IKM SQL Control Append. In the Options, set FLOW_CONTROL to
False, and set DELETE_ALL to True. Save your mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
5. Execute the newly created mapping and verify the data in the target table.

a. Execute mapping MAP_11-1 by clicking the Execute button . The Execution screen
appears. Retain the defaults and click OK. On the Information screen, click OK, and
then verify execution in the Operator tab.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
) t Gu and then select View Data.
b. In Designer > Models, right-click TRG_PROD_FAMILY,
m
o ฺ co Close
Verify the data inserted in the table.
d e n Data window and MAP_11-1 tab.
the

a h o Stu
@ y his
d e r e t
( a j u s
r
A jde
d imir
Vla

This completes Practice 11-1. Continue on with Practice 11-2.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 15
Practice 11-2: Using Temporary Indexes
Use Case Scenario
John created mappings to load data in the target model from different sources and performed
data transformation. He also created a mapping that loads data in the table by using Oracle
native sequence, which generates ID numbers for the target table.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Now, John needs to load the target product table by using the source product table and the
lookup against the table, which contains the ID numbers generated by the newly created
mapping 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.
e to
First, you create a new ODI mapping, MAP_11-2, to load data into the TRG_PRODUCT target ns
datastore table in the Oracle Sales Application model. You specify the source tables as lic
e
SRC_PRODUCT from the MySQL Orders Application model and TRG_PROD_FAMILY
a b le the
from
Oracle Sales Application model.
s f er
TRG_PROD_FAMILY will be used as a lookup table to obtain the ID number
- t r an generated by the
previous lesson’s mapping that used a sequence to populate the
n onID number.
a eฺ and TRG_PROD_FAMILY on
For the lookup, you create a temporary index to join SRC_PRODUCT
s
their FAMILY_NAME column.
) h a u id
ฺ c m code,
Finally, you execute the mapping, view theosource
e n tGand examine the inserted rows in the
TRG_PRODUCT target datastore.
h o
o Stu d
a
y his
e r @ e t
( a j d u s
r
A jde
i m ir
Vl ad

Note: Completing this practice is critical for all the following practice sessions.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 16
Your Tasks
1. Create a new ODI mapping with a temporary index on the source tables.
a. Expand the project HandsOnLoads > HandsOn > Mappings. Right-click Mappings
and select New Mapping. Name this mapping MAP_11-2. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

to
b. In the Models tab, expand the Oracle Sales Application and MySQL Orders Application e n se
models. Drag the TRG_PRODUCT datastore from the Oracle Sales Application model
e l ic to
the right in the mapping area. Drag the TRG_PROD_FAMILY datastore from
r a blthe Oracle
s fe datastore
Sales Application to the left in the mapping area. Drag the SRC_PRODUCT
n
n - ra area, as shown in
from the MySQL Orders Application model to the left in thetmapping
the following screenshot. Drag a Join component to the
n o middle of the mapping area.

s a eฺ
) h a u id
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 17
c. Create a join between the two source tables by dragging FAMILY_NAME in the
TRG_PROD_FAMILY datastore to the Join component, and FAMILY_NAME in the
SRC_PRODUCT datastore to the Join component. You can reposition the Join as shown
in the following screenshots. Connect the Join to TRG_PRODUCT. Click OK to perform
Attribute Matching.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

It should now look like this:

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 18
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
o n -
a n
h a i d eฺ Type, set it to
s > Integration
d. Select TRG_PRODUCT, and in Properties > Target
Incremental Update.
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 19
e. Click the Physical tab, click Join, and scroll down to view the Join Property inspector.
In the Temporary Indexes section, set the index on SRC_PRODUCT_AP to Non-Unique.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 20
f. Still on the Physical tab, select TRG_PRODUCT. Change the Integration Knowledge
Module to IKM Oracle Incremental Update. Verify that in the Options, DELETE_ALL is
set to False. Save your mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 21
2. Execute the mapping and verify the results.
a. On the Projects tab, execute your mapping MAP_11-2 as shown in the following
screenshot. Click OK. Click OK again.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 22
b. Open ODI Operator, and verify that your mapping executed successfully. Expand the
session to view steps as shown in the following screenshot.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d e r@ e th
( a
c. Double-clickj u sstep, “60 - Create Temp. Indexes On Work”. In the Session
the fourth

j d erselect the Code tab. View the Target Code.


Task,
A
d imir
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 23
d. Scroll down, and then double-click step 290 – Insert new rows, as shown in the
screenshot. View the number of inserted rows.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m) Sales G u
e. In Designer Navigator > Modelsc>o
ฺ Oracle
e n t Application, right-click TRG_PRODUCT,
and then select View Datao
h o d
to view theu15 inserted rows. Close the Data window and
t
the tabs. y a s S
e r @ e thi
( a jd u s
r
Ajde
i m ir
d
Vla

This completes Practice 11-2. Continue on with Practice 11-3.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 24
Practice 11-3: Using Sets with ODI Mapping
Use Case Scenario
John created a mapping 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,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

John creates a mapping with multiple datastores to add in a bulk feed of customer data from
another system.

Background
In this practice, you add a new set to a mapping. Building upon the mapping MAP_9-2 you
created in Lesson 9, you will add a bulk feed of customer data from another system by adding a
unioned datastore.
First, you make a copy of mapping MAP_9-2, naming the copy MAP_11-3.
e to
Now, you create a new set, which is the union of source and target bulk customers’ datastore
from the Oracle Sales Application model. lic ens
b l e
You specify the UNION operator to unite this new source of data with the other join and lookup
that you specified in MAP_9-2. f e ra
ans
data set with the UNION operator. o n -tr
Next, you perform an execution simulation to preview the code that will be used for this new

a n
h a s ideฺ
Finally, you execute the mapping and verify the rows inserted into the target table.
) t Gu
Note: Completing this practice is critical for all the following practice sessions.
m
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 25
Your Tasks
1. Create an ODI mapping with set operators.
a. In Designer navigator, right-click mapping MAP_9-2 and then duplicate it. Open the
duplicate mapping and click Overview tab. Rename it MAP_11-3. Click the Logical
tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 26
b. To arrange tables, click the Perform Layout icon . Select the SET component, and
drag it to the model area. Select and drag the model datastore TRG_BULK_CUSTOMER
to the model area. Position TRG_BULK_CUSTOMER, SET, and TRG_CUSTOMER all in a
line at the same height and the same length.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
c. Select the arrow between Join and TRG_CUSTOMER, and delete it. Preserve ans
downstream expressions.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 27
The grey arrows should remain on TRG_CUSTOMER like this:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
d. Connect TRG_BULK_CUSTOMER to the left (Input1) of SET. Accept the defaults on f e ra
ans
Attribute Matching.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 28
The SET should now look like this. Notice that TRG_BULK_CUSTOMER, SET, and
TRG_CUSTOMER all have identical columns.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
e.
n -tr
Connect the right of Join to the left (Input2) of SET. On Attribute Matching, deselect
Create Attributes on Target (otherwise you end up with “misnamed” columns).
o
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 29
Notice the yellow arrows on SET. You need to map those five columns: CUST_ID,
CUST_NAME, SALES_PERS, CRE_DATE, and UPD_DATE.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
f.
n -tr
One at a time, look at the columns in Oracle Sales TRG_CUSTOMER that correspond to
the yellow arrows from SET, and copy and paste the expression from TRG_CUSTOMER
o
into SET. a n
a s ideฺ
(This is a long task, in five steps.)
h
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 30
i) Copy from the TRG_CUSTOMER CUST_ID expression,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc INPUT2
e nexpression.
o o
and paste into the SET CUST_ID d
y ah is Stu
j d er@ se th
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 31
ii) Copy from the TRG_CUSTOMER CUST_NAME expression,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 32
and paste into the SET CUST_NAME INPUT2 expression (do not worry about the
multiple lines, but if that bothers you, use the Expression Editor).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 33
iii) Copy from the TRG_CUSTOMER SALES_PERS expression,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 34
and paste into the SET SALES_PERS INPUT2 expression. (Notice the yellow arrows
going away one by one.)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 35
iv) Copy from the TRG_CUSTOMER CRE_DATE expression,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc INPUT2
e nexpression.
o o
and paste into the SET CRE_DATE d
y ah is Stu
j d er@ se th
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 36
v) Copy from the TRG_CUSTOMER UPD_DATE expression,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc INPUT2
e nexpression.
o o
and paste into the SET UPD_DATE d
y ah is Stu
j d er@ se th
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 37
g. One more fix for SET: In MySQL SRC_CUSTOMER, the DEAR is numeric (0, 1, 2, and so
on), and in Oracle Sales TRG_CUSTOMER, it is “Mr.”, “Mrs.”, and so on. This is a
problem from a data integrity standpoint that you will fix later, but for the moment, it is
trying to UNION a decimal number with a varchar string , and that must be
fixed. Change SET DEAR INPUT2 to TO_CHAR(SRC_CUSTOMER.DEAR).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 38
h. Connect SET to TRG_CUSTOMER. Accept the defaults on Attribute Matching, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 39
i. Check your work. SET should have all grey arrows. Verify that SET - Properties >
Operators is UNION of TRG_BULK_CUSTOMER and JOIN feeding TRG_CUSTOMER.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 40
j. Click the Physical tab, and change General Name to MAP_11-3_DS.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 41
k. Verify the flow of your mapping. Click TRG_CUSTOMER. Ensure that the Integration
Knowledge Module Options FLOW_CONTROL is set to True and the DELETE_ALL
option is set to True, as shown in the following screenshot. Save your mapping.
Note: The order of your source objects on the left side of the Physical Flow diagram
may be different than the order shown in the following screenshot.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 42
l. Click the Execute button . In the Execution dialog box, select the Simulation box to
perform an 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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 43
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc do e n select the Simulation check box) and
2. Execute mapping MAP_11-3 (but o o d
ah is Stu
this time not
y
verify the execution results.
a. Execute mapping
j d er@ e
MAP_11-3.
s
th
r ( a u
A jde
i m ir
Vl ad

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 44
b. Open the Operator. Verify that the session MAP_11-3 executed successfully. Scroll
down and open the task 370 - Insert new rows. Verify that the number of inserts in the
target table is 31 rows.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
o n -
a n
3. Clean up the desktop by closing ODI Studio.
h a s ideฺ
) practices
This completes Practice 11-3. This completes the
m G ufor Lesson 11.
o
ฺc den t
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
i m ir
Vl ad

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 45
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 46
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 12:
a
Designingn Mappings:
h a s ideฺ
Advanced
) Gu Topics 2
ฺ c omChapter
e nt12
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 1
Practices for Lesson 12: Overview
Practices Overview
In Practice 12-1, you use a temporary ODI mapping for data transformation.
In Practice 12-2, you duplicate an existing knowledge module and modify the duplicate
knowledge module to use with a mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 2
Practice 12-1: Creating and Using Reusable Mappings
Use Case Scenario
John created mappings to load data in the target models from different sources and performed
data transformation and filtering, and implemented a lookup to fetch additional information for
the data loading in the target. John also created a mapping with multiple data sets to add in a
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

bulk feed of customer data from another system.


Now, John needs to create a temporary reusable mapping, which is used for loading data to a
sales target datastore.

Background
In this practice, you perform the following steps:
1. Create a reusable mapping, REU_12-1.
e to
ens
• Use datastores SRC_ORDERS and SRC_ORDER_LINES from the MySQL_SRC model,
joined on ORDER_ID.
lic
• Use SRC_CUSTOMER as a lookup table. b l e
• Create a temporary target table. f e ra
tra
• Aggregate some of its columns by using the MIN, MAX, and AVG functions.
ns
n -
2. Create mapping MAP_12-1.
a no
• Use the reusable mapping REU_12-1 as a a
h s ideฺ
source.
• Use the datastore TRG_SALES as the
m ) t Gu
target.
Execute MAP_12-1 and examineo
o n into TRG_SALES.
ฺcrows inserted
e
3.
o the d
y ah is Stu
j d er@ se th
r ( a u
A jde
m ir
l a di
V

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Enter. Wait until this script completely executes.


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset12.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e to
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. lic ens
b l e
2. Create an ODI reusable mapping.
f e ra
a. In the Projects tab, expand: HandsOnLoads > HandsOn. Right-click Reusable
ans
o n -tr
Mappings, and select New Reusable Mapping. Name the new mapping REU_12-1.
Select Create Default Output Signature. Click OK.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 4
b. Open the Models tab. Expand the MySQL Orders Application model, and drag
SRC_ORDERS, SRC_ORDER_LINES, and SRC_CUSTOMER datastores from the model to
the model area. Drag Join, Aggregate, and Lookup from the Components to the
model area. (OUTPUTSIGNATURE is already present.)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 5
c. Drag the ORDER_ID column from the SRC_ORDERS datastore to the Join component.
Drag the ORDER_ID column from the SRC_ORDER_LINES datastore to the Join
component to create a join. Select the Join component. In Properties > Condition,
specify Generate ANSI Syntax, and Execute on Hint: Source.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 6
d. Select Lookup. You may find it helpful to freeze the content of the LOOKUP -
Properties panel by right-clicking the tab itself and selecting Freeze Content. You will
see a red push-pin to indicate frozen. Select the Driving table as Join. Select the
Lookup table SRC_CUSTOMER in MySQL Orders Application. Drag the two CUST_ID
columns and set them equal to each other as the Lookup Condition. Set Connector
Point OUTPUT1 to AGGREGATE. Set Execute on Hint to Source. Do not forget to
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

unfreeze the content of the panel.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 8
e. With Lookup still selected, expand Match Row Rules. Set Multiple Match Rows to
“Error: multiple rows will cause mapping to fail”. Leave the No-Match Rows as the
default.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
BUG: While you would normally want to select Multiple Match Rows=Error as shown
b l e
above, just checking for it will cause it to fail. The work-around is to select Multiple
f e ra
Match Rows=All Rows as shown in the following screenshot:
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 9
f. There are three possible ways to populate the Aggregate attributes, you can mix and
match any or all three:
− Create all the columns by automatic Attribute Matching and then deleting the ones
you do not need.
− Enter each of the columns manually.
− Drag the columns one-by-one into the target.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Right-click the connector line from Lookup to AGGREGATE, and click Redo Attribute
Matching.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 10
It should now look similar to this (notice that there is no Physical tab, nor are there KMs
in OUTPUTSIGNATURE Properties):
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
) thet G
g. Select the following fields together by using Ctrlukey: LORDER_ID, ORDER_ID_1,
o m
c den CITY_ID, PHONE, AGE, and
o ฺ
STATUS, CUSTID, DEAR, FIRST_NAME,
o Delete
ADDRESS,
SALES_PERS_ID. Press the
a h S u Confirm by clicking Yes.
tkey.
@ y his
d e r e t
( a j u s
r
A jde
d imir
Vla

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 11
h. Select ORDER_ID column in the Aggregate. In the Mapping Properties panel, edit
Target Expression to read MIN(SRC_ORDERS.ORDER_ID). Set Execute on Hint to
Staging. Scroll down to the Properties > General section and rename this column
FIRST_ORDER_ID.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 12
i. Drag the column ORDER_ID from SRC_ORDERS to the empty bottom of Aggregate.
Select the ORDER_ID in the Aggregate. In the Properties panel, edit the Target
Expression to read MAX(SRC_ORDERS.ORDER_ID). Set Execute on Hint to Staging.
Scroll down and rename this column LAST_ORDER_ID.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 13
j. Select ORDER_DATETIME from the Aggregate. In the Mapping Properties panel, edit
the Expression to read MIN(SRC_ORDERS.ORDER_DATETIME). Change Execute on
Hint to Staging. Scroll down and rename this column FIRST_ORDER_DATE.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 14
k. Similarly, drag ORDER_DATETIME from SRC_ORDERS to the target Aggregate. Edit the
AGGREGATE ORDER_DATETIME Properties Expression to read
MAX(SRC_ORDERS.ORDER_DATE). Change Execute on Hint to Staging. Scroll down
and rename this LAST_ORDER_DATE.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 15
l. Select LAST_NAME column from Aggregate. Start the Expression Advanced Editor (the
gear).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 16
m. Drag SRC_CUSTOMER.FIRST_NAME column from the left panel of the Expression
Editor to the expression area. Enter the concatenate and single straight quotation
marks as part of the expression. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 17
n. Scroll down and, in the Target Column Properties, rename this column CUST_NAME.
Change Execute on Hint to Source.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 18
o. Select QTY. Edit the mapping expression to read SUM(SRC_ORDER_LINES.QTY).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 19
p. Select AMOUNT from the Aggregate. Edit the mapping expression to read
AVG(SRC_ORDER_LINES.AMOUNT). Change Execute on Hint to Staging. In the
Target Properties General, rename this column AVG_AMOUNT.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 20
q. Drag SRC_ORDER_LINES.AMOUNT from the source datastore to the empty space at
the bottom of the Aggregate. Edit the mapping Expression to read
SUM(SRC_ORDER_LINES.AMOUNT). Change Execute on Hint to Staging. Rename
this column SUM_AMOUNT.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 21
r. Click the Aggregate title. Refer to the following table to verify the Aggregate attribute
execution hint locations. There are three more attributes that need to be set to Source:
CUST_ID, CUST_NAME, and PRODUCT_ID. Your Aggregate should now look like the
following screenshot. Save your work.
Column Execution Location
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

SUM_AMOUNT Staging Area


AVG_AMOUNT Staging Area
CUST_ID Source
CUST_NAME Source
FIRST_ORDER_DATE Staging Area
FIRST_ORDER_ID Staging Area
LAST_ORDER_DATE Staging Area
e to
LAST_ORDER_ID Staging Area
lic ens
PRODUCT_ID Source
b l e
f e ra
ns
QTY Staging Area

-tr a
n o n
a
s ideฺ
h a
) t Gu
o m
o o ฺc den
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 22
s. Drag the output of AGGREGATE to the input of OUTPUTSIGNATURE. Accept the defaults
for Attribute Matching. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 23
Your results should look similar to this:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) created
3. Create a new mapping, which uses the newly
G u
temporary mapping as a source.
o
c adnew
a. In the HandsOnLoads project,ฺcreate e t
nODI mapping, MAP_12-1, as shown here.
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
i m ir
Vl ad

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 24
b. Drag the reusable mapping, REU_12-1, from the Projects bar to the model area. From
the Models bar, drag the datastore TRG_SALES from the Oracle Sales Application
model to the model area. Connect the reusable mapping REU_12-1 to the
TRG_SALES. Click OK to perform Attribute Matching. Note that only three of the
columns were automatically mapped.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 25
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 26
c. In TRG_SALES, select the FIRST_ORD_ID column. Drag the FIRST_ORDER_ID
column from the reusable mapping to the Properties > Target Expression field.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
The Properties tab may jump from FIRST_ORD_ID to FIRST_ORDER_ID. You may
need to freeze the FIRST_ORD_ID tab to make the drag-and-drop easier. Make sure
that the proper source ended up in the proper target.

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 27
d. Repeat the previous two-step process to map the remaining target columns to their
corresponding columns in the temporary mapping in the Source area. Use the following
table and results screen as your guide:
1. First click this column in the Target 2. Then drag this column from the Source
Datastore TRG_SALES: area down to the Expression tab:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

FIRST_ORD_DATE FIRST_ORDER_DATE
LAST_ORD_ID LAST_ORDER_ID
LAST_ORD_DATE LAST_ORDER_DATE
AMOUNT SUM_AMOUNT
PROD_AVG_PRICE AVG_AMOUNT

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 28
e. Select REU_12-1, scroll down to the Properties > General section, and then select
Subselect Enabled.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 29
f. Select TRG_SALES and set the Properties > Target > Integration Type to Control
Append.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 30
g. Click the Physical tab, select TRG_SALES, and set the Properties > Integration
Knowledge Module to IKM SQL Control Append. Scroll down and make sure that
FLOW_CONTROL is True and set the DELETE_ALL to True. Save the mapping, and
then close the mapping tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 31
4. Execute the mapping MAP_12-1 and verify the execution results.
a. Execute the mapping MAP_12-1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 32
b. Open ODI Operator Navigator and verify that the mapping MAP_12-1 executed
successfully. Scroll down and open the task 320 - Insert new rows. Verify that the
number of inserts is 120.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 33
c. On the Models tab in the Oracle Sales Application model, right-click the TRG_SALES
datastore, and select View Data. View the rows inserted in the target datastore.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

This completes Practice 12-1. Continue on with Practice 12-2.

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 34
Practice 12-2: Developing a New Knowledge Module
Use Case Scenario
To develop the integration project, John created the ODI project and the mapping to export data
from a flat file and load this data into a relational table. Now, he decides to modify the existing
KM to create an audit table each time the mapping runs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Background
After the mapping is created and tested, you may need to create a new knowledge module to
use with the mapping.
In this practice, you duplicate an existing knowledge module, IKM SQL Incremental Update,
naming the new knowledge module IKM Oracle UI - Audit. You add two commands to the
knowledge module, “Create Audit Table” and “Insert Audit Records,” by using command syntax
provided in text files.
e to
Next, you duplicate an existing mapping, MAP-Exp-FF-RT, naming the new mapping MAP-
EXP-FF-RT-AUDIT. You change the new mapping’s IKM selection to use the new knowledge lic ens
module that you just created, IKM Oracle UI - Audit. b l e
Finally, you execute mapping MAP-EXP-FF-RT and examine the audit records inserted into the f e ra
audit table created by your knowledge module.
tra ns
n -
Your Tasks a no
a
1. Create the new knowledge module with new functionality
ฺ an audit table and insert
s idtoecreate
audit records.
h
) t Gu
o m
a. If necessary, restart ODI Studio.
o o ฺc den
b. If necessary, connect toa S tu using the same wallet password of Welcome1
hthe Repository
as you have in the
y
@past.e thi s
e r
c. Log in using
( a jdthe same
u sName: DEV_ODI_REPO and User: SUPERVISOR as you have in
r
theepast.
d
j
m i rA
Vl adi

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 35
d. Open ODI Designer and click the Projects tab. Select Projects > Export-FF-RT >
Knowledge Modules > Integration (IKM). Right-click IKM SQL Incremental Update
and select Duplicate Selection. In the window that follows, click Yes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 36
e. Double-click Copy of IKM SQL Incremental Update to edit it. Rename this KM IKM
Oracle UI – Audit. Click the Tasks tab.
Note: If the message for Object Locking/Unlocking is displayed, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
f. On the Tasks screen, review the commands in the current KM. n
a s Insert new rows
Select
t r
and then click the Add on-
icon to add the new command.
n
s a eฺ
) h a u id
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 37
g. Name this command Create Audit Table. Select the Ignore Errors check box. On
the Command on Target tab, set the Technology to Oracle. Enter the following
command to create the audit table. Verify that the check boxes in the Journalizing
section are not selected. If necessary, deselect them.
Note: You can find this command in the lab12.txt file, provided in ~/labs.
create table <%=odiRef.getTable("L", "TARG_NAME", "A")%>_H
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

(
<%=odiRef.getColList("", "[COL_NAME]\t[DEST_CRE_DT]NULL",
",\n\t", "", "PK")%>,
AUDIT_DATE DATE,
AUDIT_INDICATOR VARCHAR2(1)
)

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 38
h. Click the Tasks tab. With the Create Audit Table command still selected, click the
Add icon again .
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
Similarly, create the command that inserts audit records in the audit table, as shown in
a no
the screen. Name this command Insert Audit Records. Select the Ignore Errors
a s ideฺ
check box. On the Command on Target tab, set the Technology to Oracle. Enter the
h
command provided below.
m ) t Gu
o
ฺc den
Note: You can find this command in the lab12.txt file, provided in ~/labs.
o o
y ah is Stu
Insert into <%=odiRef.getTable("L", "TARG_NAME", "A")%>_H
(
d e r@ e th
( a j u s
<%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "", "PK")%>,
e r
AjdAUDIT_INDICATOR
AUDIT_DATE,

mir
a d i )
Vl select <%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "",
"PK")%>,
sysdate,
IND_UPDATE
from <%=odiRef.getTable("L","INT_NAME","W")%>
Note: In these substitution methods, you use the following parameters:
GetTable:
− “L”: Local naming convention. For example, in Oracle that would be schema.table
(versus “R” for remote: schema.table@server).
− “A”: Automatic. It enables ODI to determine which physical schema to use (the Data
schema [“D”] or the Staging schema [“W”]).
getColList:
− Notice the “PK” parameter. If it is used, only the columns that are part of the primary
key are included.

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 39
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 40
i. Click Save, and then close the tab.
j. After clicking Save, verify that your new knowledge module, IKM Oracle UI – Audit,
appears in the Knowledge Modules tree.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m G u
) MAP-EXP-FF-RT,
2. You will create a modified copy of the o
ฺ mapping
c will need
e t to execute with your
nto duplicate the existing
newly created knowledge module.
h o o You
t u d mapping, rename
it, and then change the IKM
@ ya his S
entry to use your new IKM Oracle UI-Audit.
a. On the Projects
d e e t the mapping MAP-EXP-FF-RT and select Duplicate
rtab, right-click
j s
a Click Yesuon the Confirmation screen.
Selection.
(
r
A jde
m ir
l a di
V

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 41
b. Double-click the mapping Copy of MAP-EXP-FF-RT. Change the name of the
mapping to MAP-EXP-FF-RT-Audit, as shown in the screenshot. Click the Physical
tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 42
c. On the Physical tab, click TRG_SALES_PERSON (ODI_STAGE_UNIT) in the diagram
to open the Target Area – Property Inspector below the diagram. In the IKM Selector
drop-down list, select IKM Oracle UI - Audit. Ensure that in the Options list,
FLOW_CONTROL and STATIC_CONTROL options are set to False, as shown in the
screenshot. Click Save, and then close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 43
d. To execute your new mapping, select the mapping and click Execute . Click OK.
Click OK again in the Information window to start the execution.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
li c ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 44
e. Click the Operator tab to open ODI Operator. Click to open All Executions. If

necessary, click the Refresh icon , find your new mapping session, and view the
session steps.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 45
f. Scroll down and double-click the Create Audit Table step. View the content of the
Definition and Code tabs for this step. Close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 46
g. Similarly, view the Insert Audit Records step information. Refer to the following
screenshots. Click Close.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 47
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 48
h. Using sqlplus or Oracle SQL Developer, connect to ODI_STAGE (password
ODI_STAGE). Select the Audit table TRG_SALES_PERSON_H, and verify that your Audit
table was created and populated with audit records, as shown.
[oracle@hostname labs]$ sqlplus odi_stage/ODI_STAGE
SQL*Plus: Release 12.1.0.1.0 Production on Tue Feb 18 10:32:21 2014
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Last Successful login time: Tue Feb 18 2014 10:26:08 -05:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing
options

SQL> desc TRG_SALES_PERSON_H


Name Null? Type
------------------------------------- -------- ---------------------
SALES_PERSON_ID NUMBER(8)
e to
ens
AUDIT_DATE DATE
AUDIT_INDICATOR VARCHAR2(1)
lic
SQL> select * from TRG_SALES_PERSON_H; b l e
f e ra
SALES_PERSON_ID AUDIT_DAT A
ans
---------------
31
---------
18-FEB-14
-
I
o n -tr
32 18-FEB-14
a n
I
40 18-FEB-14
h a s ideฺ
I

) t Gu
41 18-FEB-14 I
42
m
18-FEB-14
o
I
50
o o ฺc den
18-FEB-14 I

ah is Stu
51 18-FEB-14 I
52 18-FEB-14 I
y
j d er@ se th
8 rows selected.

( a
SQL>r exit u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 49
3. In addition, you create an option for your new knowledge module to make your KM more
user friendly. This option will enable an end user to choose when to generate audits.
a. In Designer, click the Projects tab, reopen IKM Oracle UI – Audit, and select the
Options tab. Click New (green plus). Name this option AUDIT_CHANGES, set Type to
Boolean, and Default Value to True. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 50
b. Now you need to link this option to your steps in the KM. Select the Tasks tab. Double-
click your new step, Create Audit Table, to edit it. Scroll to the bottom and click the
Options plus sign [+] to show its contents. Deselect the Always Execute check box.
Select AUDIT_CHANGES. This will condition the execution of these steps with the
value set by the end user. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 51
c. Repeat the previous step for the Insert Audit Records command, as shown in the
following screenshots. Click Save to save your KM and close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 52
d. Double-click MAP-Exp-FF-RT-Audit to edit it. Click the Physical tab, click
TRG_SALES_PERSON, and verify that the option AUDIT_CHANGES is set to True.
Execute the mapping .
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 53
e. If not opened, open ODI Operator, select All Executions, and then click the Refresh
button and view the execution results. Both Create Audit Table and Insert Audit
Records steps should be present.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 54
f. In Designer, edit the MAP-EXP-FF-RT-Audit mapping again. On the Physical tab,
click TRG_SALES_PERSON and set the option AUDIT_CHANGES to False. Save your
mapping and then execute your mapping again .
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 55
g. In ODI Operator, click the Refresh button and view the execution results. The new KM
steps to create and populate an audit table are not executed (they would have been in
between steps 150 and 160).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
4. Clean up the desktop by closing ODI Studio.
i r A
This completes Practice 12-2. This completes the practices for Lesson 12.
di m
V l a

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 56
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 13:
Using a n Procedures
ODI
a uide s ฺ
) h
o mChapter
n t G
13
ฺ c
o tud e
h o
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 1
Practices for Lesson 13: Overview
Practices Overview
In this practice, you define an ODI procedure to create a relational table and populate it with
data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 2
Practice 13-1: Creating an ODI Procedure
Use Case Scenario
John created the new ODI project and an interface to perform the transformations described in
the previous practices. Now, he needs to modify his project by adding an ODI procedure to
create a relational table and populate it with data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Background
A common task that is performed by using ODI is creating and populating a relational table. This
practice walks you through the steps that are needed to create a project and a procedure that
will create and populate a relational table with data. You also execute the procedure and verify
the execution within ODI Operator.
In this practice, you use the same RDBMS schema, ODI dataserver, and ODI physical
schema—all named ODI_STAGE—that you created in Practice 10-1.
e to
You create the Procedure-CRT-TBL project and then the PRD-create-populate-table
procedure. lic ens
b l e
Next, you add commands to drop, create, and populate a table, by using the syntax provided in
f e ra
text files.
ans
records. o n -tr
Finally, you execute the procedure and verify that the table was created and populated with

a n
1. Create the Procedure-CRT-TBL project.
h a s ideฺ
2. Create the PRD-create-populate-table
m ) procedure.
G u
3. Add commands to drop, create, andฺc o an
populate e t
table.
o o d
y ah is Stu
j d er@ se th
r ( a u
A jde
m ir
l a di
V

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Enter. Wait until this script completely executes.


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset13.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e to
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. lic ens
b l e
2. Create the new project in ODI Designer.
f e ra
a. Switch to the Designer Navigator. Click the Designer tab. Select the Projects tab, click
tra ns
New Project , and select New Project. n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
b. j d
Enter the name erof@thesproject:
e th
Procedure-CRT-TBL. Click Save to create the project
( a u
r the tab. The project appears in the tree view. Expand the Procedure-CRT-
andeclose
A d project
jTBL node.
i m ir
d
Vla

Note: In this practice, you use the same RDBMS schema, ODI data server, and
physical schema named ODI_STAGE that you created in Practice 10-1. If you have not
performed Practice 10-1, complete Practice 10-1 to create the RDBMS schema, the
ODI source data server, and the physical schema for your new RDBMS model.

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 4
c. Open the ODI Topology Navigator, select Physical Architecture. Expand
Technologies > Oracle > ODI _STAGE. Verify that you have the physical schema
ODI_STAGE created under the ODI_STAGE data server.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
d.
n -tr
Open ODI Designer. In the Projects tab, select Procedure-CRT-TBL > First Folder.
Right-click Procedures and select New Procedure.
o
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 5
e. Name the procedure PRD-create-populate-table. Deselect Multi-Connections.
Set Target Technology to Oracle.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f. Click the Tasks tab. Click Add to add a step in the procedure.
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 6
g. In the command window, enter the parameters of the procedure and the command on
the target provided in the following table. You need this command to drop the table in
case a table with this name exists. Select the Ignore Errors check box.
Parameter Value
Name Drop Table
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Technology Oracle
Schema ODI_STAGE
Ignore Errors Selected
DROP table ODI_STAGE.SRC_SALES_PERSON
Notice the SQL command does not end with a semicolon.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 7
h. Click Add to add another step in the procedure. In the command screen, if not
selected, click the Target Command tab. Enter the parameters of the procedure and
the command provided in the following:
Note: You can copy this command from ~/labs/lab13.txt file.
Parameter Value
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Name Create Table


Technology Oracle
Schema ODI_STAGE
Ignore Errors Unchecked
CREATE table SRC_SALES_PERSON (
SALES_PERSON_ID NUMBER(8,0) NOT NULL,
e to
ens
FIRST_NAME VARCHAR2(80),
LAST_NAME VARCHAR2(80),
lic
DATE_HIRED VARCHAR2(80), b l e
DATE_UPDATED DATE NOT NULL, f e ra
ans
constraint SRC_SALES_PERSON_PK primary
key(SALES_PERSON_ID)
o n -tr
a n
eฺ
)
haassemicolon.
Notice the SQL command does not end) with u i d
o m t G
o o ฺc den
y ah is Stu
j d er@ se th
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 13: Using ODI Procedures


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

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a you thatuyou cannot see the whole command at one time, you can always
If it bothers
A de the Command Advanced Editor (the gear) to see the whole thing.
jstart
i m ir
d
Vla

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 9
i. Click Add to enter the step to populate the SRC_SALES_PERSON table. In the
command screen, click the Target Command tab. Enter the parameters and the
command shown below. Click the Tasks tab to view your steps.
Note: You can copy this command from ~/labs/lab13.txt.
Parameter Value
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Name Populate Table


Technology Oracle
Schema ODI_STAGE
Ignore Errors Deselected
Notice that these multiple SQL commands do end with a semicolon, except for begin.
Also notice that some of the inserts intentionally contain bad data (invalid dates).
e to
ens
begin
insert into ODI_STAGE.SRC_SALES_PERSON
'1999/02/22',sysdate);
values (11,'Andrew', 'Andersen',
lic
insert into ODI_STAGE.SRC_SALES_PERSON values (12,'John',
b l e
'Galagers',
'2000/04/20',sysdate);
f e ra
insert into ODI_STAGE.SRC_SALES_PERSON
'32422',sysdate);
tra ns
values (13,'Jeffrey','Jeferson',

insert into ODI_STAGE.SRC_SALES_PERSON


o n - values (20,'Jennie', 'Daumesnil',
'1988/02/28',sysdate);
a n(21,'Steve',
'1992/09/24',sysdate);
h a s ideฺ
insert into ODI_STAGE.SRC_SALES_PERSON
values 'Barrot',

) values
insert into ODI_STAGE.SRC_SALES_PERSON
m G u(22,'Mary', 'Carlin',
'1995/03/14',sysdate); o t
ฺc denvalues (30,'Paul',
o o
insert into ODI_STAGE.SRC_SALES_PERSON 'Moore',
'36467',sysdate);
y ah is Stu values (31,'Paul',
insert into ODI_STAGE.SRC_SALES_PERSON 'Edwood',

j er@ se th
'2003/03/18',sysdate);
d
insert into ODI_STAGE.SRC_SALES_PERSON
values (32,'Megan', 'Keegan',
r ( a u
'2001/05/29',sysdate);
e
Ajd
insert into ODI_STAGE.SRC_SALES_PERSON values (40,'Rodolph','Bauman',
'2000/05/29',sysdate);

mir insert into ODI_STAGE.SRC_SALES_PERSON values (41,'Stanley','Fischer',

a d i '37233',sysdate);
Vl insert into ODI_STAGE.SRC_SALES_PERSON
'1992/08/25',sysdate);
values (42,'Brian', 'Schmidt',

insert into ODI_STAGE.SRC_SALES_PERSON values (50,'Anish', 'Ishimoto',


'1992/01/30',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (51,'Cynthia','Nagata',
'1994/02/28',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (52,'William','Kudo',
'1993/03/28',sysdate);
end;

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

Practices for Lesson 13: Using ODI Procedures


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
( a and closeuthe tab.
j. ClickrSave
A jde
d imir
Vla

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 11
3. Execute your newly created procedure and verify the results.
a. Expand Procedure-CRT-TBL > Procedures, right-click the newly created procedure
PRD-create-populate-table, and then click Run to execute the procedure. Click
OK. Click OK again.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a b. Open ODI Operator. In ODI Operator, click the All Executions node, click Refresh
, find your session, and verify that your procedure executed successfully.

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 12
c. Open Oracle SQL Developer and expand the ODI_STAGE connection. Select the
Tables node and click Refresh . Double-click the newly created table
SRC_SALES_PERSON, click the Data tab, and verify that your table
SRC_SALES_PERSON was successfully created and populated with records as shown
in the following screenshot.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
4. Additionally, you create an option to delete rows from the
a notarget audit table, which you
created in Practice 12-2. To delete rows, you add
h a sa command
i d eฺthat uses the value of the
m G u the command to delete records
option in the code. If the value of this option) is set to “Y,”
will be executed. o t
ฺc den Click Add (green plus). Name this option
a. Re-open your procedure and o o u
select tOptions.
y ah and s S
set Type to Value. Add the description Delete
hi table. Set the default value of this option to Y (no
DELETE_AUDIT_RECORDS,
records from e r @ e
the Auditt
quotes). a
( jd Save.us
Click
j d er
m ir A
l a di
V

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 13
5. Open your procedure, PRD-create-populate-table, and click the Tasks tab. Click
Add (green plus) to add a new command. Add the new command on Target to delete
records in the audit table, TRG_SALES_PERSON_H. Set the parameters as shown in the
following table. Click Save.
Note: You can copy this three-line odiRef command from ~/labs/lab13.txt.
Parameter Value
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Name DELETE AUDIT RECORDS


Schema ODI_STAGE
Ignore Errors Checked
Target Command (can copy from lab13.txt)
<% if (odiRef.getOption( "DELETE_AUDIT_RECORDS").equals("Y")) { %>
DELETE FROM <%=odiRef.getObjectName("TRG_SALES_PERSON_H")%>
e to
ens
<% } %>

lic
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 14
6. Click the Options tab and verify that the value of your newly created option is set to Y.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

7. Execute your procedure. In Operator, verify that the procedure executed successfully.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a
8. Open SQL Developer and expand ODI_STAGE > Tables (Filtered). Open the Audit table
TRG_SALES_PERSON_H, click the Data tab, and verify that the rows were deleted from the
Audit table.

9. Clean up the desktop by closing ODI Studio.


This completes Practice 13-1. This completes the practices for Lesson 13.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 15
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 14:
Using a n Packages
ODI
a uide s ฺ
) h
o mChapter
n t G
14
ฺ c
o tud e
h o
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 1
Practices for Lesson 14: Overview
Practices Overview
In Practice 14-1, you create an ODI procedure and package to execute the sequence of
transformations for the Mappings created in previous practices. In Practice 14-2, you modify a
package to use it with a variable and a user function that you define.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 2
Practice 14-1: Creating an ODI Package
Use Case Scenario
While working on his data integration projects, John created the ODI project and a number of
mappings for ELT processing. Now, he decides to build a procedure for handling repetitive
operations and a package to use this procedure and the mappings.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Background
A common task that is performed by using ODI is creating a package that executes a number of
objects (Mappings, Procedures) in the flow. In this practice, you create an ODI procedure and
package to execute the sequence of transformations with the mappings created in the previous
practices.
In this practice, you create a procedure, DELETE_TARGET, for deleting records from the
TRG_SALES, TRG_CUSTOMER, TRG_CITY, TRG_REGION, and TRG_COUNTRY tables. Then you
e to
create and execute a package, PKG_14-1. This package runs your new procedure, and then
runs four mappings that you defined earlier in Lessons 8 and 9, which will use these same lic ens
tables as targets: b l e
f e ra
• The DELETE_TARGET procedure
ans
• Practice 8-1 mapping (Countries)
o n -tr
• Practice 8-2 mapping (Regions)
a n
• Practice 8-3 mapping (Cities)
h a s ideฺ
• Practice 9-1 mapping (Customers) m ) t Gu
o
ฺc den
Finally, you run this package and review its execution in ODI Operator.
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Enter. Wait until this script completely executes.


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset14.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e to
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. lic ens
b l e
2. Create a DELETE_TARGET procedure that deletes the data in the TRG_SALES,
f e ra
TRG_CUSTOMER, TRG_CITY, TRG_REGION, and TRG_COUNTRY tables in the
ans
ORACLE_LOCAL_SALES logical schema.
o n -tr
a. In the Designer tab, click the Projects tab, and then select the Procedures node from
a n
Procedure. h a s ideฺ
the HandsOnLoads > HandsOn folder. Right-click Procedures and select New

m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 4
b. Enter DELETE_TARGET in the Name field, deselect Multi-Connections, and select
Oracle as the Target Technology.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
c. Click the Tasks tab, and then click Add . f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 5
d. In the Properties panel, in the Name Field, enter DELETE TRG_SALES. In the Schema
field, select ORACLE_ORCL_LOCAL_SALES. In the Context field, select Development.
In the Command field, enter the following code:
DELETE FROM <%=odiRef.getObjectName("L", "TRG_SALES",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>
This method returns the table name with runtime-dependent information, such as the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Oracle schema name that may vary depending on the context and topology. Select
Ignore Errors.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 6
e. In Tasks, click Add. In the Properties panel, in the Name Field, enter DELETE
TRG_CUSTOMER. In the Schema field, select ORACLE_ORCL_LOCAL_SALES. In the
Context field, select Development. In the Target Command field, enter:
DELETE FROM <%=odiRef.getObjectName("L", "TRG_CUSTOMER",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>
This method returns the table name with runtime-dependent information, such as the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Oracle schema name that may vary depending on the context and topology. Select the
Ignore Errors check box. Select the Tasks tab.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 7
f. Repeat the two previous steps to create the DELETE TRG_CITY, DELETE
TRG_REGION, and DELETE TRG_COUNTRY commands, which delete the TRG_CITY,
TRG_REGION, and TRG_COUNTRY tables, respectively, as shown in the following
screenshots.
Note: To enter the commands, you may refer to the ~/labs/lab14-1.txt file.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


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

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
@ e th
erthen
g. Click Save,jd
and s the procedure tab.
close
( a u
j d er
A
d imir
Vla

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 10
3. Create a package, PKG_14-1, that runs:
• Procedure DELETE_TARGET
• Mapping MAP_8-1
• Mapping MAP_8-2
• Mapping MAP_8-3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

• Mapping MAP_9-1
Note: These mappings were created in Practices 8-1 and 9-1.
a. In the Projects tab of the Designer Navigator, expand the HandsOnLoads >
HandsOn folder. Right-click the Packages node and select the New Package option.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
b. Enter PKG_14-1 in the Name
y s Stu
ah ifield.
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 11
c. In the Designer navigator tree view, expand the Mappings node and Procedures node.
Select the DELETE_TARGET procedure from the tree view, and then drag it to the
diagram workbench. A DELETE_TARGET step appears in the package.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
h o o tu
d. Repeat the operationy a i s S
for thehMAP_8-1, MAP_8-2, MAP_8-3, and MAP_9-1 mappings.
e r @ looke t
( a jd
The package should
u s like the following.
r
Ajde
i m ir
d
Vla

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 12
e. Rename your steps with the names of the tables loaded by the step. In the Diagram
window, click the step for the DELETE_TARGET procedure. Edit the Step name:
DELETE TARGET TABLES, as shown in the following screenshot. In the diagram,
click the empty space. The step is now renamed Delete Target Tables.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) G u
o
f. Similarly, edit the names of the other steps in tthe diagram, as follows:
o ฺc MAP_8-2
d e n
a h o
Rename MAP_8-1 as Countries,
S tu as Regions, MAP_8-3 as Cities, and
MAP_9-1 as Customers.
@ y his
d e r e t
( a j u s
r
A jde
d imir
Vla

g. Click the Next Step on Success icon on the Package toolbar. Click the Delete
Target Tables step. Hold the left mouse button and drag the cursor over the Countries
step and then release the mouse button. A green arrow appears between these steps.

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 13
h. Click the Countries step. Hold the left mouse button and drag the cursor over the
Regions step and then release the mouse button. A green arrow appears between
these steps. Repeat this operation to link the steps in the correct order: Countries >
Regions > Cities > Customers, as follows.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

i. Click Save to save this package.


4. Run this package and review its execution in ODI Operator.

a. Click Execute the Package to run this package. Click OK in the Run window that
appears, wait a few seconds, and then click OK in the Information panel.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 14
b. In the Operator Navigator, click the Refresh icon. In the session list, expand the All
Executions node. The session called PKG_14-1 should appear as complete. You can
expand the nodes in the session to see the steps and tasks corresponding to your
procedure commands and the mappings that have been executed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
c. Close the PKG_14-1 tab.
m ) t Gu
o n 14-2.
c with Practice
This completes Practice 14-1. Continueฺon e
o o d
y ah is Stu
j d er@ se th
r ( a u
A jde
i m ir
Vl ad

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 15
Practice 14-2: Using ODI Packages with Variables and User Functions
Use Case Scenario
John needs to add more complexity to the workflow by creating a user function for mapping the
salutation values. This function will convert the values (0, 1, 2) to strings (“Mr,” “Mrs,” “Ms”). He
also needs to create a variable DELETION_FLAG for counting the number of lines in
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

TRG_CUSTOMER and to have the Delete Target step running only if DELETION_FLAG is greater
than 0.

Background
A common task that is performed by using ODI is using user functions and variables to add
more complexity to your workflows and mappings. This practice will explain how to use
variables, user functions, and the more advanced features in the packages.
1. In the HandsOnLoads project, define a user function group named Conversion,
e to
containing a user function named DearConvert.
2. Use this function in the mapping MAP_9-1 to convert the values (0, 1, 2) to (“Mr,” “Mrs,” lic ens
“Ms”). b l e
f e ra
3. In ODI Designer, create a numeric variable DELETION_FLAG that counts the number of
lines in TRG_CUSTOMER. tra ns
n -
no PKG_14-2.
4. Duplicate the PKG_14-1 package, naming the new package
a
5. Have the DELETE_TARGET procedure run only if the
h a i d eฺ
s DELETION_FLAG variable is greater
than 0. ) u
ฺ c om ent G
PKG_14-2:
h o o tud
@ ya his S
j d er se t
r ( a u
A jde
i m ir
Vl ad

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 16
Your Tasks
1. Create a user function called DearConvert in a new user function group called
Conversion. This function converts the values (0, 1, 2) to (“Mr,” “Mrs,” “Ms”). Implement
this function for Oracle as linked technology with a CASE WHEN expression.
Note: Remember to use the dollar sign ($) when using the parameters.
a. Select the User Functions node in the HandsOnLoads project. Right-click this node
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

and select New User Function.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 17
b. Enter DearConvert in the Name field, enter Conversion in the Group field, and enter
the following in the Description field:
Converts the values (0, 1, 2) to ("Mr", "Mrs", "Ms").
In the Syntax field, enter: DearConvert($1)
Note: $1 is the parameter name you use in the decision case structure shown in the
following screenshot.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
) clickt Add
c. Click the Implementations tab, and then
m G u(green plus).
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir d. In the Implementation window, select MySQL and Oracle from the list of Linked
Vla Technologies. Enter the following code in the Implementation syntax field. Click OK to
save this implementation. Click Save and close the DearConvert user function tab.
Note: To enter the commands, you may refer to ~/labs/lab14-2.txt.
CASE
WHEN ($1 = '0') THEN 'Mr'
WHEN ($1 = '1') THEN 'Mrs'
WHEN ($1 = '2') THEN 'Ms'
ELSE NULL END

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 18
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d e r@ e th
2. Use this function( a j u s MAP_9-1 to convert the source DEAR column (numeric)
in the mapping
into the
d r DEAR column (string).
etarget
j
m i ra.A In the Projects tree view, expand Mappings. Double-click MAP_9-1. In
Vl adi TRG_CUSTOMER, select the Dear column.

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 19
b. Edit the Expression in the Properties panel to have the following code:
DearConvert(SRC_CUSTOMER.DEAR)
Select the Staging option from Execute on Hint. Click Save to save the mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
a d i3.m Run the MAP_9-1 mapping and review the conversion result.
Vl a. In the mapping window, click Run. In the Execution window, select Development
context, and then click OK. Click OK when the “Session started” message appears.
Close the MAP_9-1 editing tab.

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 20
b. Click the Operator tab. Select All Executions, and then click Refresh. Expand the All
Executions node. The session called MAP_9-1 should appear as complete. Note that
the steps you see may not be identical to those shown in the following.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
(
c. In Designer
r u right-click TRG_CUSTOMER datastore and select View Data.
a > Models,
A de that the DEAR column was populated with “Mr” as shown in the following.
jVerify
d imir
Vla

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 21
4. Create a numeric variable called DELETION_FLAG that counts the number of lines in
TRG_CUSTOMER.
a. In the Designer, open the Projects tab, and select the Variables node in the
HandsOnLoads project. Right-click this node and then select New Variable.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
b.
o n -tr
Enter DELETION_FLAG in the Name field, select Numeric as the Datatype, and enter
0 in the Default Value field. In the Keep History field, select All Values to enable
a n
h a s ideฺ
viewing the history of all values for this variable.

m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a
c. Click the Refreshing tab. Select ORACLE_ORCL_LOCAL_SALES as the schema, and in
the Select Query field, enter the following expression. Click Save to save the variable.
Close the DELETION_FLAG variable tab.
Note: To enter commands, refer to ~/labs/lab14-2.txt.
SELECT COUNT(*) FROM <?=odiRef.getObjectName("L",
"TRG_CUSTOMER", "ORACLE_ORCL_LOCAL_SALES", "", "D") ?>

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 22
5. Modify a package to have the Delete Target step running only if DELETION_FLAG is
greater than 0.
a. Duplicate the PKG_14-1 package. Open the Copy of PKG_14-1 package and
rename it PKG_14-2.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 23
b. Select the Diagram tab. In the project tree, expand the Variables node. Drag the
DELETION_FLAG variable from the tree view to the diagram. Click DELETION_FLAG in
the diagram. In the Properties > General tab beneath the diagram, rename this step
Refresh Customer Count. Ensure that the Type field is set to the Refresh variable.
Note: You need to click the step in the diagram to view the new step name.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
c. Drag the DELETION_FLAG variable from
m ) the tree
G u to the diagram again. Rename
view
this step Flag > 0? and change o
ฺc the Typen t
e to Evaluate Variable. In the Operator field,
select > as the operator,h o
and oenter in d
0tu the Value field.

@ ya his S
j d er se t
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 24
d. Right-click the Refresh Customer Count step and select First Step. Click the
“Next step on success” tool on the Package toolbar, and link the Refresh
Customer Count step to the Flag >0? step. Using the same tool, link the Flag >
0? step to the Delete Target tables step. Click the “Next step on failure” tool
on the Package toolbar, and link the Flag > 0? step to the Countries step, as
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

shown in the following. Click Save to save the package. Close the tab.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
6. Run the new package
e r @
and check
e t hwhether the Delete Target Tables step was
executed.
( a jd u s
j d erclick
a. Select the PKG_14-2 package and click Run. Click OK in the Execution window, and

i r A then OK when the “Session started” message appears.


m
Vl adi

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 25
b. In the Operator, verify that the latest session called PKG_14-2 appears as complete,
with a Delete Target Tables step executed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
c. Open the Designer tab. Open the PKG_14-2 package again a
t r nsthen select the
and
on-OK the
Diagram tab. To delete records from the target tables, select
TABLES step, right-click, and select Execute Step.nClick
DELETE TARGET
in the Run window, and
s a appears.
then click OK when the “Session started” message eฺ
h a
) t Gu i d
o m
o o ฺc den
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 26
d. In the Operator, verify that the latest session called PKG_14-2 appears as complete,
with a Delete Target Tables step executed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
e. With records from the target tables having been deleted, run the entire package f e ra
PKG_14-2 again. Click OK in the Run window, and then click OK when the “Session ans
started” message appears.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 27
f. Open the Operator and expand the latest session called MAP_14-2. Verify that the
Delete Target Tables step is no longer executed.
Note: Because the Customers tables were emptied by the execution of the Delete
Target Tables step, the value of the Flag >0? variable changes when refreshed, to
“false”, and the Delete Target Tables step is no longer executed. Close the
PKG_14-2 tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu
7. Clean up the desktop by y ah ODI
closing
s S
Studio.
This completes Practice
e r @ This
14-2.
e t hi
completes the practices for Lesson 14.
(a j d u s
e r
A jd
mi r
a d i
Vl

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 28
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 15:
a n Debugger
Step-by-Step
a uide s ฺ
) h
o mChapter
n t G
15
ฺ c
o tud e
h o
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 1
Practices for Lesson 15: Overview
Practices Overview
In these practices, you learn how to use the step-by-step debugger (new with ODI 12c) to debug
mappings.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 2
Practice 15-1: Debugging Mappings
Overview
In this practice, you use the step-by-step debugger to debug a mapping.

Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

1. Reset your practice environment.


a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset15.sh
e to
Note: This process may take one minute or more to complete.
c. Restart ODI Studio. lic ens
b l e
d. Connect to Repository using the same wallet password of Welcome1 as you have in
f e ra
the past.
ans
o n -tr
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
a n
2. s ideฺ
Create a duplicate copy of the existing ODI mapping.
h a
) t Gu
a. In ODI Designer, expand HandsOnLoads > HandsOn > Mappings. Right-click
m
o
ฺc den
MAP_9-1 and select Duplicate Selection. Click Yes to confirm.
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 3
b. Open Copy of MAP_9-1. Click the Overview tab and enter the following new name
for the copy: MAP_DEBUG. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

c. Click the Physical tab. In the Properties section, enter MAP_DEBUG_DS in the Name
e to
ens
field. Click Save All and close the tabs.
lic
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 4
3. Start a debugging session.
a. Right-click MAP_DEBUG and select Debug.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
o n -
a n
h
Local (No Agent). Click OK. Then click OKawhen u
youi d eฺ
b. In the Debug window, make sure that Contextsis set to Development, and Agent is
see the “Session started”
message in the Information window.m ) tG
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 5
4. Add the breakpoints and perform debugging.
a. In the Blueprint panel, right-click the “Load data − LKM SQL to Oracle” task and select
Add Breakpoint.
Note: The step numbers shown in the screenshots may be different from the step
numbers shown in your environment.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 6
b. Click the MAP_DEBUG_DS_STEP step. On the Debug toolbar, click Resume (the
blue play button on the toolbar).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
The execution then pauses at the “Load data – LKM SQL to Oracle” task.
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 7
c. Using the Properties panel, examine the source and target code. This step loads a
table called SRC_CUSTOMER into a loading staging table.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 8
d. On the Blueprint tab, right-click the “Load data - LKM SQL to Oracle” task and select
Get Data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
e. o n -tr
In the Debug Data window, click the Target Task Data tab.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 9
f. Remove the entire target command and enter the following:
select * from ODI_TEMP.C$_0FILTER
Click Run SQL Code.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

After the query executes, you should see an empty table.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) - LKM
g. On the Blueprint tab, select the “Load data
G u to Oracle” task. On the Debug
SQL
o
toolbar, click Run to Task Endฺc . This e
t
n the current load task and pauses
executes
after execution. Note theh o o d
tuhalf-bar on line .90 is now the bottom half,
y ahasgreens
cursor
S
e r @ e thi
indicating that the step completed.

( a jd u s
j d er
A
d imir
Vla

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 10
h. On the Target Task Data tab, click Run SQL Code. You should now see a fully
populated C$ temporary table.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

i. Add a breakpoint to “Load TRG_CUSTOMER - IKM Oracle Insert” (Step 160). e to


lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 11
j. Right-click this breakpoint step and select Edit Breakpoint.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

k. In Breakpoint Properties, select the Suspend after executing the task check box.
Click OK.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 12
l. Select “Load data – LKM SQL to Oracle.” On the Debug toolbar, click Resume
(blue Play button):
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a m. Right-click the “Load TRG_CUSTOMER” task and select Get Data.

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 13
n. In the Debug Data window, click the Target Task Data tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
o. Remove the entire target command and replace it with the following:
lic ens
select * from SALES_DEV.TRG_CUSTOMER
b l e
Click Run SQL Code.
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d e r@ e th
After thea
( j u s you should see the contents of TRG_CUSTOMER:
query executes,

j d er
r A
d i mi
Vl a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 14
p. Click the “Load TRG_CUSTOMER” step again. Then, on the Debug toolbar, click Run
to Step End ( ) to finish the execution of this step.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 15
q. Select the MAP_DEBUG_DS_STEP step at the top of the list. On the Debug toolbar, click
Resume (blue Play button). This ends the session execution. Click OK and then
close the debugging session tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺcStudio.den
o
5. Clean up the desktop by closingoODI
tuthe practices for Lesson 15.
ahcompletes
This completes Practice 15-1.yThis s S
e r @ e thi
( a jd u s
j d er
m i rA
Vl adi

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 16:
a
Managing n ODI Scenarios
a uide s ฺ
) h
o mChapter
n t G
16
ฺ c
o tud e
h o
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 1
Practices for Lesson 16: Overview
Practices Overview
In this practice, you create an ODI scenario and schedule its execution with an ODI agent in
scheduling mode.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 2
Practice 16-1: Creating and Scheduling Scenarios
Use Case Scenario
Earlier, John created the ODI procedure to create a relational table and populate it with data.
Now John needs to create an ODI scenario and schedule its execution.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Background
A common task that is performed by using ODI is to create an ODI scenario and schedule its
execution. You already developed the ODI procedure that creates a relational table and
populates the relational table with data.
In this practice, you learn how to create and schedule an ODI scenario to run the procedure you
created in Practice 12-1.
1. First, in the Designer Navigator’s Projects tab, you generate a scenario for the PRD-
create-populate-table procedure.
e to
2. Then, in Topology Navigator, you verify connection to ODI Agent.
3. Next, in Designer Navigator, you schedule the scenario with ODI Agent. lic ens
b l e
4. Back to Topology Navigator to review the scheduling of the agent.
f e ra
5. Finally, in Operator Navigator, after the scheduled scenario execution time, you verify
ans
that the scenario has executed.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Enter. Wait until this script completely executes.


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset16.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e to
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. lic ens
b l e
2. Create a new scenario with Oracle Data Integrator.
f e ra
a. In ODI Designer, click the Projects tab. On the Projects tab, expand the project:
ans
o n -tr
Procedure-CRT-TBL > First Folder > Procedures. Right-click the PRD-create-
populate-table procedure and select Generate Scenario.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

b. Accept the default scenario name PRD_CREATE_POPULATE_TABLE. The version is set


to 001. Click OK.

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 4
c. Expand the PRD-create-populate-table procedure and expand Scenarios. Right-
click the PRD_CREATE_POPULATE_TABLE scenario to view the possible options, as
shown in the following screenshot.
Note: The scenario has been successfully created. You can execute the scenario
directly, use the scenario within a package, or schedule the scenario within ODI.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 5
3. To schedule an ODI scenario with ODI Agent, perform the following steps:
a. Verify that you still have an agent from Practice 3-1 running in:
/$FMW_HOME/user_projects/domains/agent1/bin
If not, then change to that directory and run:
./agent.sh -NAME=OracleDIAgent1
Leave the agent running (minimized or in the background) for the remainder of the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

class.
b. In Topology Navigator > Physical Architecture > Agents, verify the connection to the
ODI agent, as shown in the following screen:

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a c. In Topology > Logical Architecture > Agents, open localagent and set (or confirm)
the Physical Agents to OracleDIAgent1 for all three contexts. Click Save and close
the localagent tab.

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 6
d. In Designer, expand the PRD-create-populate-table procedure. Expand
Scenarios > PRD_CREATE_POPULATE_TABLE Version 001. Right-click
Scheduling and select New Scheduling.
Note: To schedule a scenario, an ODI Agent must be set up. If an ODI Agent is not set
up within the ODI Topology Navigator, perform Practice 3-1, “Configuring a Standalone
Agent by Using the Common Administration Model.”
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 7
e. On the screen that follows, select the agent where the scheduled scenario will run:
localagent. Set Context as Development and log level to 5. Set Execution to
Simple and click the calendar . Set the execution time to approximately five
minutes from the current time, as shown in the following screenshot. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

Note: The scheduled time is in GMT and your local time may be several hours
different. Just change the minute hand and ignore the hour hand.

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 8
f. Expand Scheduling and verify that the DEVELOPMENT / localagent entry is now
inserted under Scheduling.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
g. Open Topology Navigator to o review
o e n of the Agent. In the Physical
ฺc thedscheduling
architecture, expand theh o
a Agents tuand double-click OracleDIAgent1. On the
node
S
@ y
OracleDIAgent1 screen, i
click
h s Update Schedule. On the screen that follows, click
r t
( a jdeagain.use
OK. Click OK

j d er
A
d imir
Vla

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

Practices for Lesson 16: Managing ODI Scenarios


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

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
h. Click the View Schedulehbutton. The tuscreen that appears shows you the scheduling
y a lineisis S
information. The horizontal VERY hard to see. Click OK to close the schedule.
Close the tabs:
@ e th tab and Scenario Scheduling.
erOracleDIAgent1
( a j d u s
j d er
A
d imir
Vla

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 10
4. To verify the execution of the scheduled scenario, perform the following steps:
a. Click the Operator tab to open ODI Operator. In ODI Operator, click the Session List
bar. Wait until the scheduled execution time to view the execution results, and then
click Refresh.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

to
e n se
b. Expand: Agent > OracleDIAgent1 > PRD_CREATE_POPULATE_TABLE, and view
e l ic
the execution results for the PRD-create-populate-table procedure. Note
r
execution time of this scenario. That is the time that you scheduled with a bl Agent.
ODI
the

s fe
You have now successfully scheduled a scenario with an agentnscheduler.

n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

5. Clean up the desktop by closing ODI Studio.


This completes Practice 16-1. This completes the practices for Lesson 16.

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 11
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 12
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 17:
Using a n Plans
Load
a uide s ฺ
) h
o mChapter
n t G
17
ฺ c
o tud e
h o
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 1
Practices for Lesson 17: Overview
Practices Overview
In this practice, you will use the load plan editor to create a simple load plan with a set of
parallel and serial steps. “Parallel” only makes sense if you have multiple CPUs, so depending
on the lab’s available hardware, it might not be truly parallel.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 2
Practice 17-1: Using Load Plans
Use Case Scenario
Earlier, John created the ODI procedure to create a relational table and populate it with data. In
the last practice, John created an ODI scenario to run the procedure.
In this practice, John will use the load plan editor to create a simple load plan with a set of
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

parallel and serial steps.

Background
When ODI is used to populate very large data warehouses, it is common to have thousands of
tables being populated by using hundreds of scenarios. The execution of these scenarios has to
be organized in such a way that the data throughput from the sources to the target is the most
efficient within the batch window. Load Plans help organize the execution of scenarios in a
hierarchy of sequential and parallel steps for these types of use cases.
e to
Load Plans are objects that organize the execution of packages and scenarios at a high level.
Load Plans provide features for parallel, sequential, and conditional scenario execution, lic ens
restartability, and exception handling. b l e
In this practice, you will use the load plan editor to create a very simple load plan with a set of f e ra
steps running in parallel, followed by a set of steps running sequentially. ans
First, define a load plan.
o n -tr
a n
Then, add a node for independent steps to run in parallel. Create two procedures for loading
a s ideฺ
dimensions, and add them as steps to execute in parallel.
h
m ) t Gu
Next, add a node for interdependent steps to run in a specific sequence. Add several of your
o
ฺc den
previously defined objects as steps to run in the following order:
o o
ah is Stu
1. DELETE_TARGET procedure, which deletes records from the TRG_SALES, TRG_CUSTOMER,
y
er@ th
TRG_CITY, TRG_REGION, and TRG_COUNTRY tables
2. MAP_8-1, which
a j dadds s e
records
u to the TRG_COUNTRY table
3.
(
er which adds records to the TRG_REGION table
A j d
MAP_8-2,
4.
m irMAP_8-3, which adds records to the TRG_CITY table

Vl adi5. MAP_9-1, which adds records to the TRG_CUSTOMER table


Note: These five steps are the same set of operations that you used in creating the PKG_14-1
package.

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

[oracle@hostname ~]$ cd ~/labs


[oracle@hostname labs]$ ./reset17.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in e to
the past.
lic ens
2. Create a simple load plan to execute two steps in parallel, and then five steps serially.
b l e
a. In the Designer Navigator, click the Load Plans and Scenarios tab. From the tab’s
f e ra
menu, select New Load Plan.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 4
b. Enter Data Warehouse Load Plan in the Name field, and click the Steps tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
c. -tr
The load plan editor opens with the root step node. Click Add Step (the green plus),
o n
and select Parallel Step.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
d. The Parallel step node appears under the root step. You will define two new
procedures and place them under the parallel node so they will execute in parallel.
Note that the default restart type for Parallel steps is “Restart all children,” and the
restart type for root_step is “Restart from failure.” Click Save to save your load plan.

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 5
3. Define two procedures to load PRODUCT and TIME dimensions, and add them to the load
plan Parallel step node.
a. On the Projects tab of the Designer navigator, expand the HandsOnLoads >
HandsOn folder. Right-click the Procedures node and select the New Procedure
option.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
b. n -tr
Enter Load_PRODUCT_dimension in the name field. Do not enter any other
o
a n
information, because this will be a nonfunctioning skeletal procedure that you create
a s ideฺ
solely for the purpose of seeing how load plans work. Later, when you execute the load
h
) t Gu
plan, this procedure will run, but do nothing. Click Save and close the
m
o
ฺc den
Load_PRODUCT_dimension editing tab.
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 6
c. Repeat the previous step to create the Load_TIME_dimension procedure. Click
Save and close the Load_TIME_dimension editing tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
d. Return to the Data Warehouse Load Plan editor. With the Parallel step highlighted, lic ens
b l e
click Add Step (green plus) and select Run Scenario Step.
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m e. A load plan uses scenarios in its steps. You can select an existing scenario for a step,
V l a or choose other objects (packages, interfaces, variables, and procedures), for which
ODI will automatically generate a scenario to run the step.
You now add the two procedures that you just defined, Load_PRODUCT_dimension
and Load_TIME_dimension, as steps under the Parallel node of the load plan.
In the Add Run Scenario Step screen, click Lookup Scenario (magnifying glass).

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 7
f. In the Executable Object Type field, select Procedure. Select
Load_PRODUCT_dimension. Click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
g. In the New Scenario window, accept the name LOAD_PRODUCT_DIMENSION as the
tra
name of the scenario that ODI will create to run this procedure, and click OK.
ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
r@ e thScenario Step window.
h. ODI returnsdtoethe AddsRun
( a j u
Note:r LOAD_PRODUCT_DIMENSION
j d e for the procedure, as well asisthe
generate
the name of the new scenario that ODI will
name for the step that you are adding to the
r A
d imi load plan. Click Finish.

Vla

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 8
i. The first of two parallel steps appears.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

j. Click the Parallel node of the Steps Hierarchy, and click Add Step (green plus) again.
Select Run Scenario Step.
e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tuother new procedure, Load_TIME_dimension,
k. Repeat steps e through
y ahhto add
s S
your
r @of the
to the Parallel node
e e t hi Hierarchy. The result should look similar to the
Steps

( a jd
following screenshot.
u s
j d er
A
d imir
Vla

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 9
4. Add ODI objects to the load plan as serial steps. These are the same objects that you used
earlier to create the PKG_14-1 package.
a. In the Steps Hierarchy, select root_step. Click Add Step (the green plus) and select
Serial Step.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
b. The Serial node appears in the Steps Hierarchy. With Serial node selected, click Add lic ens
Step and select Run Scenario Step. b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
e
jIndthe
c.
ir A Add Run Scenario Step window, click Lookup Scenario .
dim
Vla

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 10
d. Select Procedure as the Executable Object Type. Select DELETE_TARGET. Click OK.
In the New Scenario window, accept the name DELETE_TARGET as the name of the
scenario that ODI will create to run this procedure, and click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
e.
er@AddseRunthScenario Step window. Click Finish.
ODI returns to the
j d
r ( a u
Ajde
i m ir
d
Vla

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 11
f. The first of five serial steps appears. Click the Serial node of the Steps Hierarchy, and
click the Add Step button again. Select Run Scenario Step.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
ens
g. Click Lookup Scenario and select Mappings.
lic
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 12
h. You will add four mappings to the Serial node: MAP_8-1, MAP_8-2, MAP_8-3, and
MAP_9-1. First, select MAP_8-1 and click OK. In the New Scenario window, accept
the name MAP_8-1 as the name of the scenario that ODI will create to run this
mapping, and click OK. ODI returns to the Add Run Scenario Step window. Click
Finish.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
i. Repeat steps f through h to add them ) t three
remaining G u mappings: MAP_8-2, MAP_8-3,
and MAP_9-1. Your results should o n to the following screen. Note the default
ฺc lookdsimilar
e
o o
ah itypes
restart values for the different
y s Stofusteps. Click Save to save your load plan.
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 13
5. Execute the load plan and examine the list of executed steps in the Operator Navigator.
a. Click to execute the Load plan. Click OK in the Start Load Plan window, and then
click OK when the “Load Plan started” message appears.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
b. Open the Operator Navigator, click oRefresh,
ฺc load plane nappear
and examine the results of executing the
load plan. The seven stepsoinothe u d as a grouping of seven executions
within seconds of each h
a is S
other. For t
each load plan step, ODI generated a scenario for
y
execution.
d e r@ e th
j
First, theaprocedures
( u s loading the TIME and PRODUCT dimensions ran in parallel.
for

j d er the DELETE_TARGET procedure and the four mappings ran in the serial
Then,
i r A sequence that you defined.

d im
Vla

6. Clean up the desktop by closing ODI Studio.


This completes Practice 17-1. This completes the practices for Lesson 17.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 17: Using Load Plans


Chapter 17 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 18:
a
Enforcingn Data Quality with
h a s ideฺ
ODI
) Gu
ฺ c omChapter
e nt18
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 1
Practices for Lesson 18: Overview
Practices Overview
In this practice, you enforce data quality with a mapping that you created in Practice 10-1, and
you perform error management.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 2
Practice 18-1: Enforcing Data Quality with ODI Mappings
Use Case Scenario
John is responsible for data loading, transformation, and validation. He created a project and a
mapping to export data from a flat file and load this data into a relational table. Now John needs
to verify the quality of data loaded in the table.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Background
In the previous practices, you learned how to create ODI mappings, which transform data from
one or more relational tables in the source to a relational table in the target and to export data
from a flat file to a relational table. In this practice, you perform data quality control for the
mapping created in Practice 10-1.
1. First, for a certain datastore, you verify that the primary key constraint is marked static, and
two columns are marked mandatory with static control.
e to
2. You then create a mapping by using that datastore as a target.
lic ens
3. On the mapping’s Physical tab, you set STATIC_CONTROL to True. On the Controls tab, e
b l
you ensure that the knowledge module is set to CKM SQL (a knowledge module that you
f e ra
will import) and you set maximum allowed errors to 5.
ans
are generated if these columns are not loaded. o n -tr
4. For two columns in the target datastore, you select Check Not Null so that control errors

a n
h a s ideฺ
5. You run the mapping with Flow Control set to FALSE. You verify that there are control
errors on three records, and that the three records with errors were loaded into the target
datastore. m ) t Gu
o
ฺc den
o
6. Finally, you rerun the mapping with Flow Control set to TRUE and verify that errors are
o
ah is Stu
excluded from the target datastore.
y
j d er@ se th
Note: Completing this practice is critical for all the following practice sessions.

r (a u
jd
Your Tasks e
i r A
1. Reset your practice environment.
di m a. Disconnect from the ODI repository (or just close ODI Studio).
V l a
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset18.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 3
2. Modify MAP-Exp-FF-RT (created in Practice 10-1) to enable checking data quality in the
target table.
a. On the Designer > Projects tab, expand the Export-FF-RT project. Select
Knowledge Modules > Check (CKM). Notice that there are currently none imported.
Right-click Check (CKM) and select Import Knowledge Modules.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
o click OK. Then Close the
a
b. In the File import directory field, select CKM SQLnand
Import Report window. Verify that CKM SQL
h awas
i d eฺ imported and is shown
s successfully
in the tree view.
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den > TRG_SALES_PERSON >
h o
c. On the Models tab, expandoOracle_RDBMS1
tu
Constraints, and then y s S
adouble-click TRG_SALES_PERSON_PK. Click the Control tab
r
and verify that Static
e hi
@ is eselected.
t
( a jd u s
j d er
A
d imir
Vla

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 5
d. In the model Oracle_RDBMS1, expand TRG_SALES_PERSON > Attributes, double-
click the LAST_NAME column, and then click the Control tab. Select Static to enable
static control. Select Mandatory. Click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
a
e. Repeat the same step to enable Static control
h i d eฺ for the DATE_HIRED
sand Mandatory
m
column. Save your changes and close )the tabs.G u
o
ฺc den t
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 6
f. On the Projects tab, expand Export-FF-RT > First Folder > Mappings, and then
duplicate MAP-EXP-FF-RT. Open the copy of the mapping, click the Overview tab,
and rename it as MAP-EXP-FF-RT-Quality, and then click the Logical tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
A
g.
dethe Logical tab, delete the filter for the SALES_PERSON_ID column, and preserve
jOn
m ir
l a di downstream expressions, as shown in the following screenshot. Click the Physical tab.
V

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 7
h. On the Physical tab, select TRG_SALES_PERSON to open the IKM Options section.
Set the Static_Control option to True.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 8
i. Scroll down and ensure that your Check Knowledge Module is set to CKM SQL. Leave
the other options with the default values. Click the Logical tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 9
j. Select TRG_SALES_PERSON and set the Maximum Number of Errors Allowed to 5.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
k. In Target Datastore, select
y Stu column, and then select Check Not Null.
ah theisLAST_NAME
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 10
l. Repeat the same step for the DATE_HIRED column. Click Save to save your changes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
m. Run your mapping . Click the o
ฺc Overview
e n> Execution tab of the MAP-EXP-FF-RT-
h o
QUALITY editor to view theoexecution tu d
results showing three errors, as shown in the
following screenshot.ya is S
r @ t h
( a de needutoseclick Refresh to view your last execution.
Note: Youjmay

j d er
A
d imir
Vla

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 11
n. On the Models tab, right-click the TRG_SALES_PERSON target datastore and select
Control > Errors. View the records with errors as shown in the following screenshot:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 12
o. In Designer Navigator, right-click the TRG_SALES_PERSON datastore and select View
Data. Verify that the three rows with errors are still inserted in the target datastore.
Close the TRG_SALES_PERSON data tabs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 13
p. Click the MAP-EXP-FF-RT-Quality tab. On the Physical tab, select
TRG_SALES_PERSON to open the IKM Options section. Set Flow_Control to True.
Save your changes, and then run the mapping .
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 14
q. On the Models tab of Designer Navigator, right-click TRG_SALES_PERSON and select
View Data. Verify that the three rows with errors (SALES_PERSON_ID = 13, 30, 52) are
excluded from the data in the target datastore. Close the tabs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

3. Clean up the desktop by closing ODI Studio.


This completes Practice 18-1. This completes the practices for Lesson 18.

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 15
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices ofor
n -tLesson 19:
Workinga nwith Changed Data
h a s ideฺ
Capture
) Gu
ฺ c omChapter
e nt19
h o
o Stu d
a
y his
e r @ e t
j d u s
e r (a
A jd
m i r
l a di
V

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 1
Practices for Lesson 19: Overview
Practices Overview
In this practice, you implement Changed Data Capture to detect changes in the source
environment.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 2
Practice 19-1: Implementing Changed Data Capture
Use Case Scenario
As a database administrator, John is responsible for data loading, transformation, and
validation. He wants to be able to detect changes in his source environment. For that purpose,
he needs to implement Changed Data Capture in his data integration project.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Background
A common task that is performed by using ODI is to implement Changed Data Capture. In this
practice, students implement Changed Data Capture to detect changes in the source
environment for the mapping that was created in Practice 8-1. You will capture data changes in
the SRC_CITY table in the Oracle Sales Application model. Then you modify the mapping to
process changed records only.
In this practice, you perform changed data capture in a mapping, using the JKM Oracle Simple
e to
knowledge module.
1. First, you import this knowledge module and create a model by using this journalizing lic ens
knowledge module. b l e
f e ra
2. Then you create a mapping by using the IKM Oracle Incremental Update knowledge
ans
3. Import the JKM Oracle Simple knowledge module. o n -tr
module, specifying capture of journalized (changed) data only.

a n
tab. h a s ideฺ
4. Create a model, Oracle_RDBMS2, specifying this knowledge module on the Journalizing

m ) t Gu
o
5. Reverse-engineer the model, verifying the resulting structure.
ฺc den
o o
ah is Stu
6. Add the model’s SRC_SALES_PERSON table to CDC and start the Journal by using the
y
default subscriber SUNOPSIS.

j d er@ se th
7. Use Data Viewer to change data in the table and verify in Journal Data that the data

r (a
change was captured. u
jd e
8. Create a mapping to process only changed data.
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Enter. Wait until this script completely executes.


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset19.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e to
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. lic ens
b l e
2. Import the appropriate JKM in the project.
f e ra
a. In Designer Navigator, click the Projects tab. Expand the Procedure-CRT-TBL
ans
select Import Knowledge Modules. o n -tr
project. Expand the Knowledge Modules node, right-click Journalizing (JKM), and

a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 4
b. Select JKM Oracle Simple to import and click OK. Close Import Report.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 5
c. On the Models tab, create a new model named Oracle_RDBMS2. For Technology,
select Oracle. Confirm the logical schema ODI_STAGE. Verify the setting, as shown
in the following screenshot. Click the Journalizing tab.
Note: You created the SRC_SALES_PERSON table in the ODI_STAGE schema in
Practice 13-1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a d. In the Knowledge Module menu, confirm that knowledge module JKM Oracle
Simple.Procedure-CRT-TBL is selected, as shown in the following screenshot. Click
Save to save your model, and then close the tab.

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 6
e. From the Models tab of Designer Navigator, reverse-engineer the Oracle_RDBMS2
model (not Oracle_RDBMS1). Expand this model and verify its structure as follows:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 7
3. Set up the CDC Infrastructure. You will start the CDC on the SRC_SALES_PERSON table in
the Oracle_RDBMS2 model.
a. To add the table to CDC, expand the Oracle_RDBMS2 model, right-click the
SRC_SALES_PERSON table, and select Changed Data Capture > Add to CDC. Click
Yes to confirm.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 8
b. Right-click the SRC_SALES_PERSON table again and select Changed Data Capture >
Start Journal.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc subscriber
c. In this practice, you use the default e n SUNOPSIS. Consequently, you do not
o o d
tuOK to confirm that your subscriber is SUNOPSIS.
y ahOK. Inisthe
have to add another subscriber.
In the Run window, click
Click
SInformation window, click OK again.
r @ t h
( a jde use
j d er
A
d imir
Vla

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 9
d. Open Operator Navigator. Click Refresh. Select All Executions and verify that the
SRC_SALES_PERSON session executed successfully.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
theuchanged data is captured.
) thatt G
4. View the data, change some data, and confirm
a. In Designer Navigator, click theฺc o m nRight-click the SRC_SALES_PERSON
o o d e
Models tab.
ah is Stu
datastore and select Data.
y
j d er@ se th
r ( a u
A jde
i m ir
Vl ad

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 10
b. Select the row with SALES_PERSON_ID = 11. In the LAST_NAME column, double-click
Andersen to edit that cell. Change the value from Andersen to Anderson. Similarly,
select the row with SALES_PERSON_ID = 51 and change the value to Smith. Click the
Save changes icon (not the diskette icon) and close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 11
c. Right-click the SRC_SALES_PERSON table again and select View Data. Scroll down
and verify that the rows are still modified. Close the tab.
d. To verify that your changed data is captured, right-click SRC_SALES_PERSON and
select Changed Data Capture > Journal Data. Find the two captured changed
records in the journal data. Close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 12
e. Optional: You can display an icon in the tree view to indicate the status of CDC. From
the main menu bar, select Tools > Preferences > ODI > User Interface > Designer,
and then select Show the CDC Modifications in the tree.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
This will(a
r u small clock on the left of the datastore:
display a very
de for ready
Ajyellow
mir green for running
a d i
Vl

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 13
5. Create a mapping that processes captured data changes. The mapping loads the
TRG_SALES_PERSON_CDC datastore in the Oracle_RDBMS1 model with the content of the
SRC_SALES_PERSON table from the Oracle_RDBMS2 model. The purpose of this mapping
is to process and load only changed data.
a. First you need to add one more knowledge module. In ODI Designer, click the
Projects tab, and then expand the Export-FF-RT project. Expand the Knowledge
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Modules node. Right-click Integration (IKM) and select Import Knowledge Modules.
Import the new Knowledge Module: IKM Oracle Incremental Update. Close the
report.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o n Hive object as well (this is a known bug).
ฺc thedCKM
e
o
You may have accidentallyoimported
You can safely ignore
y ait. h is Stu
j d er@ se th
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 15
b. Now you need to create one more target datastore to store only changed data. On the
Models tab, expand Oracle_RDBMS1, duplicate the TRG_SALES_PERSON datastore,
and rename the copy and alias as TRG_SALES_PERSON_CDC. Save the
TRG_SALES_PERSON_CDC datastore, and then close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 16
c. Right-click TRG_SALES_PERSON_CDC datastore and then select Data.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
d. Click Delete current row repeatedly to delete all the rows.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

e. Save changes of your rows (not the diskette icon) and close the tab.

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 17
f. On the Projects tab, expand Export-FF-RT > First Folder > Mappings. Right-click
Mappings and select New Mapping. In the New Mapping window, enter
MAP_SALES_PERSON_CDC as the name of the mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

to
g. Click the Models tab. In the tree view, expand the Oracle_RDBMS1 model. Drag the e n se
TRG_SALES_PERSON_CDC datastore from the tree view to the modeling zone. e l ic
Expand
a l the
bfrom
the Oracle_RDBMS2 model and drag the SRC_SALES_PERSON datastore
fe r
model tree to the modeling zone of your diagram. Drag a Distinctscomponent in
a n
between the two datastores.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 18
h. Connect all the ports. Click OK to perform Attribute Matching. Save your mapping.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 19
i. Right-click the caption of the source datastore and select Data. Scroll down to preview
the current source data. Close the Data Editor window.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 20
j. On the Logical tab, click TRG_SALES_PERSON_CDC and set the Integration Type to
Incremental Update.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
ฺ o n Update.
k. On the Physical tab, click TRG_SALES_PERSON_CDC
c Incremental
e and set the Integration
Knowledge Module to IKM
h o
o Stu
Oracle d
a
y his
e r @ e t
( a j d u s
r
A jde
d imir
Vla

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 21
l. On the Physical tab, select the source datastore. In Properties > General, select the
Journalized Data Only check box.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 22
m. Save your mapping and close the tab. On the Projects tab, run the mapping to process
only journalized records. In the Run and Information windows, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
6. Verify the execution results.
o n -tr
n
a. Open Operator Navigator. Click Refresh. Expand the All Executions node and verify
a
h a s ideฺ
that your session, MAP_SALES_PERSON_CDC, executed successfully.

m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 23
b. View the data in the TRG-SALES_PERSON_CDC datastore and verify that only the two
changed rows are inserted in the target datastore.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 24
7. Clean up by dropping the journal and removing it from CDC.
a. On the Models tab, in the Oracle_RDBMS2 model, right-click the SRC_SALES_PERSON
datastore and select Drop Journal. Click OK in the Run window. Click OK in the
Information window.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 25
b. Right-click the SRC_SALES_PERSON datastore again and then select Remove from
CDC. Click Yes to confirm removing the datastore from CDC.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

8. Clean up the desktop by closing ODI Studio.


This completes Practice 19-1. This completes the practices for Lesson 19.

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 26
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ra ns
Practices o
for
n -tLesson 20:
a
Advanced n ODI Administration
a uide s ฺ
) h
o mChapter
n t G
20
ฺ c
o tud e
h o
@ ya his S
j d er se t
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 1
Practices for Lesson 20: Overview
Practices Overview
In Practice 20-1, you create a new user profile, assign authorization by the profile to objects,
and define a password policy. In Practice 20-2, you deploy Enterprise Manager and ODI
Enterprise Manager Plug-in to an existing WLS domain with the deployed and configured ODI
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Java EE. You then use the Enterprise Manager and ODI Console to monitor and manage ODI
components, processes, and resources.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 2
Practice 20-1: Setting Up ODI Security
Use Case Scenario
As a database administrator at FN Enterprise, John is responsible for performing database
management and integration tasks on various resources within the organization. John is also
responsible for enforcing the ODI security policies. To secure this ODI environment, he needs to
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

set up the security with ODI.

Background
Using the ODI Security Manager module, you can manage security in Oracle Data Integrator.
In this practice, you explore the security features of ODI Security Manager. You create a profile,
grant three methods (actions) to the profile, and create a new ODI user to whom you assign that
profile.
You then assign the profile to your new user and grant a specific method (View) for a specific e to
object (Scheduling) to your new user. You also define user parameters that enable specific
functionality for your new user. lic ens
b l e
Finally, you define password policies that control the case-sensitivity and length of user-defined
passwords. f e ra
tra
1. In ODI Security Navigator, expand the Profiles panel and duplicate the Repository
ns
n -
a no
Explorer profile, naming the new profile REVIEWER. You grant three methods to the
REVIEWER profile: “Compare with version,” “Duplicate,” and “Export from object Model.”
h a s ideฺ
Note: You may need to click the View menu and open Security Navigator.
2. Create a new ODI user, INT_PROJECT_REVIEWER.m ) t Gu
o
ฺcyour newly
e ncreated user. To connect to ODI Master
3. o
Assign the new profile REVIEWER o to d
y
and Work Repositories, assign Stuprofile, CONNECT, to the new user
ah theisbuilt-in
j d er@ se th
INT_PROJECT_REVIEWER.
4. (
Grant the View
r u the Scheduling object to the INT_PROJECT_REVIEWER user.
a method for
5. jdeuser preferences to enable specific functionality for INT_PROJECT_REVIEWER.
Define
A
6.
m irDefine password policies to enforce passwords to be uppercase and greater than eight
l a di characters.
V

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 3
Your Tasks
1. Reset your practice environment.
a. Disconnect from the ODI repository (or just close ODI Studio).
b. In the Terminal window, execute the following reset commands:
When prompted, verify that you disconnected from the ODI repository, and then press
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

Enter. Wait until this script completely executes.


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset20.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio.
d. Connect to Repository using the same wallet password of Welcome1 as you have in
the past.
e to
e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past. lic ens
b l e
2. To define an ODI security policy, you need to create an appropriate profile for the working
methods used in your project. f e ra
ans
o n -tr
a. From the Window menu, open ODI Security Navigator. Expand the Profiles bar.
Right-click the generic CONSOLE profile and select Duplicate Selection. Click Yes to
confirm. a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 4
b. Double-click Copy of CONSOLE to edit. Rename your new profile REVIEWER. Save
this profile. The profile REVIEWER appears in the Profiles tree structure.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

3. Assign the appropriate authorizations to REVIEWER.


a. In Security Navigator, expand the Objects bar. On the Profiles bar, expand REVIEWER
> Model, as shown in the following screenshot. Only the View method is permitted for
Model now.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 5
b. On the Objects tab, expand Model and select the Compare with Version method.
Drag the Compare with Version method to the REVIEWER profile. In the Confirmation
window, click Yes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 6
c. Repeat step b to add the methods “Duplicate” and “Export...” to the REVIEWER profile.
In Profiles, expand REVIEWER > Model, and verify that the methods “Compare with
version,” “Duplicate,” and “Export...” are added to the Model object, as shown in the
following screenshot. Save the REVIEWER profile and close the tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

4. Create a new ODI user.


a. In Security Navigator, expand the Users bar and select New User. The New User
window opens.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 7
b. Name the new user: INT_PROJECT_REVIEWER. Click Enter a password.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

c. Enter the password (INTEGRATION), and then confirm this password. Do not select the
“Allow expiration date” check box. Click OK. Save this new user. The
INT_PROJECT_REVIEWER user is now displayed in the Users tree structure.
e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 8
5. Assign the profile REVIEWER to the INT_PROJECT_REVIEWER user.
a. Make sure that both the Profiles and Users panels are displayed together in ODI
Security Navigator. Drag the REVIEWER profile in the Profiles panel to the
INT_PROJECT_REVIEWER user in the Users panel. Click Yes to confirm granting the
profile.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
b. In the Users panel, expand o o tu
h the INT_PROJECT REVIEWER > Profiles node and verify
y a s S
that the REVIEWER
e r @profile
e t hi assigned to this user.
was

( a jd u s
r
Ajde
i m ir
d
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 9
c. To connect to ODI Master and Work Repositories and other objects, assign the built-in
profile CONNECT to your new user. Drag the CONNECT profile to the
INT_PROJECT_REVIEWER user. Click Yes to confirm granting CONNECT to your new
user.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
d
d. Verify that the r@ eandthREVIEWER profiles are added to your new user:
eCONNECT
( a j u s
j d er
A
d imir
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 10
e. You can also grant privileges to use certain methods for objects directly to your user.
Ensure that the Objects and Users panels are open. In the Objects panel, scroll down,
and then expand the object Scheduling. Select View. Drag this method to
INT_PROJECT_REVIEWER.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
c deobject
ฺScheduling n with the View method was added to
o
f. Verify that authorization to the
o
ah isuser,
the INT_PROJECT_REVIEWER
y Stuas shown in the following screenshot:
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 11
6. Connect your new user to the ODI Work Repository and verify your access to ODI artifacts.
a. From the ODI menu, select Disconnect.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Connect To Repository with the Wallet password of Welcome1.

e to
c. Select DEV_ODI_REPO for the Login Name. Enter INT_PROJECT_REVIEWER as the lic ens
user and INTEGRATION as the password. b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jde
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 12
d. On the Designer tab, click the Projects tab and Models tab. Expand your projects and
models to verify that you have access to view all your artifacts.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 13
7. Define user parameters so that the user can enable specific ODI functionality. Ensure that
objects remain unlocked when they are opened. In addition, you may want to set a delay
between two refreshes in seconds and the number of elements displayed in a branch of the
Operator tree view.
a. In ODI Security Manager, select Tools > Preferences.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Confirm or edit the user parameters as shown in the following table. Click OK.
Parameter Value Functionality
Lock object when opening No Used for concurrent environments
e to
Used in conjunction with
s
n object
e“Lock
Display lock icons check
when opening” tole l i c
indicate it
b
radelay
Delay between two refresh e
Inter-refresh
f
(seconds)
2
t r a ns
Operator Display limit (0=no
n o Number
200
of elements displayed in a n-
limit)
s a eฺ branch of the Operator tree view

) ha uid
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r (a u
jde
i r A
di m
V l a

Preferences > ODI > System > Concurrent Development.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
Preferences > ODI > User Interface > Designer.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
Preferences > ODI > User Interface > Operator.
c. Click the ODI menu and select Disconnect to close this user connection.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 15
8. Open your connection with the SUPERVISOR user. Select Security Navigator. Define
password policies. These policies consist of a set of rules that will be checked when the
password is defined by the user.
a. Connect To Repository with the Wallet password of Welcome1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

b. Connect to DEV_ODI_REPO with the SUPERVISOR user. Accept the stored password.

e to
lic ens
b l e
f e ra
tra ns
n -
a no
c. Select the Security Navigator tab. Click thea s icon, d ฺ then select Password
eand
policies. Click the Add a Policy icon. ) h u i
o m t G
o o ฺc den
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 16
d. Name this policy Policy 1. Enter the rule description as shown in the following
screenshot. Set “Conditions to match” to All. In the Rules section, click Text and select
is uppercase. Click Add rule (the + sign).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
e. Enter another rule: Length >= 8. Click OK. f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 17
f. On the screen that follows, deselect the default MinPasswordLength (make it
inactive), and for Policy 1 select Active. Select the Passwords are valid for check
box and set it to 30 days. Click OK to save this Password policy. Click OK again. Close
the Security Navigator tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
a
g. It is possible that a new policy may causehan eฺ to no longer be valid (for
sexistingiduser
m ) letters).
G u
example, Welcome1 contains lowercase
o
ฺcYes. den t For purposes of this lab, click No. In
o
real life you would probably click
o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

This completes Practice 20-1. Continue with Practice 20-2.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 18
Practice 20-2: Integration with Enterprise Manager and Using ODI
Console
Use Case Scenario
Oracle Data Integrator provides an extension integrated into the Fusion Middleware Control
Console (Enterprise Manager). The Oracle Data Integrator components can be monitored as a
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

domain through this console, and administrators can have a global view of these components,
along with other Fusion Middleware components from a single administration console. John
decided to begin using this feature. He created the WebLogic Server (WLS) domain, ODI-
DOMAIN. Now John needs to deploy and configure the ODI Java EE Agent with the existing
WLS domain. He also needs to configure the ODI Enterprise Manager and ODI Console Plug-in
with WLS.

Background
e to
ens
In this practice, you perform the steps needed to deploy and configure the ODI Java EE Agent,
Enterprise Manager 12c, and ODI Console plug-in on an existing WLS domain. You use
lic
Enterprise Manager 12c and ODI Console to access your ODI objects.
b l e
1. Use RCU to prepare a new OPSS schema.
f e ra
2. Deploy and configure the ODI Java EE agent, Enterprise Manager, and ODI Console on ans
the existing WebLogic domain.
o n -tr
n
3. Connect to the WebLogic Server and managed server, ODI_server1.
a
h
4. Use Enterprise Manager to administer ODI.a s ideฺ
m ) t Gu
5. Use ODI Console to explore the ODI environment.
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 19
Your Tasks
1. Deploy and configure the ODI Java EE agent and Enterprise Manager on the existing
WebLogic domain, ODI-DOMAIN.
Note: This domain was pre-created for this practice. It consists of an admin server named
AdminServer, and a managed server named my_ManagedServer_1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

a. You will need to know your real IP address for several steps. To find out this number,
issue this command from a command prompt:
[oracle@hostname ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
e to
10.216.4.217 hostname.us.oracle.com hostname
lic ens
[oracle@hostname ~]$ b l e
f e ra
The first line of the real IP addresses (not including the localhost or loopback) is
tra
probably your IP address. In this example, it is 10.216.4.217. Your number will be ns
n -
no
different. If in doubt, ask your instructor. Write down this number for later.
a
b.
it by pressing Ctrl + C. h a s ideฺ
If you have the standalone agent running in a terminal window from previous labs, stop

m G u
) t-NAME=OracleDIAgent1
o
[oracle@hostname bin]$ ./agent.sh
ฺc dNew e n data source:
o o tu
2014-03-04 13:49:47.017 NOTIFICATION
h
a S
[DEV_ODI_REPO/*******@jdbc:oracle:thin:@localhost:1521/ORCL.US.ORACLE.COM]
y s
r t hi AgentODI-1128
@ STANDALONE.
2014-03-07 13:49:49.280 NOTIFICATION
e e
Agent OracleDIAgent1 is

( a
20910. JMXjdPort: 21910.
starting. Container:
u s Version: 12.1.2 - 17/09/2013. Port:

j d er lines omitted for clarity...)


(...many

i r A reachable. 13:49:58.254
2014-03-07 WARNING ODI-2010 Agent OracleDIAgent1 is not

d im The operation will be repeated after 30 seconds interval until

Vla
success Ctrl+C
[oracle@hostname bin]$

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 20
c. In Topology Navigator, open Physical Architecture > Agents. Right-click Agents and
click New Agent. Name it OracleDIAgent. Set the port to 8002 and Host to your real
IP address from the previous step (do not use localhost.) Verify that the web
application context is set to oraclediagent, as shown in the following screenshot.
Save your new physical agent.
Note: The agent Name is case-sensitive. Use the exact name OracleDIAgent, as
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

shown in the following screenshot:

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
d. In the Logical Architecture, create o
ฺc a newdLinkn agent with the same name as your
logical
e
o o
new physical agent, OracleDIAgent.
h tuas follows.
this logical agent to the physical agent
OracleDIAgent in y
i s S
allathree contexts, Save your logical agent definition.
@
er se t h
( a j d u
r
A jde
d imir
Vla

2. Create an OPSS Security schema using RCU for the new agent. (You can only have one
agent per OPSS schema.)
a. At a command prompt, start RCU from the Fusion Middleware Home.
[oracle@hostname ~]$ cd $FMW_HOME/oracle_common/bin
[oracle@ hostname bin]$ pwd
/u01/app/oracle/Middleware/Oracle_Home/oracle_common/bin
[oracle@ hostname bin]$ ./rcu

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 21
b. On the RCU Welcome screen, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
c. On the Create Repository screen, click Next. lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 22
d. On the Database Connections Details screen, Enter:
− Host Name: localhost
− Port: 1521
− Service Name: orcl.us.oracle.com
− Username: sys
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

− Password: Welcome1
Click Next.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a e. Accept the Checking Prerequisites information by clicking OK.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 23
f. On the Select Components screen, accept the auto-incrementing new prefix. It does
not matter if you get DEV2, DEV3, or DEVn, just remember the prefix. Expand AS
Common Schemas and select Oracle Platform Security Services (OPSS, which will
also select three Audit Services). Do not select ODI. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
g. e the Checking Prerequisites information by clicking OK.
Accept
j d
r A
d i mi
Vl a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 24
h. On the Schema Passwords screen, enter Welcome1 twice. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
i. On the Map Tablespaces screen, click Next.
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

j. Accept the create tablespace Confirmation by clicking OK.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 25
k. Accept the Creating Tablespaces completed message by clicking OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

l. On the Summary screen, click Create.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
This step takes about two minutes.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 26
m. On the Completion Summary screen, click Close to return to the OS prompt.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
3. noODI agent application.
Extend the WebLogic server domain ODI-DOMAIN with the
a
h a s config.sh
a. To deploy and configure domains with WLS, start
i d eฺ from the ODI Home
Install directory:
m ) t Gu
o
o pwdtuden
[oracle@hostname ~]$ cdฺc$ODI_HOME/common/bin
[oracle@ hostname h o
bin]$
@ ya his S
/u01/app/oracle/Middleware/Oracle_Home/odi/common/bin
er sebin]$
[oracle@jdhostname
t ./config.sh
r ( a u
A jde
m ir
l a di
V

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 27
b. Select Update an existing domain. Select the domain directory ODI-DOMAIN, as
shown in the following screenshot. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 28
c. On the Templates screen, select:
− Oracle Data Integrator – Agent – 12.1.2.0, which also includes Oracle Data
Integrator – Agent Libraries – 12.1.2.0 and Oracle JRF – 12.1.2.0. Leave these
options selected.
− Oracle Enterprise Manager Plugin For ODI – 12.1.2.0, which also includes Oracle
Enterprise Manager – 12.1.2.0
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

− Oracle Data Integrator – Console – 12.1.2.0, which includes Oracle Data


Integrator SDK Shared Library Template – 12.1.2.0
Click Next.

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 29
d. On the Application Location screen, accept the default location. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
o the domain server. During
e. The wizard will set up the ODI repository connection a nwithin
a
the wizard configuration, the repository connection
h i d eฺ must be supplied.
s information
Change the Host Name to localhost. m G u Password field, enter
) In thet Schema
o
ฺc den
Welcome1.
o o tu and the values you entered, against the
Check the values filledainhby the wizard,
S
following table and y
@screen. hi s
d e r e t
Database
( a s (Master Repository)
jConnection
u
j d er
Parameter Value
A
d imir DEV2_STB (Make sure it is the

Vla
Schema Owner same as the dev prefix created in
the previous RCU step.)
Schema Password Welcome1
DBMS/Service orcl.us.oracle.com
Host Name localhost
Click Get RCU Configuration and then click Next.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 30
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 31
f. On the JDBC Component Schema screen, select both ODI schemas. In the upper
section, change the service, host name, and password to match the information in step
e. (Changing it in the upper section changes the lower section for all selected rows.)
Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 32
g. Verify that the test was successful (if not, correct any connectivity settings). Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o tu SUPERVISOR and Password: Welcome1.
h. y ah enter
On the Credentials screen, s S
Username:
e
Click Add, and r
on@the new
e t hi enter Key Name: ODI-DOMAIN, Username: weblogic,
line
a jd Welcome1.
and Password:
( u s On the Store Name drop-down list, select
A der
joracle.odi.credmap. Click Next.

i m ir
d
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 33
i. On the Advanced Configuration screen, select Managed Servers, Clusters and
Coherence and System Components. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
j. The Managed Servers screen shows two managed servers: the pre-existing
my_ManagedServer_1, with whatever existing apps are already deployed to it, and lic ens
b l e
the newly created ODI_server1, probably dedicated to ODI (and maybe also EM).
f e ra
Change the Listen Address to your real IP address. (Do not use All Local Addresses.)
ans
o n -tr
Set Listen port to 8002 for ODI_server1. This matches the port setting that you used
when defining the OracleDIAgent physical agent. Click Next.
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 34
k. On the Clusters screen, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
l. On the Coherence Clusters screen, click Next. lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 35
m. On the Machines screen, click the Unix Machine tab, note the pre-existing machine,
(no need to change anything) and then click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
WLS machines are used for failover and load-balancing. b l e
f e ra
n. Select all the servers (Ctrl + A) and click > to assign them to my_UnixMachine_1.
ans
o n -tr
The WLS Administrator can sort them out later.

a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 36
o. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
p. On the System Components screen, click Add, then enter a System Component name lic ens
b l e
of OracleDIAgent, and a Component Type of ODI. Click Next.
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a q. On the ODI Server Configuration screen, enter Server Listen Address of your real IP
address, Port: 8002, Username: SUPERVISOR, and Password: Welcome1. Click Next.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 37
r. On the Assign System Components to Machines screen, double-click
OracleDIAgent to move it to its only possible machine destination. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
l ic ens
s. Review the Configuration Summary. Click Update to extend the domain.
e
bl the
When
domain is configured, click Finish. fe r a
n s
n - tra
a no
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

This step takes a few minutes.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 38
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
It will linger at 0% for about a minute, that is normal.
f e ra
When it reaches 100%, it is still not quite done until the Next button becomes available.
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 39
4. Connect to the WebLogic admin server and the managed server, ODI_server1.
a. In the command shell (new tab or new terminal), change the directory to
$FMW_HOME/user_projects/domains/ODI-DOMAIN/bin. Execute the
startWebLogic command. It takes approximately two minutes to initialize the admin
server and then the following message is displayed: started in RUNNING mode.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

[oracle]$ cd $FMW_HOME/user_projects/domains/ODI-DOMAIN/bin/
[oracle]$ pwd
/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/ODI-DOMAIN/bin
[oracle]$ ./startWebLogic.sh
(...many lines omitted for clarity...)
<Mar 3, 2014 5:25:14 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server
state changed to STANDBY.>
<Mar 3, 2014 5:25:14 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server
state changed to STARTING.>
e to
ens
(...many lines omitted for clarity...)
<Mar 3, 2014 5:26:17 PM UTC> <Notice> <WebLogicServer>
lic
<BEA-000365> <Server
state changed to RUNNING.>
l e
<Mar 3, 2014 5:26:17 PM UTC> <Notice> <WebLogicServer> rab <The
<BEA-000360>
f e
ans
server started in RUNNING mode.>

o n -tr
Minimize (but do not close) the admin server command window.
b. n
To start the ODI_server1 managed server, in a new terminal window or tab, change
a
h a s ideฺ
directory to $FMW_HOME/user_projects/domains/ODI-DOMAIN/bin, and use the
) t Gu
startManagedWebLogic.sh ODI_server1 command. For username, enter
m
o
weblogic. For password, enter Welcome1. The server takes about two minutes to
ฺc den
o o
start up and reach the RUNNING mode. Verify that your managed server is started in
RUNNING mode. y ah is Stu
[oracle]$ e cdr@ e th
$FMW_HOME/user_projects/domains/ODI-DOMAIN/bin/
( j d
a pwd u s
r
[oracle]$
de
A j/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/ODI-DOMAIN/bin
d imir [oracle]$ ./startManagedWebLogic.sh ODI_server1
Vla
(...many lines omitted for clarity...)
<Mar 3, 2014 7:39 PM> <Info> <Security> <BEA-090065> <Getting boot identity
from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:Welcome1
(...many lines omitted for clarity...)
<Mar 3, 2014 7:39 PM> <Notice> <WebLogicServer> <BEA-000365> <Server state
changed to RUNNING.>
<Mar 3, 2014 7:39 PM> <Notice> <WebLogicServer> <BEA-000360> <The server
started in RUNNING mode.>

There may be messages after the RUNNING message. Minimize (but do not close) this
ODI_server1 command window.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 40
c. Return to ODI Topology Navigator. Click the Physical Architecture tab and open the
OracleDIAgent definition tab. Click Test to test the connectivity of your configured
ODI Java EE agent. When you see the success message in the ODI Information
window, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 41
5. Use Enterprise Manager to administer ODI.
a. Start the web browser and enter http://localhost:7001/em. Log in to Enterprise
Manager FMW Control 12c. For User Name, enter weblogic. For Password, enter
Welcome1. Click Login.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a
The web browser requires Adobe Flash to see graphs.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 42
b. With Enterprise Manager (EM) FMW Control, you can monitor and manage processes
and resources. You can explore the deployed application by clicking each link. You can
see running processes, workload, log file information, and more.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc den
h o o tu
c. In the left Target @ y a
Navigationh s S
i expand ODI > oraclediagent. Click the
panel,
e r e t
( a jd
oraclediagent (ODI_server1)
u s node to see the Java EE agent information.

j d er
A
d imir
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 43
d. Log out of EM.
6. Use ODI Console to explore the ODI environment.
a. In the browser address bar, enter http://10.216.4.217:8002/odiconsole to
start the Oracle Data Integrator Console. Replace the yellow IP address with your real
WLS IP address. Enter User Id: SUPERVISOR and Password: Welcome1 and then
click Sign In.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a no
h a s ideฺ
m ) t Gu
o
ฺc Timedtab.
b. In the left panel, click the Design e nExpand Projects, Models, and Topology.
o o
y ah is Stu
j d er@ se th
r ( a u
A jde
d imir
Vla

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 44
c. Select the Export-FF-RT project and then click the View icon.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
c link.
ฺFolder e n
o
Scroll down and click the First
o d
y ah is Stu
j d er@ se th
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 45
d. Click the Mappings tab. Explore the mappings created in your Export-FF-RT project.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 46
e. Exit the First Folder by clicking the View button again in the left panel. Click other
tabs in the right panel. Explore the different ODI objects in your project.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
r (a u
jd e
i r A
di m
V l a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 47
f. Similarly, explore models in your Work Repository. To explore the datastores, scroll
down and select the Global sub-model name. Scroll down and view the datastores.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
ans
o n -tr
a n
h a s ideฺ
m ) t Gu
o
ฺc den
o o
y ah is Stu
j d er@ se th
( a
scroll down…
r u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 48
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

e to
lic ens
b l e
f e ra
tra ns
n -
a
When you have finished exploring, log out of ODI
no
Consoleฺ and close the browser.
) has uide
ฺ c om ent G
h o o tud
@ ya his S
j d er se t
r ( a u
e
r Ajd
d i mi
Vl a

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 49
7. Stop the ODI_server1 managed server and the WebLogic admin server.
a. To stop ODI_server1, open a command shell and change the directory to
$FMW_HOME/user_projects/domains/ODI-DOMAIN/bin. Then execute the
stopManagedWebLogic ODI_server1 command. Enter weblogic as the
username and welcome1 as the password.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ

[oracle]$ cd $FMW_HOME/user_projects/domains/ODI-DOMAIN/bin
[oracle]$ ./stopManagedWebLogic.sh ODI_server1
Stopping Weblogic Server...
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands

Please enter your username :weblogic


e to
ens
Please enter your password :Welcome1
Connecting to t3://edvmr1p0:7001 with userid weblogic ...
lic
Successfully connected to Admin Server "AdminServer" that belongs to domain
b l e
"ODI-DOMAIN".
f e ra
ns
Warning: An insecure protocol was used to connect to the server. To ensure on-

tra
the-wire security, the SSL port or Admin port should be used instead.

n -
Shutting down the server ODI_server1 with force=false while connected to
AdminServer ...
a no
.
h a s ideฺ
Exiting WebLogic Scripting Tool.
m ) t Gu
Done
o
ฺc den
o o
ah is Stu
Stopping Derby Server...

y
Derby server stopped.

d e r@ bin]$
[oracle@hostname
e th
j
a WebLogic
b. To stop(the s
u server, execute the stopWebLogic command.
de r
A j[oracle@hostname bin]$ ./stopWebLogic.sh

mi r Stopping Weblogic Server...


d i
Vla
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://edvmr1p0:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain
"ODI-DOMAIN".
Warning: An insecure protocol was used to connect to the server. To ensure on-
the-wire security, the SSL port or Admin port should be used instead.
Shutting down the server AdminServer with force=false while connected to
AdminServer ...
Disconnected from weblogic server: AdminServer
Exiting WebLogic Scripting Tool.
Done
Stopping Derby Server...
Derbyserver stopped.
[oracle@hostname bin]$
8. Clean up the desktop by closing ODI Studio.
This completes Practice 20-2. This completes the practices for Lesson 20.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 50

You might also like