Вы находитесь на странице: 1из 512

Oracle Internal & Oracle Academy Use Only

Oracle Data Integrator 12c:


Integration and Administration
Activity Guide

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.

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

Oracle Internal & Oracle Academy Use Only


by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Trademark Notice

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

Author
Steve Friedberg

Technical Contributors and Reviewers


Phil Scott, Gerry Jurrens, Brent Dayley, Surendra Babu, Rick Green, Viktor Tchemodanov,
Julien Testut, Alex Kotopoulis, Alessandro Leite

This book was published using: Oracle Tutor


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

Oracle Internal & Oracle Academy Use Only


Practice 4-1: Working with Topology ..............................................................................................................4-3
Practices for Lesson 5: Setting Up a New ODI Project .................................................................................5-1
Practices for Lesson 5: Overview ...................................................................................................................5-2
Practice 5-1: Setting Up a New ODI Project...................................................................................................5-3
Practices for Lesson 6: Oracle Data Integrator Model Concepts.................................................................6-1
Practices for Lesson 6: Overview ...................................................................................................................6-2
Practice 6-1: Creating Models by Reverse-Engineering.................................................................................6-3
Practices for Lesson 7: Organizing ODI Models and Creating ODI Datastores ..........................................7-1
Practices for Lesson 7: Overview ...................................................................................................................7-2
Practice 7-1: Checking Data Quality in the Model ..........................................................................................7-3
Practices for Lesson 8: ODI Mapping Concepts ...........................................................................................8-1
Practices for Lesson 8: Overview ...................................................................................................................8-2
Practice 8-1: Creating ODI Mapping: Simple Transformations .......................................................................8-3
Practices for Lesson 9: Designing Mappings ................................................................................................9-1
Practices for Lesson 9: Overview ...................................................................................................................9-2
Practice 9-1: Creating ODI Mapping: Complex Transformations ...................................................................9-3
Practice 9-2: Creating ODI Mapping: Implementing Lookup ..........................................................................9-23
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
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

Oracle Internal & Oracle Academy Use Only


Practices for Lesson 18: Enforcing Data Quality with ODI ...........................................................................18-1
Practices for Lesson 18: Overview .................................................................................................................18-2
Practice 18-1: Enforcing Data Quality with ODI Mappings .............................................................................18-3
Practices for Lesson 19: Working with Changed Data Capture ...................................................................19-1
Practices for Lesson 19: Overview .................................................................................................................19-2
Practice 19-1: Implementing Changed Data Capture .....................................................................................19-3
Practices for Lesson 20: Advanced ODI Administration ..............................................................................20-1
Practices for Lesson 20: Overview .................................................................................................................20-2
Practice 20-1: Setting Up ODI Security ..........................................................................................................20-3
Practice 20-2: Integration with Enterprise Manager and Using ODI Console .................................................20-19

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

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


ii
Oracle Middleware Learning Stream
A New Innovative Continuous Learning Solution

Oracle Internal & Oracle Academy Use Only


Ideal for supplementing what you learned in the classroom

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


Oracle Middleware Learning Stream
Keep Your Skills Current through Continuous Learning

Oracle Internal & Oracle Academy Use Only


Expert Delivered
Hundreds of instructional videos delivered by Oracle
subject matter experts

Training Across Fusion Middleware


For professionals of all experience levels interested in
staying up-to-date

Continuously Refreshed Content


Covers product overviews through performance tips for
the broad range of Fusion Middleware products

Request Topics that Interest You

Sample Content Available for Viewing


NOW!
education.oracle.com/streams/middleware

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


Oracle Internal & Oracle Academy Use Only
Practices for Lesson 1:
Introduction to Integration
and Administration
Chapter 1

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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

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.

Oracle Internal & Oracle Academy Use Only


3. Reset the environment for your first practice.
Note: Each practice in this course has its own setup script that you run at the beginning of
the practice. If you need to restart a practice from the beginning, you can execute the setup
script again. To run the setup script, you have to be disconnected from ODI Studio.
a. If connected, disconnect from the ODI repository (select ODI > Disconnect).
Note: Alternatively, you can just close ODI Studio.

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

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

Oracle Internal & Oracle Academy Use Only


Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "DEV_ODI_REPO"."SNP_CONV_DT" 1.821 MB 36684 rows
. . imported "DEV_ODI_REPO"."SNP_MTXT" 692.3 KB 3449 rows
...many lines omitted for clarity...
. . imported "SALES_DEV"."TRG_CUSTOMER_H" 0 KB 0 rows
. . imported "SALES_DEV"."TRG_REGION" 0 KB 0 rows
. . imported "SALES_DEV"."TRG_SALES" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at Day Month 14
10:25:57 2014 elapsed 0 00:01:31
[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
Oracle Internal & Oracle Academy Use Only
b. Examine the Start page. Note the online tutorials, which you can do later, at your
leisure.

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.

Oracle Internal & Oracle Academy Use Only


You can close the Help panels after you look at them.
5. Connect to the ODI repository. In a later lab, you will make a new repository.
a. Click Connect To Repository. When prompted for Wallet Password, enter Welcome1.
All passwords are case-sensitive. Then click OK.

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 7
b. For Login Name, select DEV_ODI_REPO. Click OK.

Oracle Internal & Oracle Academy Use Only


Note: In this ODI setup, the repository, username SUPERVISOR, and password
Welcome1 are predefined for login.
c. On the Designer tab, expand the Projects and Models accordions. In Projects, select
JunkForDemo > HandsOn. Expand and view the infrastructure for your practices.

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 9
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 1: Introduction to Integration and Administration


Chapter 1 - Page 10
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 2:
Administering ODI
Repositories
Chapter 2

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


1. Start RCU:
a. Navigate to the directory $FMW_HOME/oracle_common/bin as shown below:
[oracle@hostname ~]$ cd $FMW_HOME/oracle_common/bin
[oracle@hostname bin]$ pwd
/u01/app/oracle/Middleware/Oracle_Home/oracle_common/bin
b. To start RCU, execute the following command:
[oracle@hostname bin]$ ./rcu
2. Use RCU to create ODI Master and Work repositories:
a. Click Next on the Welcome screen.

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.

Oracle Internal & Oracle Academy Use Only


c. On the Database Connection details screen, enter the following parameters:

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
Oracle Internal & Oracle Academy Use Only
Click Next.
Note: If the Warning window is displayed, click Ignore.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


f. In the Checking Prerequisites window, click OK.

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.

Oracle Internal & Oracle Academy Use Only


h. On the Custom Variables screen, enter the parameters provided in the table below.
Click Next.

Parameter Value

Supervisor Password Welcome1

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
Oracle Internal & Oracle Academy Use Only
i. On the Map Tablespaces screen, click Next.

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.

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


Note: This Create step takes several minutes.

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.

Oracle Internal & Oracle Academy Use Only


3. On ODI Studio, create the connection to your new Master and Work repositories.
a. Start ODI Studio. Click Connect to Repository. In the Enter Wallet Password window,
enter Welcome1. Click OK.
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
In the Oracle Data Integrator Login window, click New .

Oracle Internal & Oracle Academy Use Only


b. Configure the new ODI Master Login as shown in the table below.

Repository Connection Information

Parameter Value

Login Name ODI_REPO1

User SUPERVISOR

Password Welcome1

Database Connection (Master Repository)

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


Note: You click magnifying glass to select and then edit the JDBC URL. Also, click
magnifying glass to select Work repository Workrep 1, as shown below:

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.

b. Click the Topology tab. Expand the Repositories accordion bar. Under the Master

Oracle Internal & Oracle Academy Use Only


Repository node, expand Work Repositories. View your newly created Work repository
WORKREP1.

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
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 3: ODI
Topology Concepts
Chapter 3

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

Oracle Internal & Oracle Academy Use Only

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.

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

Oracle Internal & Oracle Academy Use Only


b. In the Terminal window, execute the following command:
./reset03.sh
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
Note: This process may take up to one minute.
[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset03.sh
YOU MUST BE LOGGED OFF OF ODI BEFORE RUNNING *************
Press [Enter] key to continue
(...many lines omitted for clarity...)
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
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

Oracle Internal & Oracle Academy Use Only


c. In the wizard, select “Create a new domain.” In the Domain Location path, change the
domain name to agent1. As a result, your Domain Location path should now be the
following (all on one line):
/u01/app/oracle/Middleware/Oracle_Home/user_projects/domains/agent1
Click Next.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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
− Host Name: localhost
− Port: 1521
− Schema Owner: DEV_STB
− Schema Password: Welcome1

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 18
r. Click Finish.

Oracle Internal & Oracle Academy Use Only


3. Start ODI Studio and connect to the ODI repository.
a. Double-click the ODI 12c Studio shortcut to start ODI.

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
c. Select DEV_ODI_REPO in the Login Name field. Enter Welcome1 as the password.

Oracle Internal & Oracle Academy Use Only


4. Create a new ODI agent.
a. In ODI Studio, click the Topology tab. Expand the Physical Architecture accordion and
then expand the Agents node. Note that no agents have been created in ODI.
Right-click the Agents node and select New Agent.

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.

Oracle Internal & Oracle Academy Use Only


Leave this tab open for the moment.
c. In the Terminal window, execute the following command to change directory:
[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]$
d. Execute the following command:
[oracle@hostname bin]$ ./agent.sh -NAME=OracleDIAgent1
Note: Ignore any notification and warning messages.

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'
*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'

Oracle Internal & Oracle Academy Use Only


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.

f. Go back to Topology > Physical Architecture > Agents > OracleDIAgent1 and right-
click and select Test; alternatively, go to the open OracleDIAgent1 tab and click
Test to test the connection to your agent. Verify that the connection is successful and
then click OK. Close the OracleDIAgent1 tab.

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 22
Oracle Internal & Oracle Academy Use Only
Even though the Physical Agent tests correctly, you still need to make a logical agent.
That is in the next lab.
5. Stop your standalone agent.
a. Open a new Terminal window (or new tab within the other terminal window) and
execute the command to change directory:
[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]$
b. Stop the OracleDIAgent1 standalone agent:
[oracle@hostname bin]$ ./agentstop.sh -NAME=OracleDIAgent1
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
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 3: ODI Topology Concepts


Chapter 3 - Page 24
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 4:
Describing the Physical and
Logical Architecture
Chapter 4

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


ODI_TEMP Schema that is used to store ODI temporary objects (not used in
this practice)
Both the SALES_DEV and SALES_PROD physical schemas contain identical table structures and
correspond to the same logical schema called ORACLE_ORCL_LOCAL_SALES. The mapping for
this logical schema depends on the context.
Note: Completing these tasks is critical for all subsequent practice sessions.

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.

b. Start the Terminal window and execute the following command to change the directory:
cd /home/oracle/labs

Oracle Internal & Oracle Academy Use Only


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$
c. Execute the command to reset your environment to Practice 4:
./reset04.sh
2. Connect to the ODI repository.
a. If it is not already started, start ODI Studio.
b. Click Connect To Repository. When prompted for Wallet Password, enter Welcome1.
Then 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 4
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.

Oracle Internal & Oracle Academy Use Only


3. Create a new context:
a. Click the Topology tab, and then click the Contexts accordion bar to expand it.

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.

Oracle Internal & Oracle Academy Use Only


d. Create another new context, repeating the operations:
− Name: Development
− Code: DEVELOPMENT (filled in automatically in uppercase)
− Password: Leave this field empty.
− Default: Select this check box.

Click Yes to confirm in the Confirmation window. Click Save All .

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:

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

Oracle Internal & Oracle Academy Use Only


select the Oracle node, and then right-click and select New Data Server.

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


d. Click Search to the right of the JDBC URL field. In the URL examples window,
select the first URL in the Name list, and 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 9
e. Edit the JDBC URL to match the following:
jdbc:oracle:thin:@localhost:1521:orcl
The JDBC tab should now appear as follows:

Oracle Internal & Oracle Academy Use Only


5. Test this data server:
a. Click Test Connection. In the Confirmation dialog box, click Yes to confirm saving
your data before testing the connection. In the Information window, click OK. In the
Test Connection dialog box, click Test.

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
a. Expand the Oracle node. Right-click the newly created data server
ORACLE_ORCL_LOCAL, and then select New Physical Schema.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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

Oracle Internal & Oracle Academy Use Only


b. In the Physical Schema panel, select SALES_PROD from the Schema (Schema) drop-
down list, and then select ODI_TEMP from the Schema (Work Schema) drop-down
list. Confirm that the Default check box is not selected, and leave all the other fields
unchanged. Click Save . In the Information window, 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 13
8. Create a logical schema, ORACLE_ORCL_LOCAL_SALES, and map this schema to different

Oracle Internal & Oracle Academy Use Only


physical schemas, for the different contexts.
− Development Context: To ORACLE_ORCL_LOCAL.SALES_DEV physical schema
− Global Context: To ORACLE_ORCL_LOCAL.SALES_DEV physical schema
− Production Context: To ORACLE_ORCL_LOCAL.SALES_PROD physical schema
a. In Topology Navigator, select the Logical Architecture tab and expand the
Technologies node. Select Oracle, right-click and select New Logical Schema.

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.

Oracle Internal & Oracle Academy Use Only


9. The logical schema FILE_DEMO_SRC is predefined for you and is mapped in the
predefined Global context to a physical schema that represents a subfolder in a file system.
Map FILE_DEMO_SRC to the same physical schemas in the new Development and
Production contexts that you defined earlier.
a. In the Logical Architecture, expand the File node, and double-click the
FILE_DEMO_SRC logical schema. Ensure that the logical schema FILE_DEMO_SRC is
mapped to the physical schema
FILE_GENERIC./home/oracle/labs/files/flat_files
in the Development, Global, and Production contexts, as follows. Click Save.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 15
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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


Close any remaining open tabs. Save your work if prompted to do so.

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 18
Oracle Internal & Oracle Academy Use Only
b. Restart the agent in a terminal window.
[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.

Oracle Internal & Oracle Academy Use Only


d. To kill the agent in the terminal window, press Ctrl + C. There are more graceful ways
to stop the agent, but this is fine for the lab.
e. Exit ODI Studio.
This completes Practice 4-1. This completes the practices for Lesson 4.

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

Practices for Lesson 4: Describing the Physical and Logical Architecture


Chapter 4 - Page 20
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 5:
Setting Up a New ODI Project
Chapter 5

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


b. In the Terminal window, execute the following commands:
[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset05.sh
When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
Note: This process may take up to one minute.
2. Connect to the ODI repository.
a. If necessary, restart ODI Studio from the desktop.
b. Click “Connect To Repository.” When prompted for Wallet Password, enter Welcome1.
Then click OK.

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 3
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.

Oracle Internal & Oracle Academy Use Only


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

a. On the Designer tab, click the Projects bar, click New Project , and then select
New Project.

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.

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.

Oracle Internal & Oracle Academy Use Only


4. Import the Knowledge Modules that are required for working with the following technologies:
• Sources:
− MySQL
− XML
− File
• Targets:
− 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.

Oracle Internal & Oracle Academy Use Only


b. The Import Knowledge Modules (XML File) window appears. In the File Import
directory field, navigate to the folder xml-reference located at:
/u01/app/oracle/Middleware/Oracle_Home/odi/sdk/xml-reference

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 6
Oracle Internal & Oracle Academy Use Only

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
− IKM SQL Control Append
− LKM File to SQL
− LKM SQL to Oracle

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 8
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 9
Oracle Internal & Oracle Academy Use Only
d. Review the Import Report, and then click Close.

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:

Oracle Internal & Oracle Academy Use Only


5. Look at Global Knowledge Modules. Global Knowledge Modules enable you to share
specific knowledge modules across multiple projects. A best practice is to import as Global
Knowledge Modules those KMs that will be frequently used by multiple projects.
− One benefit is that you only need to import the Knowledge Module once, rather than
import it into each project using it.
− Another benefit is that if you need to modify the Knowledge Module, the modification
will propagate to all projects using the Knowledge Module.
a. In the Designer Navigator, expand the Global Objects tab.

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.

Oracle Internal & Oracle Academy Use Only


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

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.

Oracle Internal & Oracle Academy Use Only


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

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

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 5: Setting Up a New ODI Project


Chapter 5 - Page 14
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 6:
Oracle Data Integrator Model
Concepts
Chapter 6

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.

Oracle Internal & Oracle Academy Use Only

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
structure of an XML file to a Geographic Information model that you define.

Oracle Internal & Oracle Academy Use Only

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

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


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset06.sh

Oracle Internal & Oracle Academy Use Only


When prompted, verify that you disconnected from the ODI repository, and then press
Enter. Wait until this script completely executes.
Note: This process may take up to one minute.
2. Connect to the ODI repository.
a. If necessary, restart ODI Studio from the desktop.
b. Click “Connect To Repository.” When prompted for Wallet Password, enter Welcome1.
Then click OK.

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.

3. Create a model for the Oracle schema.

Oracle Internal & Oracle Academy Use Only


a. In the Designer Navigator, click the Models bar.
b. Click the New Model icon and then select New Model.

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


• Name: Oracle Sales Application
• Code: ORACLE_SALES_APPLICATION (entered automatically in upper case)
• Technology: Oracle
• 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:

Oracle Internal & Oracle Academy Use Only


d. Click the Reverse Engineer tab (make sure it is the tab, not the button), and select (or
simply confirm) Development from the Context drop-down list. Click Save.

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.

Oracle Internal & Oracle Academy Use Only


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

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.

Oracle Internal & Oracle Academy Use Only


Check that the columns and constraints that were reverse-engineered for the
TRG_CUSTOMER table correspond to its data definition language (DDL) given below.

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

Oracle Internal & Oracle Academy Use Only


upd_date DATE,
CONSTRAINT pk_trg_customer PRIMARY KEY (cust_id),
CONSTRAINT fk_cust_city FOREIGN KEY (city_id)
REFERENCES trg_city (city_id));
Note: The constraint called FK_SALES_CUST TRG_SALES is defined on another table.
Because it references TRG_CUSTOMER, it also appears here.
d. Close the Oracle Sales Applications tab and model.
5. Create a model for an XML file.

a. Click the New Model icon and then select New Model.

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)
The Definition tab should appear as below. Click the Reverse Engineer tab.

Oracle Internal & Oracle Academy Use Only


c. Select (or simply confirm) Development from the Context drop-down list. Click Save.

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.

Oracle Internal & Oracle Academy Use Only


Note: The progress of the reverse-engineering process is shown on the status bar.
b. Verify that the model reverse-engineered successfully. In the tree view, expand the
Geographic Information model. The datastores of the model appear.

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

Oracle Internal & Oracle Academy Use Only


c. The file structure appears as shown here:

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.

Oracle Internal & Oracle Academy Use Only


The hierarchy of the XML file is reproduced here. The XML file has been mapped to a
relational structure, with foreign keys to map the links between the different levels of
hierarchy.
9. Clean up the desktop.
a. Close the XML Browser (Firefox).
b. Close the Geographic Information model tab.
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
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 6: Oracle Data Integrator Model Concepts


Chapter 6 - Page 14
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 7:
Organizing ODI Models and
Creating ODI Datastores
Chapter 7

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only

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

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 Internal & Oracle Academy Use Only


[oracle@hostname ~]$ cd ~/labs
[oracle@hostname labs]$ ./reset07.sh
Note: This process may take one minute or more to complete.
c. Restart ODI Studio from the desktop.
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.
2. Create a new model, MySQL_ORDERS_APPLICATION_1, as a duplicate of the model MySQL
Orders Application.
a. In Designer, open the Models bar. Right-click the MySQL Orders Application
model and select Duplicate Selection to duplicate the datastore. Click Yes.

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

Oracle Internal & Oracle Academy Use Only


c. If you receive a warning message, click Yes to finish saving. Close the tab.

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.

Oracle Internal & Oracle Academy Use Only


b. Right-click the Constraints node, and select the New Reference option.

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.

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.

Oracle Internal & Oracle Academy Use Only


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

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.

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

Oracle Internal & Oracle Academy Use Only


5. Run a static check on the MySQL_Orders_Application1 model.
a. Open the MySQL_Orders_Application1 model and click the Control tab.

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.

Oracle Internal & Oracle Academy Use Only


6. Run a check against the model.
a. Select the MySQL_Orders_Application1 model in the tree view, right-click, and
select Control > Check.

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.

Oracle Internal & Oracle Academy Use Only


c. Click OK when the Information dialog box notifies you that the session has started.

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


9. Clean up the desktop.
a. Close the Errors tab.
b. Close ODI Studio.
This completes Practice 7-1. This completes the practices for Lesson 7.

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
Oracle Internal & Oracle Academy Use Only

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
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 8: ODI
Mapping Concepts
Chapter 8

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


the SRC_REGION table from the MySQL Orders Application model. This simple mapping has no
transformations.
The second mapping, MAP_8-2, is a duplicate of MAP_8-1, to which flow control is activated
and constraints in the target table are checked.
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
model. In this mapping, flow control is activated, constraints in the target table are checked, and
city population values are transformed from individual to times 1,000.
Note: Completing this practice is critical for other practice sessions.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create a mapping called MAP_8-1, loading the TRG_COUNTRY 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 you take only distinct records.
a. In Designer, click the Projects tab, and expand the HandsOnLoads project. Expand
the HandsOn folder. Select the Mappings node, right-click, and select the New
Mapping option.

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.

Oracle Internal & Oracle Academy Use Only


c. Click the Logical tab. Arrange the panels so that you can see the Properties MAP_8-1
panel and fields. You may want to not view the thumbnails at this time.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


f. There may be multiple regions per country. If you mapped SRC_REGIONS directly to
TRG_COUNTRY, you would get duplicates. To prevent duplicates, drag a Distinct
component in between the two models.

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

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


And also delete DISTINCT.REGION. You should be left with this:

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


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

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:

Oracle Internal & Oracle Academy Use Only


The warning about Drop work table can be safely ignored.
e. In your mapping window, click the Logical tab. Right-click TRG_COUNTRY, and then
select Data.

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.

Oracle Internal & Oracle Academy Use Only


Verify your data and close this window. Close MAP_8-1 tab. If the Unlocking Object
window appears, select the “Don’t show this window next time” check box and click
Yes.

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. Click Perform Layout to realign the view of the modeling zone.

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.

Oracle Internal & Oracle Academy Use Only


e. Confirm the Delete by clicking Yes.

f. Select and delete the connector from SRC_REGION to DISTINCT. Deselect “Preserve
downstream expressions.”

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.

Oracle Internal & Oracle Academy Use Only


h. Connect everything together for the proper flow.
1) Connect the right side of SRC_REGION to the left side of DISTINCT. Click OK to
accept the default Attribute matching.

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.

Oracle Internal & Oracle Academy Use Only


3) It should now look like this:

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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

Oracle Internal & Oracle Academy Use Only


m. Click Save to save your mapping.
5. Run this mapping, and check the contents of the TRG_REGION table.
a. Click Run.

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:

Oracle Internal & Oracle Academy Use Only


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

Copyright © 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.

Oracle Internal & Oracle Academy Use Only


6. Create a mapping called MAP_8-3 that loads the TRG_CITY datastore in the Oracle Sales
Application model with the contents of the SRC_CITY table from the MySQL Orders
Application model. Ensure that flow control is activated and all constraints in the target table
are checked. You need to transform the city population values because the target table unit
is “thousands of inhabitants,” whereas the source table unit is “inhabitants.”
a. If not open, click the Designer tab, and click the Projects bar. Expand HandsOnLoads
> HandsOn folder. Right-click the Mappings node and select New Mapping.

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.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


e. Connect SRC_CITY to TRG_CITY. (Because they are the same number, names, and
types of columns, you do not need a Distinct component.)

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.

Oracle Internal & Oracle Academy Use Only


Note: All of the arrows are grey, none of the arrows are white, and all fields mapped
even though the column order was different.
g. Select the POPULATION column in the target TRG_CITY datastore.

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.

Oracle Internal & Oracle Academy Use Only


i. To verify the mapping (and the transformation expression), click Validate the Mapping
. Close the Validation Results window.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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

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 .

Oracle Internal & Oracle Academy Use Only


d. If you look at some of the “Drop xxxx table” warnings, they are present because the
temporary work table was not there to be dropped, because by default ODI cleaned up
after itself in the past before this particular run. There are numerous ways of dealing
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.

Oracle Internal & Oracle Academy Use Only

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
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 8: ODI Mapping Concepts


Chapter 8 - Page 36
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 9:
Designing Mappings
Chapter 9

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,
perform execution simulation, and run the newly created mapping.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


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.
Create mapping MAP_9-1

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

Oracle Internal & Oracle Academy Use Only


b. Make sure the Properties panel is visible at the same time as the Logical model zone.

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.

Oracle Internal & Oracle Academy Use Only


d. In the Design navigator Models bar, expand the FLAT_FILE_SRC model. Drag the
SRC_SALES_PERSON datastore to the left side of the model zone of your diagram.

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.

Oracle Internal & Oracle Academy Use Only


f. In the Design navigator Models bar, expand the MySQL Orders Application model
and drag the SRC_CUSTOMER datastore to the model zone of your diagram, under the
SRC_SALES_PERSON datastore. Your diagram should resemble the following:

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.

Oracle Internal & Oracle Academy Use Only


h. In the diagram, drag the CUSTID column from the SRC_CUSTOMER source to the
workbench (the white background). A Filter component appears for the CUSTID
column.

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


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)

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.
Note: In ODI Operator Navigator, you may need to click the Refresh icon .

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


Scroll right and make sure the CRE_DATE and SALES_PERS columns got updated.

d. Close this data window, and then close your mapping.


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.

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.

Oracle Internal & Oracle Academy Use Only


Your Tasks
1. Create an ODI mapping with a new lookup.
a. In the Designer, duplicate mapping MAP_9-1.

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.

Oracle Internal & Oracle Academy Use Only


c. On the Logical tab, click Perform Layout to arrange the datastores in the diagram.

Drag a Lookup component to the diagram.

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

Oracle Internal & Oracle Academy Use Only


e. From Designer > Models > FLAT_FILE_SRC, drag the SRC_AGE_GROUP datastore to
the diagram.

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.

Oracle Internal & Oracle Academy Use Only

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
OUTPUT1 = JOIN_INPUT2

Oracle Internal & Oracle Academy Use Only


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

Oracle Internal & Oracle Academy Use Only


j. Click Perform Layout , the mapping may now look more similar to this:

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


p. On the Designer Projects tab, select MAP_9-2, and then click the icon to execute
your mapping. Select the Simulation check box, and then click OK.

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.

Oracle Internal & Oracle Academy Use Only


2. Run the MAP_9-2 mapping and view the lookup data.
a. Click Run again to run your mapping . Click OK. Click OK again.
Note: Do not select the Simulation check box.

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.

Oracle Internal & Oracle Academy Use Only


c. Double-click step 140, which performs a lookup operation on the source flat file
SRC_AGE_GROUP (Load data), and then click the Code tab. View the code on the
source and on the target.

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.

Oracle Internal & Oracle Academy Use Only


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
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 10:
Mappings: Monitoring and
Troubleshooting
Chapter 10

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


In this practice, you perform the following 10 steps:
1. In Topology Navigator, define the
FILE_GENERIC./home/oracle/labs/files/my_flat_files physical schema.
2. In Topology Navigator, define the FLAT_FILES_SRC logical schema.
3. In Designer Navigator, create the Export-FF-RT project.
4. In Designer Navigator, create the Flat_File_1 source model.
a. Create the SRC_SALES_PERSON datastore.
b. Point to the resource:
/home/oracle/labs/files/my_flat_files/SRC_SALES_PERSON.TXT.
c. Reverse-engineer and format the data (fixed length positions, data types).
5. In SQL Developer, create the RDBMS schema ODI_STAGE to host the ODI target
datastore.
6. In SQL Developer, create the TRG_SALES_PERSON table to serve as the ODI datastore for
the target model.
7. In Topology Navigator, create the ODI target data server, ODI_STAGE; physical schema
ODI_STAGE; and logical schema ODI_STAGE.
8. In Designer Navigator, create the ODI target model, Oracle_RDBMS1.
9. Reverse-engineer the model and check the populated TRG_SALES_PERSON datastore
table.
10. Create a new ODI 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.
[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.

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create a new physical schema for the source flat-file model.
a. Click Topology navigator. In Topology navigator, click the Physical Architecture bar
and expand Technologies > File. Right-click FILE_GENERIC and select New
Physical Schema.

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
that no context has been specified for this schema, click OK. Close the editing window
for your new physical schema.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


d. Open Logical Architecture, navigate to Technologies > File, right-click File, and
select New Logical Schema.

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.

f. Verify that your new Logical schema was added under the File node in the
Technologies tree view.

Oracle Internal & Oracle Academy Use Only


3. Create the new project in ODI.
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.

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

Oracle Internal & Oracle Academy Use Only


the New Model option to insert a new model.

b. On the screen that follows, enter the values provided in the following table. Click the
Reverse Engineer tab. Set the Context to Development. Click the Save icon.
Parameter Value

Name Flat_File_1
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
Oracle Internal & Oracle Academy Use Only
5. Create a new ODI source datastore.
a. Right-click the newly created Flat_File_1 model, and then select New Datastore.

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.

Oracle Internal & Oracle Academy Use Only


c. Click the Files tab. Set the File Format to Fixed, and then click the Attributes tab.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


f. After the columns are marked, click each column data to select a column, and then set
the name and data type for each column in the Definition panel to the right, as shown
in the following screens. For the names and data types of each column, refer to this
table. Click OK when you have finished.
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
Oracle Internal & Oracle Academy Use Only
Click OK when you have finished.
g. The columns should look like the following. Click Save to save the model. If the
Unlocking Object window appears, select the check box and click OK. Expand
Flat_File_1 > SRC_SALES_PERSON > 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
Oracle Internal & Oracle Academy Use Only
h. In the Flat_File_1 model, right-click the SRC_SALES_PERSON datastore, and then
select View Data. Close all tabs as shown next.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 14
Oracle Internal & Oracle Academy Use Only
6. You must create a schema to host the ODI target datastore. To create a new RDBMS
schema for the ODI datastore, perform the following steps:
a. Open the Oracle SQL Developer window (or sqlplus / as sysdba). You will
create the schema by executing the following SQL commands:
create user <MY_SCHEMA> identified by <MY_PASSWD>
default tablespace <MY_TBS> temporary tablespace <MY_TEMP>;
Note: If it is not already started, you need to start SQL Developer and open the
Administrator connection (Username: system, Password: Welcome1). Refer to
Practice 2-1.
In this command:
• <MY_SCHEMA> corresponds to the name of the schema that you want to create:
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
b. Grant connect privileges to the newly created user account by executing the following
SQL command:

Oracle Internal & Oracle Academy Use Only


grant connect, resource, create trigger, create view, unlimited
tablespace to ODI_STAGE;

7. Now you need to create a new ODI datastore for the target model. This datastore will be
used within the ODI Mapping. To create a new ODI target datastore, perform the following
steps:
a. In SQL Developer, create a new connection called ODI_STAGE. Enter the username as
ODI_STAGE with the password ODI_STAGE. For SID, enter orcl. Click Test to verify
the connection. Click 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,
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)
)

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


b. Expand Technologies, right-click Oracle, and select New Data Server.

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

Instance/dblink (Data Server) orcl

User ODI_STAGE

Password (case sensitive) ODI_STAGE

Oracle Internal & Oracle Academy Use Only


d. Click for JDBC Driver. Select Oracle JDBC Driver. Click OK. Click for JDBC
Url, select jdbc:oracle:thin:@<host>:<port>:<sid>, and then click OK. Edit the URL
to read: jdbc:oracle:thin:@localhost:1521:orcl for Oracle Database.

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.

Oracle Internal & Oracle Academy Use Only


e. Click Test Connection. In the window that opens, click Yes to save your data. In the
Information window, click OK. Click Test to verify a successful connection. Click OK.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 20
f. On the Physical Architecture tab, expand Oracle technology node, right-click
ODI_STAGE data server, and then select New Physical Schema.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


h. In Topology Navigator, open the Logical Architecture tab and expand Technologies.
Right-click Oracle technology and then select New Logical Schema.

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.

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:

Oracle Internal & Oracle Academy Use Only


a. Open ODI Designer. Click the Models bar and select New Model. On the panel that
appears, enter the Definition values provided in the following table. Click the Reverse
Engineer tab (make sure it is the tab, not the button).

Parameter Value

Name Oracle_RDBMS1

Technology Oracle

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
Oracle Internal & Oracle Academy Use Only
b. On the Reverse Engineer tab, ensure that Context is set to Development. Click Save
and then close the Oracle_RDBMS1 tab.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


b. On the screen that follows, enter the mapping name as MAP-EXP-FF-RT. Click OK.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


f. Select the FIRST_NAME column in Target Datastore and edit the mapping to read:
LTRIM(SRC.FIRST_NAME). This function removes left spaces in the FIRST_NAME
column. In Execute on Hint, select Staging. Repeat this step for columns LAST_NAME
and DATE_HIRED. Refer to the mapping implementation provided in the following
table.
Column Mapping implementation

FIRST NAME LTRIM(SRC.FIRST_NAME)


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
Oracle Internal & Oracle Academy Use Only
Click Save.
g. For this mapping, you export a flat file directly to a relational table target. The
knowledge modules required for this mapping are LKM File to SQL and IKM SQL
Incremental Update. To import the KMs, click the Designer Navigator’s Projects tab in
the left panel. In the Export-FF-RT project, expand the Knowledge Modules folder.
Right-click Loading (LKM) and select Import Knowledge Modules.

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 31
Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


n. Double-click step 50. View the number of rows inserted into the target table (16).Then
close the Session Task window.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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

Oracle Internal & Oracle Academy Use Only


b. In the Expression Editor, edit the expression to read:
INITCAP(LTRIM(SRC.FIRST_NAME)). Click OK.

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.

Oracle Internal & Oracle Academy Use Only


b. Open ODI Operator and verify that the mapping executed successfully. Open step 110
– Insert flow into I$ table. Click the Code tab, and view your modifications.

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.

Oracle Internal & Oracle Academy Use Only


14. Clean up the desktop by closing ODI Studio.
This completes Practice 10-1. This completes the practices for Lesson 10.

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 41
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 10: Mappings: Monitoring and Troubleshooting


Chapter 10 - Page 42
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 11:
Designing Mappings:
Advanced Topics 1
Chapter 11

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


table by using the new native sequence to generate ID numbers for that table.

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

Oracle Internal & Oracle Academy Use Only

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.

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


3. Create a new Native Sequence in ODI.
a. Open Designer. Click the Projects tab and expand HandsOnLoads > HandsOn. Right-
click Sequences, and then select New Sequence.

Copyright © 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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 8
Oracle Internal & Oracle Academy Use Only
4. Create a new mapping to load the Product Family table by using the Native Sequence.
a. In Designer > Projects > HandsOnLoads > HandsOn, right-click Mappings, and select
New Mapping. Enter the new mapping name, MAP_11-1. Click OK.

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.

Oracle Internal & Oracle Academy Use Only


c. Drag FAMILY_NAME from SRC_PRODUCT to Distinct.

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.

Oracle Internal & Oracle Academy Use Only


You should now have grey arrows on FAMILY_NAME.

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

Oracle Internal & Oracle Academy Use Only


f. Expand ODI Objects > Project Sequences > SEQ_FAMILY_ID, and then drag
NEXTVAL to the Expression area. Click OK.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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
Oracle Internal & Oracle Academy Use Only
b. In Designer > Models, right-click TRG_PROD_FAMILY, and then select View Data.
Verify the data inserted in the table. Close the Data window and MAP_11-1 tab.

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

Oracle Internal & Oracle Academy Use Only


First, you create a new ODI mapping, MAP_11-2, to load data into the TRG_PRODUCT target
datastore table in the Oracle Sales Application model. You specify the source tables as
SRC_PRODUCT from the MySQL Orders Application model and TRG_PROD_FAMILY from the
Oracle Sales Application model.
TRG_PROD_FAMILY will be used as a lookup table to obtain the ID number generated by the
previous lesson’s mapping that used a sequence to populate the ID number.
For the lookup, you create a temporary index to join SRC_PRODUCT and TRG_PROD_FAMILY on
their FAMILY_NAME column.
Finally, you execute the mapping, view the source code, and examine the inserted rows in the
TRG_PRODUCT target datastore.

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.

Oracle Internal & Oracle Academy Use Only


b. In the Models tab, expand the Oracle Sales Application and MySQL Orders Application
models. Drag the TRG_PRODUCT datastore from the Oracle Sales Application model to
the right in the mapping area. Drag the TRG_PROD_FAMILY datastore from the Oracle
Sales Application to the left in the mapping area. Drag the SRC_PRODUCT datastore
from the MySQL Orders Application model to the left in the mapping area, as shown in
the following screenshot. Drag a Join component to the middle of the mapping area.

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.

Oracle Internal & Oracle Academy Use Only


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
Oracle Internal & Oracle Academy Use Only
d. Select TRG_PRODUCT, and in Properties > Target > Integration Type, set it to
Incremental Update.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. Double-click the fourth step, “60 - Create Temp. Indexes On Work”. In the Session
Task, select the Code tab. View the Target Code.

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.

Oracle Internal & Oracle Academy Use Only


e. In Designer Navigator > Models > Oracle Sales Application, right-click TRG_PRODUCT,
and then select View Data to view the 15 inserted rows. Close the Data window and
the tabs.

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

Oracle Internal & Oracle Academy Use Only


Now, you create a new set, which is the union of source and target bulk customers’ datastore
from the Oracle Sales Application model.
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.
Next, you perform an execution simulation to preview the code that will be used for this new
data set with the UNION operator.
Finally, you execute the mapping and verify the rows inserted into the target table.
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 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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. Select the arrow between Join and TRG_CUSTOMER, and delete it. Preserve
downstream expressions.

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:

Oracle Internal & Oracle Academy Use Only


d. Connect TRG_BULK_CUSTOMER to the left (Input1) of SET. Accept the defaults on
Attribute Matching.

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.

Oracle Internal & Oracle Academy Use Only


e. 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).

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.

Oracle Internal & Oracle Academy Use Only


f. 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
into SET.
(This is a long task, in five steps.)

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,

Oracle Internal & Oracle Academy Use Only


and paste into the SET CUST_ID INPUT2 expression.

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,

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only

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,

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only

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,

Oracle Internal & Oracle Academy Use Only


and paste into the SET CRE_DATE INPUT2 expression.

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,

Oracle Internal & Oracle Academy Use Only


and paste into the SET UPD_DATE INPUT2 expression.

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 43
Oracle Internal & Oracle Academy Use Only
2. Execute mapping MAP_11-3 (but this time do not select the Simulation check box) and
verify the execution results.
a. Execute mapping MAP_11-3.

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.

Oracle Internal & Oracle Academy Use Only


3. Clean up the desktop by closing ODI Studio.
This completes Practice 11-3. This completes the practices for Lesson 11.

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 45
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 11: Designing Mappings: Advanced Topics 1


Chapter 11 - Page 46
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 12:
Designing Mappings:
Advanced Topics 2
Chapter 12

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


• Use datastores SRC_ORDERS and SRC_ORDER_LINES from the MySQL_SRC model,
joined on ORDER_ID.
• Use SRC_CUSTOMER as a lookup table.
• Create a temporary target table.
• Aggregate some of its columns by using the MIN, MAX, and AVG functions.
2. Create mapping MAP_12-1.
• Use the reusable mapping REU_12-1 as a source.
• Use the datastore TRG_SALES as the target.
3. Execute MAP_12-1 and examine the rows inserted into TRG_SALES.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create an ODI reusable mapping.
a. In the Projects tab, expand: HandsOnLoads > HandsOn. Right-click Reusable
Mappings, and select New Reusable Mapping. Name the new mapping REU_12-1.
Select Create Default Output Signature. Click OK.

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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
unfreeze the content of the panel.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 7
Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


BUG: While you would normally want to select Multiple Match Rows=Error as shown
above, just checking for it will cause it to fail. The work-around is to select Multiple
Match Rows=All Rows as shown in the following screenshot:

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.
Right-click the connector line from Lookup to AGGREGATE, and click Redo Attribute
Matching.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


g. Select the following fields together by using the Ctrl key: LORDER_ID, ORDER_ID_1,
STATUS, CUSTID, DEAR, FIRST_NAME, ADDRESS, CITY_ID, PHONE, AGE, and
SALES_PERS_ID. Press the Delete key. Confirm by clicking Yes.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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
SUM_AMOUNT Staging Area
AVG_AMOUNT Staging Area
CUST_ID Source
CUST_NAME Source
FIRST_ORDER_DATE Staging Area
FIRST_ORDER_ID Staging Area

Oracle Internal & Oracle Academy Use Only


LAST_ORDER_DATE Staging Area
LAST_ORDER_ID Staging Area
PRODUCT_ID Source
QTY Staging Area

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.

Oracle Internal & Oracle Academy Use Only

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:

Oracle Internal & Oracle Academy Use Only


3. Create a new mapping, which uses the newly created temporary mapping as a source.
a. In the HandsOnLoads project, create a new ODI mapping, MAP_12-1, as shown here.

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 25
Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

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.

Oracle Internal & Oracle Academy Use Only


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
module that you just created, IKM Oracle UI - Audit.
Finally, you execute mapping MAP-EXP-FF-RT and examine the audit records inserted into the
audit table created by your knowledge module.

Your Tasks
1. Create the new knowledge module with new functionality to create an audit table and insert
audit records.
a. If necessary, restart ODI Studio.
b. If necessary, connect to the Repository using the same wallet password of Welcome1
as you have in the past.
c. 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 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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


f. On the Tasks screen, review the commands in the current KM. Select Insert new rows
and then click the Add icon to add the new command.

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
(
<%=odiRef.getColList("", "[COL_NAME]\t[DEST_CRE_DT]NULL",
",\n\t", "", "PK")%>,
AUDIT_DATE DATE,
AUDIT_INDICATOR VARCHAR2(1)
)

Oracle Internal & Oracle Academy Use Only

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 .

Oracle Internal & Oracle Academy Use Only


Similarly, create the command that inserts audit records in the audit table, as shown in
the screen. Name this command Insert Audit Records. Select the Ignore Errors
check box. On the Command on Target tab, set the Technology to Oracle. Enter the
command provided below.
Note: You can find this command in the lab12.txt file, provided in ~/labs.
Insert into <%=odiRef.getTable("L", "TARG_NAME", "A")%>_H
(
<%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "", "PK")%>,
AUDIT_DATE,
AUDIT_INDICATOR
)
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
Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


2. You will create a modified copy of the mapping MAP-EXP-FF-RT, to execute with your
newly created knowledge module. You will need to duplicate the existing mapping, rename
it, and then change the IKM entry to use your new IKM Oracle UI-Audit.
a. On the Projects tab, right-click the mapping MAP-EXP-FF-RT and select Duplicate
Selection. Click Yes on the Confirmation screen.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 47
Oracle Internal & Oracle Academy Use Only

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
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)

Oracle Internal & Oracle Academy Use Only


AUDIT_DATE DATE
AUDIT_INDICATOR VARCHAR2(1)

SQL> select * from TRG_SALES_PERSON_H;


SALES_PERSON_ID AUDIT_DAT A
--------------- --------- -
31 18-FEB-14 I
32 18-FEB-14 I
40 18-FEB-14 I
41 18-FEB-14 I
42 18-FEB-14 I
50 18-FEB-14 I
51 18-FEB-14 I
52 18-FEB-14 I

8 rows selected.

SQL> exit

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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 .

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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 .

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


4. Clean up the desktop by closing ODI Studio.
This completes Practice 12-2. This completes the practices for Lesson 12.

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

Practices for Lesson 12: Designing Mappings: Advanced Topics 2


Chapter 12 - Page 56
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 13:
Using ODI Procedures
Chapter 13

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.

Oracle Internal & Oracle Academy Use Only

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.

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.

Oracle Internal & Oracle Academy Use Only


You create the Procedure-CRT-TBL project and then the PRD-create-populate-table
procedure.
Next, you add commands to drop, create, and populate a table, by using the syntax provided in
text files.
Finally, you execute the procedure and verify that the table was created and populated with
records.
1. Create the Procedure-CRT-TBL project.
2. Create the PRD-create-populate-table procedure.
3. Add commands to drop, create, and populate a table.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create the new project in ODI Designer.
a. Switch to the Designer Navigator. Click the Designer tab. Select the Projects tab, click
New Project , and select New Project.

b. Enter the name of the project: Procedure-CRT-TBL. Click Save to create the project
and close the tab. The project appears in the tree view. Expand the Procedure-CRT-
TBL project node.

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.

Oracle Internal & Oracle Academy Use Only


d. Open ODI Designer. In the Projects tab, select Procedure-CRT-TBL > First Folder.
Right-click Procedures and select New Procedure.

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.

Oracle Internal & Oracle Academy Use Only


f. Click the Tasks tab. Click Add to add a step in the procedure.

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

Oracle Internal & Oracle Academy Use Only

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
Name Create Table
Technology Oracle
Schema ODI_STAGE
Ignore Errors Unchecked
CREATE table SRC_SALES_PERSON (
SALES_PERSON_ID NUMBER(8,0) NOT NULL,

Oracle Internal & Oracle Academy Use Only


FIRST_NAME VARCHAR2(80),
LAST_NAME VARCHAR2(80),
DATE_HIRED VARCHAR2(80),
DATE_UPDATED DATE NOT NULL,
constraint SRC_SALES_PERSON_PK primary
key(SALES_PERSON_ID)
)
Notice the SQL command does not end with a semicolon.

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 8
Oracle Internal & Oracle Academy Use Only
If it bothers you that you cannot see the whole command at one time, you can always
start the Command Advanced Editor (the gear) to see the whole thing.

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

Oracle Internal & Oracle Academy Use Only


begin
insert into ODI_STAGE.SRC_SALES_PERSON values (11,'Andrew', 'Andersen',
'1999/02/22',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (12,'John', 'Galagers',
'2000/04/20',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (13,'Jeffrey','Jeferson',
'32422',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (20,'Jennie', 'Daumesnil',
'1988/02/28',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (21,'Steve', 'Barrot',
'1992/09/24',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (22,'Mary', 'Carlin',
'1995/03/14',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (30,'Paul', 'Moore',
'36467',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (31,'Paul', 'Edwood',
'2003/03/18',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (32,'Megan', 'Keegan',
'2001/05/29',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (40,'Rodolph','Bauman',
'2000/05/29',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (41,'Stanley','Fischer',
'37233',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON values (42,'Brian', 'Schmidt',
'1992/08/25',sysdate);
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
Oracle Internal & Oracle Academy Use Only
j. Click Save and close the tab.

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


4. Additionally, you create an option to delete rows from the target audit table, which you
created in Practice 12-2. To delete rows, you add a command that uses the value of the
option in the code. If the value of this option is set to “Y,” the command to delete records
will be executed.
a. Re-open your procedure and select Options. Click Add (green plus). Name this option
DELETE_AUDIT_RECORDS, and set Type to Value. Add the description Delete
records from the Audit table. Set the default value of this option to Y (no
quotes). Click Save.

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
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")%>

Oracle Internal & Oracle Academy Use Only


<% } %>

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.

7. Execute your procedure. In Operator, verify that the procedure executed successfully.

Oracle Internal & Oracle Academy Use Only


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
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 13: Using ODI Procedures


Chapter 13 - Page 16
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 14:
Using ODI Packages
Chapter 14

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.

Oracle Internal & Oracle Academy Use Only

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.

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

Oracle Internal & Oracle Academy Use Only


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
tables as targets:
• The DELETE_TARGET procedure
• Practice 8-1 mapping (Countries)
• Practice 8-2 mapping (Regions)
• Practice 8-3 mapping (Cities)
• Practice 9-1 mapping (Customers)
Finally, you run this package and review its execution in ODI Operator.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create a DELETE_TARGET procedure that deletes the data in the TRG_SALES,
TRG_CUSTOMER, TRG_CITY, TRG_REGION, and TRG_COUNTRY tables in the
ORACLE_LOCAL_SALES logical schema.
a. In the Designer tab, click the Projects tab, and then select the Procedures node from
the HandsOnLoads > HandsOn folder. Right-click Procedures and select New
Procedure.

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.

Oracle Internal & Oracle Academy Use Only


c. Click the Tasks tab, and then click Add .

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
Oracle schema name that may vary depending on the context and topology. Select
Ignore Errors.

Oracle Internal & Oracle Academy Use Only

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
Oracle schema name that may vary depending on the context and topology. Select the
Ignore Errors check box. Select the Tasks tab.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 8
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 9
Oracle Internal & Oracle Academy Use Only
g. Click Save, and then close the procedure tab.

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

Oracle Internal & Oracle Academy Use Only


b. Enter PKG_14-1 in the Name field.

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.

Oracle Internal & Oracle Academy Use Only


d. Repeat the operation for the MAP_8-1, MAP_8-2, MAP_8-3, and MAP_9-1 mappings.
The package should look like the following.

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.

Oracle Internal & Oracle Academy Use Only


f. Similarly, edit the names of the other steps in the diagram, as follows:
Rename MAP_8-1 as Countries, MAP_8-2 as Regions, MAP_8-3 as Cities, and
MAP_9-1 as Customers.

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.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. Close the PKG_14-1 tab.
This completes Practice 14-1. Continue on with Practice 14-2.

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

Oracle Internal & Oracle Academy Use Only


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,”
“Ms”).
3. In ODI Designer, create a numeric variable DELETION_FLAG that counts the number of
lines in TRG_CUSTOMER.
4. Duplicate the PKG_14-1 package, naming the new package PKG_14-2.
5. Have the DELETE_TARGET procedure run only if the DELETION_FLAG variable is greater
than 0.

PKG_14-2:

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
and select New User Function.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. Click the Implementations tab, and then click Add (green plus).

d. In the Implementation window, select MySQL and Oracle from the list of Linked
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
Oracle Internal & Oracle Academy Use Only
2. Use this function in the mapping MAP_9-1 to convert the source DEAR column (numeric)
into the target DEAR column (string).
a. In the Projects tree view, expand Mappings. Double-click MAP_9-1. In
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.

Oracle Internal & Oracle Academy Use Only


3. Run the MAP_9-1 mapping and review the conversion result.
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.

Oracle Internal & Oracle Academy Use Only


c. In Designer > Models, right-click TRG_CUSTOMER datastore and select View Data.
Verify that the DEAR column was populated with “Mr” as shown in the following.

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.

Oracle Internal & Oracle Academy Use Only


b. 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
viewing the history of all values for this variable.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. Drag the DELETION_FLAG variable from the tree view to the diagram again. Rename
this step Flag > 0? and change the Type to Evaluate Variable. In the Operator field,
select > as the operator, and enter 0 in the Value field.

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
shown in the following. Click Save to save the package. Close the tab.

Oracle Internal & Oracle Academy Use Only


6. Run the new package and check whether the Delete Target Tables step was
executed.
a. Select the PKG_14-2 package and click Run. Click OK in the Execution window, and
then click OK when the “Session started” message appears.

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.

Oracle Internal & Oracle Academy Use Only


c. Open the Designer tab. Open the PKG_14-2 package again and then select the
Diagram tab. To delete records from the target tables, select the DELETE TARGET
TABLES step, right-click, and select Execute Step. Click OK in the Run window, and
then click OK when the “Session started” message appears.

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.

Oracle Internal & Oracle Academy Use Only


e. With records from the target tables having been deleted, run the entire package
PKG_14-2 again. Click OK in the Run window, and then click OK when the “Session
started” message appears.

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.

Oracle Internal & Oracle Academy Use Only


7. Clean up the desktop by closing ODI Studio.
This completes Practice 14-2. This completes the practices for Lesson 14.

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

Practices for Lesson 14: Using ODI Packages


Chapter 14 - Page 28
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 15:
Step-by-Step Debugger
Chapter 15

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


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.
2. Create a duplicate copy of the existing ODI mapping.
a. In ODI Designer, expand HandsOnLoads > HandsOn > Mappings. Right-click
MAP_9-1 and select Duplicate Selection. Click Yes to confirm.

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.

c. Click the Physical tab. In the Properties section, enter MAP_DEBUG_DS in the Name

Oracle Internal & Oracle Academy Use Only


field. Click Save All and close the tabs.

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.

Oracle Internal & Oracle Academy Use Only


b. In the Debug window, make sure that Context is set to Development, and Agent is
Local (No Agent). Click OK. Then click OK when you see the “Session started”
message in the Information window.

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


The execution then pauses at the “Load data – LKM SQL to Oracle” task.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


e. In the Debug Data window, click the Target Task Data tab.

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.

After the query executes, you should see an empty table.

Oracle Internal & Oracle Academy Use Only


g. On the Blueprint tab, select the “Load data - LKM SQL to Oracle” task. On the Debug
toolbar, click Run to Task End . This executes the current load task and pauses
after execution. Note the green cursor half-bar on line .90 is now the bottom half,
indicating that the step has completed.

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.

Oracle Internal & Oracle Academy Use Only


i. Add a breakpoint to “Load TRG_CUSTOMER - IKM Oracle Insert” (Step 160).

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.

k. In Breakpoint Properties, select the Suspend after executing the task check box.
Click OK.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


o. Remove the entire target command and replace it with the following:
select * from SALES_DEV.TRG_CUSTOMER
Click Run SQL Code.

After the query executes, you should see the contents of TRG_CUSTOMER:

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


5. Clean up the desktop by closing ODI Studio.
This completes Practice 15-1. This completes the practices for Lesson 15.

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

Practices for Lesson 15: Step-by-Step Debugger


Chapter 15 - Page 16
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 16:
Managing ODI Scenarios
Chapter 16

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.

Oracle Internal & Oracle Academy Use Only

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.

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.

Oracle Internal & Oracle Academy Use Only


2. Then, in Topology Navigator, you verify connection to ODI Agent.
3. Next, in Designer Navigator, you schedule the scenario with ODI Agent.
4. Back to Topology Navigator to review the scheduling of the agent.
5. Finally, in Operator Navigator, after the scheduled scenario execution time, you verify
that the scenario has executed.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create a new scenario with Oracle Data Integrator.
a. In ODI Designer, click the Projects tab. On the Projects tab, expand the project:
Procedure-CRT-TBL > First Folder > Procedures. Right-click the PRD-create-
populate-table procedure and select Generate Scenario.

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.

Oracle Internal & Oracle Academy Use Only

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
class.
b. In Topology Navigator > Physical Architecture > Agents, verify the connection to the
ODI agent, as shown in the following screen:

Oracle Internal & Oracle Academy Use Only


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

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


g. Open Topology Navigator to review the scheduling of the Agent. In the Physical
architecture, expand the Agents node and double-click OracleDIAgent1. On the
OracleDIAgent1 screen, click Update Schedule. On the screen that follows, click
OK. Click OK again.

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 9
Oracle Internal & Oracle Academy Use Only
h. Click the View Schedule button. The screen that appears shows you the scheduling
information. The horizontal line is VERY hard to see. Click OK to close the schedule.
Close the tabs: OracleDIAgent1 tab and Scenario Scheduling.

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.

Oracle Internal & Oracle Academy Use Only


b. Expand: Agent > OracleDIAgent1 > PRD_CREATE_POPULATE_TABLE, and view
the execution results for the PRD-create-populate-table procedure. Note the
execution time of this scenario. That is the time that you scheduled with ODI Agent.
You have now successfully scheduled a scenario with an agent scheduler.

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
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 16: Managing ODI Scenarios


Chapter 16 - Page 12
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 17:
Using Load Plans
Chapter 17

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.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


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,
restartability, and exception handling.
In this practice, you will use the load plan editor to create a very simple load plan with a set of
steps running in parallel, followed by a set of steps running sequentially.
First, define a load plan.
Then, add a node for independent steps to run in parallel. Create two procedures for loading
dimensions, and add them as steps to execute in parallel.
Next, add a node for interdependent steps to run in a specific sequence. Add several of your
previously defined objects as steps to run in the following order:
1. DELETE_TARGET procedure, which deletes records from the TRG_SALES, TRG_CUSTOMER,
TRG_CITY, TRG_REGION, and TRG_COUNTRY tables
2. MAP_8-1, which adds records to the TRG_COUNTRY table
3. MAP_8-2, which adds records to the TRG_REGION table
4. MAP_8-3, which adds records to the TRG_CITY table
5. 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.
[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.

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Create a simple load plan to execute two steps in parallel, and then five steps serially.
a. In the Designer Navigator, click the Load Plans and Scenarios tab. From the tab’s
menu, select New Load Plan.

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.

Oracle Internal & Oracle Academy Use Only


c. The load plan editor opens with the root step node. Click Add Step (the green plus),
and select Parallel Step.

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.

Oracle Internal & Oracle Academy Use Only


b. Enter Load_PRODUCT_dimension in the name field. Do not enter any other
information, because this will be a nonfunctioning skeletal procedure that you create
solely for the purpose of seeing how load plans work. Later, when you execute the load
plan, this procedure will run, but do nothing. Click Save and close the
Load_PRODUCT_dimension editing tab.

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.

Oracle Internal & Oracle Academy Use Only


d. Return to the Data Warehouse Load Plan editor. With the Parallel step highlighted,
click Add Step (green plus) and select Run Scenario Step.

e. A load plan uses scenarios in its steps. You can select an existing scenario for a step,
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.

Oracle Internal & Oracle Academy Use Only


g. In the New Scenario window, accept the name LOAD_PRODUCT_DIMENSION as the
name of the scenario that ODI will create to run this procedure, and click OK.

h. ODI returns to the Add Run Scenario Step window.


Note: LOAD_PRODUCT_DIMENSION is the name of the new scenario that ODI will
generate for the procedure, as well as the name for the step that you are adding to the
load plan. Click Finish.

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.

j. Click the Parallel node of the Steps Hierarchy, and click Add Step (green plus) again.
Select Run Scenario Step.

Oracle Internal & Oracle Academy Use Only


k. Repeat steps e through h to add your other new procedure, Load_TIME_dimension,
to the Parallel node of the Steps Hierarchy. The result should look similar to the
following screenshot.

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.

Oracle Internal & Oracle Academy Use Only


b. The Serial node appears in the Steps Hierarchy. With Serial node selected, click Add
Step and select Run Scenario Step.

c. In the Add Run Scenario Step window, click Lookup Scenario .

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.

Oracle Internal & Oracle Academy Use Only


e. ODI returns to the Add Run Scenario Step window. Click Finish.

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.

Oracle Internal & Oracle Academy Use Only


g. Click Lookup Scenario and select Mappings.

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.

Oracle Internal & Oracle Academy Use Only


i. Repeat steps f through h to add the remaining three mappings: MAP_8-2, MAP_8-3,
and MAP_9-1. Your results should look similar to the following screen. Note the default
restart values for the different types of steps. 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 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.

Oracle Internal & Oracle Academy Use Only


b. Open the Operator Navigator, click Refresh, and examine the results of executing the
load plan. The seven steps in the load plan appear as a grouping of seven executions
within seconds of each other. For each load plan step, ODI generated a scenario for
execution.
First, the procedures for loading the TIME and PRODUCT dimensions ran in parallel.
Then, the DELETE_TARGET procedure and the four mappings ran in the serial
sequence that you defined.

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
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 18:
Enforcing Data Quality with
ODI
Chapter 18

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.

Oracle Internal & Oracle Academy Use Only

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.

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.

Oracle Internal & Oracle Academy Use Only


2. You then create a mapping by using that datastore as a target.
3. On the mapping’s Physical tab, you set STATIC_CONTROL to True. On the Controls tab,
you ensure that the knowledge module is set to CKM SQL (a knowledge module that you
will import) and you set maximum allowed errors to 5.
4. For two columns in the target datastore, you select Check Not Null so that control errors
are generated if these columns are not loaded.
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.
6. Finally, you rerun the mapping with Flow Control set to TRUE and verify that errors are
excluded from the target datastore.
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).
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.

Oracle Internal & Oracle Academy Use Only


b. In the File import directory field, select CKM SQL and click OK. Then Close the
Import Report window. Verify that CKM SQL was successfully imported and is shown
in the tree view.

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 4
Oracle Internal & Oracle Academy Use Only
c. On the Models tab, expand Oracle_RDBMS1 > TRG_SALES_PERSON >
Constraints, and then double-click TRG_SALES_PERSON_PK. Click the Control tab
and verify that Static is selected.

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.

Oracle Internal & Oracle Academy Use Only


e. Repeat the same step to enable Static control and Mandatory for the DATE_HIRED
column. Save your changes and close the tabs.

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.

Oracle Internal & Oracle Academy Use Only


g. On the Logical tab, delete the filter for the SALES_PERSON_ID column, and preserve
downstream expressions, as shown in the following screenshot. Click the Physical tab.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


k. In Target Datastore, select the LAST_NAME column, and then select Check Not Null.

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.

Oracle Internal & Oracle Academy Use Only


m. Run your mapping . Click the Overview > Execution tab of the MAP-EXP-FF-RT-
QUALITY editor to view the execution results showing three errors, as shown in the
following screenshot.

Note: You may need to click Refresh to view your last execution.

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:

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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 .

Oracle Internal & Oracle Academy Use Only

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.

3. Clean up the desktop by closing ODI Studio. Oracle Internal & Oracle Academy Use Only
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
Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 18: Enforcing Data Quality with ODI


Chapter 18 - Page 16
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 19:
Working with Changed Data
Capture
Chapter 19

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.

Oracle Internal & Oracle Academy Use Only

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.

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

Oracle Internal & Oracle Academy Use Only


knowledge module.
1. First, you import this knowledge module and create a model by using this journalizing
knowledge module.
2. Then you create a mapping by using the IKM Oracle Incremental Update knowledge
module, specifying capture of journalized (changed) data only.
3. Import the JKM Oracle Simple knowledge module.
4. Create a model, Oracle_RDBMS2, specifying this knowledge module on the Journalizing
tab.
5. Reverse-engineer the model, verifying the resulting structure.
6. Add the model’s SRC_SALES_PERSON table to CDC and start the Journal by using the
default subscriber SUNOPSIS.
7. Use Data Viewer to change data in the table and verify in Journal Data that the data
change was captured.
8. Create a mapping to process only changed data.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. Import the appropriate JKM in the project.
a. In Designer Navigator, click the Projects tab. Expand the Procedure-CRT-TBL
project. Expand the Knowledge Modules node, right-click Journalizing (JKM), and
select Import Knowledge Modules.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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:

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


c. In this practice, you use the default subscriber SUNOPSIS. Consequently, you do not
have to add another subscriber. Click OK to confirm that your subscriber is SUNOPSIS.
In the Run window, click OK. In the Information window, click OK again.

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.

Oracle Internal & Oracle Academy Use Only


4. View the data, change some data, and confirm that the changed data is captured.
a. In Designer Navigator, click the Models tab. Right-click the SRC_SALES_PERSON
datastore and select Data.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


This will display a very small clock on the left of the datastore:
yellow for ready
green for running

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
Modules node. Right-click Integration (IKM) and select Import Knowledge Modules.
Import the new Knowledge Module: IKM Oracle Incremental Update. Close the
report.

Oracle Internal & Oracle Academy Use Only

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

Practices for Lesson 19: Working with Changed Data Capture


Chapter 19 - Page 14
Oracle Internal & Oracle Academy Use Only
You may have accidentally imported the CKM Hive object as well (this is a known bug).
You can safely ignore it.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


d. Click Delete current row repeatedly to delete all the rows.

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.

Oracle Internal & Oracle Academy Use Only


g. Click the Models tab. In the tree view, expand the Oracle_RDBMS1 model. Drag the
TRG_SALES_PERSON_CDC datastore from the tree view to the modeling zone. Expand
the Oracle_RDBMS2 model and drag the SRC_SALES_PERSON datastore from the
model tree to the modeling zone of your diagram. Drag a Distinct component in
between the two datastores.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


k. On the Physical tab, click TRG_SALES_PERSON_CDC and set the Integration
Knowledge Module to IKM Oracle Incremental Update.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


6. Verify the execution results.
a. Open Operator Navigator. Click Refresh. Expand the All Executions node and verify
that your session, MAP_SALES_PERSON_CDC, executed successfully.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 20:
Advanced ODI Administration
Chapter 20

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
Java EE. You then use the Enterprise Manager and ODI Console to monitor and manage ODI
components, processes, and resources.

Oracle Internal & Oracle Academy Use Only

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

Oracle Internal & Oracle Academy Use Only


object (Scheduling) to your new user. You also define user parameters that enable specific
functionality for your new user.
Finally, you define password policies that control the case-sensitivity and length of user-defined
passwords.
1. In ODI Security Navigator, expand the Profiles panel and duplicate the Repository
Explorer profile, naming the new profile REVIEWER. You grant three methods to the
REVIEWER profile: “Compare with version,” “Duplicate,” and “Export from object Model.”
Note: You may need to click the View menu and open Security Navigator.
2. Create a new ODI user, INT_PROJECT_REVIEWER.
3. Assign the new profile REVIEWER to your newly created user. To connect to ODI Master
and Work Repositories, assign the built-in profile, CONNECT, to the new user
INT_PROJECT_REVIEWER.
4. Grant the View method for the Scheduling object to the INT_PROJECT_REVIEWER user.
5. Define user preferences to enable specific functionality for INT_PROJECT_REVIEWER.
6. Define password policies to enforce passwords to be uppercase and greater than eight
characters.

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

Oracle Internal & Oracle Academy Use Only


e. Log in using the same Name: DEV_ODI_REPO and User: SUPERVISOR as you have in
the past.
2. To define an ODI security policy, you need to create an appropriate profile for the working
methods used in your project.
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.

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.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


b. In the Users panel, expand the INT_PROJECT REVIEWER > Profiles node and verify
that the REVIEWER profile was assigned to this user.

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.

Oracle Internal & Oracle Academy Use Only


d. Verify that the CONNECT and REVIEWER profiles are added to your new user:

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.

Oracle Internal & Oracle Academy Use Only


f. Verify that authorization to the Scheduling object with the View method was added to
the INT_PROJECT_REVIEWER user, as shown in the following screenshot:

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.

b. Connect To Repository with the Wallet password of Welcome1.

Oracle Internal & Oracle Academy Use Only


c. Select DEV_ODI_REPO for the Login Name. Enter INT_PROJECT_REVIEWER as the
user and INTEGRATION as the password.

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.

Oracle Internal & Oracle Academy Use Only

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.

b. Confirm or edit the user parameters as shown in the following table. Click OK.
Parameter Value Functionality
Lock object when opening Used for concurrent environments

Oracle Internal & Oracle Academy Use Only


No
Used in conjunction with “Lock object
Display lock icons check
when opening” to indicate it
Delay between two refresh Inter-refresh delay
2
(seconds)
Operator Display limit (0=no Number of elements displayed in a
200
limit) branch of the Operator tree view

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
Oracle Internal & Oracle Academy Use Only
Preferences > ODI > User Interface > Designer.

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.

b. Connect to DEV_ODI_REPO with the SUPERVISOR user. Accept the stored password.

Oracle Internal & Oracle Academy Use Only


c. Select the Security Navigator tab. Click the icon, and then select Password
policies. Click the Add a Policy icon.

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

Oracle Internal & Oracle Academy Use Only


e. Enter another rule: Length >= 8. Click OK.

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.

Oracle Internal & Oracle Academy Use Only


g. It is possible that a new policy may cause an existing user to no longer be valid (for
example, Welcome1 contains lowercase letters). For purposes of this lab, click No. In
real life you would probably click Yes.

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

Oracle Internal & Oracle Academy Use Only


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
Enterprise Manager 12c and ODI Console to access your ODI objects.
1. Use RCU to prepare a new OPSS schema.
2. Deploy and configure the ODI Java EE agent, Enterprise Manager, and ODI Console on
the existing WebLogic domain.
3. Connect to the WebLogic Server and managed server, ODI_server1.
4. Use Enterprise Manager to administer ODI.
5. Use ODI Console to explore the ODI environment.

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

Oracle Internal & Oracle Academy Use Only


10.216.4.217 hostname.us.oracle.com hostname
[oracle@hostname ~]$
The first line of the real IP addresses (not including the localhost or loopback) is
probably your IP address. In this example, it is 10.216.4.217. Your number will be
different. If in doubt, ask your instructor. Write down this number for later.
b. If you have the standalone agent running in a terminal window from previous labs, stop
it by pressing Ctrl + C.
[oracle@hostname bin]$ ./agent.sh -NAME=OracleDIAgent1
2014-03-04 13:49:47.017 NOTIFICATION New data source:
[DEV_ODI_REPO/*******@jdbc:oracle:thin:@localhost:1521/ORCL.US.ORACLE.COM]
2014-03-07 13:49:49.280 NOTIFICATION ODI-1128 Agent OracleDIAgent1 is
starting. Container: STANDALONE. Agent Version: 12.1.2 - 17/09/2013. Port:
20910. JMX Port: 21910.
(...many lines omitted for clarity...)
2014-03-07 13:49:58.254 WARNING ODI-2010 Agent OracleDIAgent1 is not
reachable. The operation will be repeated after 30 seconds interval until
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
shown in the following screenshot:

Oracle Internal & Oracle Academy Use Only


d. In the Logical Architecture, create a new logical agent with the same name as your
new physical agent, OracleDIAgent. Link this logical agent to the physical agent
OracleDIAgent in all three contexts, as follows. Save your logical agent definition.

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.

Oracle Internal & Oracle Academy Use Only


c. On the Create Repository screen, click Next.

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
− Password: Welcome1
Click Next.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


g. 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 24
h. On the Schema Passwords screen, enter Welcome1 twice. Click Next.

Oracle Internal & Oracle Academy Use Only


i. On the Map Tablespaces screen, click Next.

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.

l. On the Summary screen, click Create.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


3. Extend the WebLogic server domain ODI-DOMAIN with the ODI agent application.
a. To deploy and configure domains with WLS, start config.sh from the ODI Home
Install directory:
[oracle@hostname ~]$ cd $ODI_HOME/common/bin
[oracle@ hostname bin]$ pwd
/u01/app/oracle/Middleware/Oracle_Home/odi/common/bin
[oracle@ hostname bin]$ ./config.sh

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.

Oracle Internal & Oracle Academy Use Only

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
− Oracle Data Integrator – Console – 12.1.2.0, which includes Oracle Data
Integrator SDK Shared Library Template – 12.1.2.0
Click Next.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


e. The wizard will set up the ODI repository connection within the domain server. During
the wizard configuration, the repository connection information must be supplied.
Change the Host Name to localhost. In the Schema Password field, enter
Welcome1.
Check the values filled in by the wizard, and the values you entered, against the
following table and screen.
Database Connection (Master Repository)
Parameter Value
DEV2_STB (Make sure it is the
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
Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


h. On the Credentials screen, enter Username: SUPERVISOR and Password: Welcome1.
Click Add, and on the new line enter Key Name: ODI-DOMAIN, Username: weblogic,
and Password: Welcome1. On the Store Name drop-down list, select
oracle.odi.credmap. Click Next.

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.

Oracle Internal & Oracle Academy Use Only


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
the newly created ODI_server1, probably dedicated to ODI (and maybe also EM).
Change the Listen Address to your real IP address. (Do not use All Local Addresses.)
Set Listen port to 8002 for ODI_server1. This matches the port setting that you used
when defining the OracleDIAgent physical agent. Click Next.

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.

Oracle Internal & Oracle Academy Use Only


l. On the Coherence Clusters screen, click Next.

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.

Oracle Internal & Oracle Academy Use Only


WLS machines are used for failover and load-balancing.
n. Select all the servers (Ctrl + A) and click > to assign them to my_UnixMachine_1.
The WLS Administrator can sort them out later.

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 36
o. Click Next.

Oracle Internal & Oracle Academy Use Only


p. On the System Components screen, click Add, then enter a System Component name
of OracleDIAgent, and a Component Type of ODI. Click Next.

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.

Oracle Internal & Oracle Academy Use Only


s. Review the Configuration Summary. Click Update to extend the domain. When the
domain is configured, click Finish.

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
Oracle Internal & Oracle Academy Use Only
It will linger at 0% for about a minute, that is normal.
When it reaches 100%, it is still not quite done until the Next button becomes available.

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

Oracle Internal & Oracle Academy Use Only


(...many lines omitted for clarity...)
<Mar 3, 2014 5:26:17 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server
state changed to RUNNING.>
<Mar 3, 2014 5:26:17 PM UTC> <Notice> <WebLogicServer> <BEA-000360> <The
server started in RUNNING mode.>
Minimize (but do not close) the admin server command window.
b. To start the ODI_server1 managed server, in a new terminal window or tab, change
directory to $FMW_HOME/user_projects/domains/ODI-DOMAIN/bin, and use the
startManagedWebLogic.sh ODI_server1 command. For username, enter
weblogic. For password, enter Welcome1. The server takes about two minutes to
start up and reach the RUNNING mode. Verify that your managed server is started in
RUNNING mode.
[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]$ ./startManagedWebLogic.sh ODI_server1
(...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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


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.

Oracle Internal & Oracle Academy Use Only


c. In the left Target Navigation panel, expand ODI > oraclediagent. Click the
oraclediagent (ODI_server1) node to see the Java EE agent information.

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.

Oracle Internal & Oracle Academy Use Only


b. In the left panel, click the Design Time tab. Expand Projects, Models, and Topology.

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.

Oracle Internal & Oracle Academy Use Only


Scroll down and click the First Folder link.

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only

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.

Oracle Internal & Oracle Academy Use Only


scroll down…

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

Practices for Lesson 20: Advanced ODI Administration


Chapter 20 - Page 48
Oracle Internal & Oracle Academy Use Only
When you have finished exploring, log out of ODI Console and close the browser.

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

Oracle Internal & Oracle Academy Use Only


Please enter your password :Welcome1
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 ODI_server1 with force=false while connected to
AdminServer ...
.
Exiting WebLogic Scripting Tool.
Done
Stopping Derby Server...
Derby server stopped.
[oracle@hostname bin]$
b. To stop the WebLogic server, execute the stopWebLogic command.
[oracle@hostname bin]$ ./stopWebLogic.sh
Stopping Weblogic Server...
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