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

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY.

SHARING THE FILE IS STRICTLY PROHIBITED.

Activity Guide

D78191GC10
Edition 1.0
February 2013
D80590

Oracle University and (Oracle Corporation) use only.

Oracle Data Integrator 11g:


Advanced Integration and
Development

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

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. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their
respective owners.

Author
Viktor Tchemodanov
Technical Contributors and Reviewers
Denis Gray, Alex Kotopoulis, Julien Testut, Christophe Dupupet, Rebecca Sly, Gerry Jurrens,
Sophia Chen, Vishal Parashar, Richard Green
This book was published using:

Oracle Tutor

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Disclaimer

Practices for Lesson 1: Introduction ........................................................................................................ 1-1


Practices for Lesson 1: Overview............................................................................................................. 1-2
Practice 1-1: Exploring Your Environment ................................................................................................ 1-3
Practices for Lesson 2: Overview of ODI Knowledge Modules................................................................ 2-1
Practices for Lesson 2: Overview............................................................................................................. 2-2
Practice 2-1: Developing and Enhancing an Integration Knowledge Module .............................................. 2-3
Practices for Lesson 3: Developing Knowledge Modules........................................................................ 3-1
Practices for Lesson 3: Overview............................................................................................................. 3-2
Practice 3-1: Creating a New KM for Data Generation .............................................................................. 3-3
Practices for Lesson 4: Designing ODI Integration Interfaces ................................................................. 4-1
Practices for Lesson 4: Overview............................................................................................................. 4-2
Practice 4-1: Creating an ODI Interface for XML to Database Transformation with ODI Constraint and Error
Recycling................................................................................................................................................ 4-3
Practices for Lesson 5: Designing Advanced Integration Interfaces ...................................................... 5-1
Practices for Lesson 5: Overview............................................................................................................. 5-2
Practice 5-1: Implementing ODI Integration with Temporary Interfaces...................................................... 5-3
Practices for Lesson 6: Using Variables in ODI ....................................................................................... 6-1
Practices for Lesson 6: Overview............................................................................................................. 6-2
Practice 6-1: Using Variables in ODI Package.......................................................................................... 6-3
Practice 6-2: Using an ODI Variable as a Startup Parameter .................................................................... 6-22
Practices for Lesson 7: Accelerating Development in ODI with Groovy ................................................. 7-1
Practices for Lesson 7: Overview............................................................................................................. 7-2
Practice 7-1: Automating ODI Tasks with Groovy ..................................................................................... 7-3
Practices for Lesson 8: Working with Complex Files in ODI ................................................................... 8-1
Practices for Lesson 8: Overview............................................................................................................. 8-2
Practice 8-1: Configuring ODI Topology and ODI Model with Complex Files.............................................. 8-3
Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA .................................... 9-1
Practices for Lesson 9: Overview............................................................................................................. 9-2
Practice 9-1: Integrating ODI in the Enterprise Environment ..................................................................... 9-3
Practice 9-2: Exposing an ODI Scenario as a Web Service....................................................................... 9-17
Practice 9-3: Integrating ODI with a BPEL process Within SOA ................................................................ 9-30
Practices for Lesson 10: Enhancing ODI Security ................................................................................... 10-1
Practices for Lesson 10: Overview ........................................................................................................... 10-2
Practice 10-1: Implementing ODI External User Authentication ................................................................. 10-3

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

Oracle Data Integrator 11g: Advanced Integration and Development Table of Contents
iii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Table of Contents

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Chapter 1

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

Practices for Lesson 1: Introduction

Chapter 1 - Page 1

Oracle University and (Oracle Corporation) use only.

Practices for Lesson 1:


Introduction

Practices Overview
In this practice, you will explore the technical environment for your practices and start the ODI
studio.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 1: Overview

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

Practices for Lesson 1: Introduction


Chapter 1 - Page 2

Overview
In this practice, you examine the technical setup for these practices, start up, and connect to the
ODI Studio.

Assumptions
None

Tasks
1.

View the major software components installed in your system. These components are
shown in the picture. Your environment has the following major components:
Oracle Database 11gR1 (11.1.0.7.0)
Oracle Data Integrator 11gR1 (11.1.1.6)
Oracle WebLogic Server (10.3.6)
Oracle SOA Suite (11.1.1.6)
Oracle Internet Directory (11.1.1.6.0)

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

Practices for Lesson 1: Introduction


Chapter 1 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 1-1: Exploring Your Environment

3.

View the desktop of your machine. Note the following shortcuts:


a. ODI Studio: Starts ODI Studio

b.

SQL Developer: Starts SQL Developer, which provides access to the objects in Oracle
Database 11gR1 with GUI

c.

JDeveloper: Starts JDeveloper, which simplifies working with projects and deploying
to the application server (WebLogic)

d.

Start WLS_SOA_ODI_domain: This shortcut starts the WebLogic admin server in


SOA-ODI_domain. This domain has been predefined for these practices.

Navigate to the C:\Labs folder.


a. View this folders content. The Files folder contains some files that will be used for
your practices.
b. Note the folder named ResetPractice. This folder contains the scripts for resetting
practices in the course. You will use these scripts at the beginning of each practice.
These scripts are also useful when you feel that you need to restore a particular
practice environment and begin your practice from scratch. Close your folder window.
Note: These scripts are available for most, but not every practice of the course.
Consult your instructor for details.

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

Practices for Lesson 1: Introduction


Chapter 1 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

Start Oracle Data Integrator and log in to ODI Studio. Start your demo source environment.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Step

Screen/Page Description

Choices or Values

a.

MS Windows

Start Oracle Data Integrator: Start >


Programs > Oracle > Oracle Data
Integrator > ODI Studio.

b.

Oracle Data Integrator

Click Connect to Repository. The Login


Name is DEV_ODI_REPO. You log in with the
username SUPERVISOR and password
SUNOPSIS. Click OK.

c.

Oracle Data Integrator

In ODI Studio, open the Designer tab. Open


the Projects and Models tabs. Verify your
environment with the screenshot provided.

d.

Oracle Data Integrator

Start the Demo environment: Start >


Programs > Oracle > Oracle Data
Integrator > Shortcut to startdemo.
Verify that three command windows are
added to the taskbar. You will need to have
these programs running.
Do not close these windows until the end of
all practices.

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

Practices for Lesson 1: Introduction


Chapter 1 - Page 5

Oracle University and (Oracle Corporation) use only.

4.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

a.

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

Practices for Lesson 1: Introduction

Chapter 1 - Page 6

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

b.

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

Practices for Lesson 1: Introduction

Chapter 1 - Page 7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 1: Introduction

Chapter 1 - Page 8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 1: Introduction

Chapter 1 - Page 9

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

Practices for Lesson 1: Introduction

Chapter 1 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Chapter 2

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 2:


Overview of ODI Knowledge
Modules

Practices Overview
In Practice 2-1, you duplicate an existing knowledge module and modify the duplicate
knowledge module to enhance it with substitution methods.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 2: Overview

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 2

Overview
In some cases, you may need to create a new knowledge module (KM) to use with an
integration interface. That would provide additional functionality of your interface.
In this practice, you duplicate an existing KM, IKM SQL Incremental Update, naming the new
KM as IKM Oracle UI-Audit. You add two commands, Create Audit Table and Insert Audit
Records, to the KM by using substitution methods. To test your newly created KM, you
duplicate an existing interface, naming the new interface as INT-INT-SALES_PERSON-AUDIT.
You change the new interfaces IKM selection to use the new KM you just created in the
previous practice, IKM Oracle UI-Audit. You execute the INT-SALES_PERSON-AUDIT interface
and examine the audit table created by your KM.
You also make additional enhancements of the KM created in the previous practice. You create
an option for your new KM to enable an end user to choose when to generate audits. You link
this option to the steps in the KM, and test your modified interface.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL developer are not running. If they are running, close
ODI Studio and SQL Developer.
b. Start the command utility and change the directory to the following folder:
C:\Labs\ResetPractice\reset_2

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 2-1: Developing and Enhancing an Integration Knowledge


Module

Execute the resetRepo.bat command. Press Enter when prompted. Verify that this
command is executed successfully as shown in the following screenshot.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Create the new KM with new functionality to create an audit table and insert audit records.
a. If not started, start Oracle Data Integrator: Start > Programs > Oracle > Oracle Data
Integrator > ODI Studio. If not connected, connect to the DEV_ODI_REPO Work
Repository (username: SUPERVISOR; password: SUNOPSIS). Click the Designer tab.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

Open ODI Designer and click the Projects tab. Select Projects > Export Files >
Knowledge Modules > Integration (IKM). Right-click IKM SQL Incremental Update
and select Duplicate Selection. In the window that follows, click Yes.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Double-click Copy of IKM SQL Incremental Update to edit it. Rename this KM IKM
SQL Incremental Update Audit Options. Click the Details tab.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 7

c.

On the Details screen, review the commands in the current KM. Select Insert new
icon to add the new command.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

rows and then click the Add

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 8

Name this command Create Audit Table. Select the Ignore Errors check box. In
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: This command creates the Audit table with three columns: the primary key
column (SALES_PERSON_ID), AUDIT_DATE, and AUDIT_INDICATOR.
Note: For this command, refer to the C:\Labs\Files\Text\P2-1.txt file.
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)
)

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Click the Details tab. If necessary, scroll down, and then select the Create Audit
Table command. Click the
icon four times to move the command up and place it
right after the Insert new rows step (150), as shown below. Verify that the Ignore
Errors check box is selected for your new Create Audit Table command.

f.

With the Create Audit Table command still selected, click the Add icon again.
Create the command that inserts audit records in the audit table, as shown below. This
command uses the following substitution methods: odiRef.getTable and
odiRef.getColList. Name this command Insert Audit Records. Select the
Ignore Errors check box. In the Command on Target tab, set the Technology to
Oracle. The command is provided below.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Note: For this command, refer to the C:\Labs\Files\Text\P2-1.txt file.


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]).
Notice the PK parameter. If it is used, only the columns that are part of the
primary key are included.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 12

g.

Click the Details tab. Scroll down and select the Insert Audit Records command.
icon four times to move the command up and place it right after the

Create Audit Table step, as shown in the next screen. Click Save and then close
the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 13

3.

Click the Save button, and close the editor. Verify that your new KM, IKM SQL
Incremental Update Audit Options, appears in the Knowledge Modules tree.

You will create a modified copy of the INT-TRG_SALES_PERSON interface, to execute with
your newly created KM. You will need to duplicate the existing interface, rename it, and
then change the IKM entry to use your new IKM SQL Incremental Update Audit Options.
a. On the Projects tab, expand the project Export Files, expand First Folder > Interfaces,
right-click the INT-TRG_SALES_PERSON interface and select Duplicate Selection.
Click Yes on the Confirmation screen.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

Double-click the Copy of INT-TRG_SALES_PERSON interface. Change the name of


the interface to INT-TRG_SALES_PERSON-Audit, as shown in the screenshot. Click
the Flow tab.

On the Flow tab, click Target (ODI_STAGE) in the diagram to open the Target Area
Property Inspector below the diagram. In the IKM Selector drop box, select IKM SQL
Incremental Update Audit Options.
Note: You may have to make sure that the lower section of the editor is shown before
working with the Target Area Property Inspector pane.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Ensure that in the Options list, FLOW_CONTROL and STATIC_CONTROL options are set
to false, as shown in the screenshot. Click the Save button and then close the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 16

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

To execute your new interface, select the interface and click the Execute button
Click OK. Click OK again in the Information window to start the execution.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Operator tab to open ODI Operator. Click to open the All Executions node. If
necessary, click the Refresh icon
session steps.

, find your new interface session, and view the

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 19

Scroll down and double-click the Create Audit Table step (13). View the content of the
Definition and Code tabs for this step. Close the tab.
Note: You may have warning status for this Session task if the Audit table already
exists in your system. Ignore this warning.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 20

Similarly, view the Insert Audit Records step information. Refer to the following
screens. Click Close.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 21

On the Desktop, double-click the shortcut to start Oracle SQL Developer. When SQL
developer is started, click to expand the ORCL connection. Connect with the username
System and password oracle1. Expand Other Users > ODI_STAGE > Tables
connection (for the password, enter ODI_STAGE). Select the Tables (Filtered) node
and if necessary, click the Refresh button

. Click the Audit table

TRG_SALES_PERSON_H, click the Data tab, and verify that your Audit table was
created and populated with audit records, as shown next.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

g.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 22

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Create an option for your newly created KM to enable an end user to choose when to
generate audits.
h. In Designer, click the Projects tab, right-click IKM Oracle UI Audit Options, and
select New Option. Name this option as AUDIT, set Type to Check Box, and Default
Value to true. Click Save and close the AUDIT option tab.

Now, you need to link this option to your steps in the KM. Double-click IKM SQL
Incremental Update Audit Options, and click the Details 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.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

Deselect the Always Execute check box. Select AUDIT. This will condition the
execution of these steps with the value set by the end user. Click Save. Click the
Details tab.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

j.

Repeat the previous step for the Insert Audit Records command, as shown in
the following screens. Click Save to save your KM and close the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

k.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 26

Double-click the INT-TRG_SALES_PERSON-Audit interface to edit it. Click the Flow


tab, click Target (ODI_STAGE), and verify that the AUDIT option is set to true.
Execute the interface

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

l.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 28

In Designer, edit the INT-SALES_PERSON-Audit interface again. On the Flow tab,


click Target (ODI_STAGE) and set the AUDIT option to false. Save your interface
and then execute your interface again

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

n.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 29

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.

p.

Close ODI Studio. If open, close SQL Developer.

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

Practices for Lesson 2: Overview of ODI Knowledge Modules


Chapter 2 - Page 30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

o.

Chapter 3

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 3:


Developing Knowledge
Modules

Practices Overview
In Practice 3-1, you create a new knowledge module (KM) that can be used with ODI integration
interfaces for generating thousands of records with random data in any table in the Oracle
Database. In most cases, column names and mapping expressions do not belong to a KM. The
exception would be administrative columns that you add as part of the logic of your KM. For
your KM to be reusable, you need make sure that your code contains no information that
physically relates your code to any particular database table structure.
Your new KM is to generate a large number of records with some random data. To generate
data for each record that would meet particular requirements, you use simple user functions that
have been precreated for this practice.
In addition, you create options for your KM to add some flexibility to your KM. With these
options, you can set the number of records you want to generate. You can also set the option
for creating or truncating a target table.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 3: Overview

Overview
The Oracle Database provides an interesting feature that can be used to generate a large
number of records the group by cube method: It returns all the possible permutations for the
selected columns. For example, the following code returns 8 records (2 to the power 3):
select NULL from dual group by cube(1,1,1). How about generating a table with
just 1,000 records? For that, you can use the following code:
select NULL from dual group by cube(1,1,1,1,1,1,1,1,1,1)
where rownum<=1000
This command is hardcoded. Because from one environment to another, the database schema
names will vary, you have three options to create the staging table, from the least portable to
the most portable:

Hardcoded table name and schema name (for example, myschema.SEED)not


recommended
Dynamic schema name, but hardcoded table name: ODI retrieves the proper schema
name and automatically updates the code at the execution time (generated code:
myschema.SEED).

Fully dynamic table name and schema name (usually, dynamic tables are named after
the target table with some extension, for example, _SEED). In this case, the generated
code for the TRG_CUSTOMERS loading table, the SEED table name is
myschema.TRG_CUSTOMER_SEED.
Note: In this practice, you use the second option above for simplicity.
The statement above would help you to generate a table that only has 1,000 records. To create
a table with 1,000,000 records, you need to have a Cartesian product by executing the following
statement:

insert into [Target] ([Columns]) Select * from SEED S1, SEED s2


In case you need to return fewer records, all you have to do is filter on the S2 table. For
example, the following clause returns 10,000 records.

where S2.SEED_ID<=10
The actual number of records to be created in the table is defined by the option you create for
the KM.
To generate the random data, you create an integration interface that uses simple user
functions in mappings. These user functions have been predefined for the purpose of this
practice.
Note: You develop the KM that works for Oracle Database. Adaptations of the code for other
databases are possible.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 3-1: Creating a New KM for Data Generation

1.

Reset your practice environment.


a. Verify that ODI Studio and SQL developer are not running. If they are running, close
ODI Studio and SQL Developer.
b. If necessary, start the command utility and change the directory to the following folder:
C:\Labs\ResetPractice\reset_3. Execute the resetRepo.bat command.
Press Enter when prompted. Verify that this command is executed successfully.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Your Tasks

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 4

Create your new KM.


a. Start Oracle Data Integrator: Start > Programs > Oracle > Oracle Data Integrator > ODI
Studio. If not connected, connect to the DEV_ODI_REPO Work Repository (username:
SUPERVISOR; password: SUNOPSIS). Click the Designer tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 5

In Designer, click the Projects tab, expand Procedures > Knowledge Modules. Rightclick Integration (IKM) and select New Integration (IKM). In the Name field, enter IKM
Oracle Build Sample Data. Click the Details tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 6

Click Add icon to add the first step. Name this step as Drop SEED table. Select the
Ignore Errors check box. In the Command area, enter
drop table <%=odiRef.getObjectName("L", "SEED1", "W")%>
Note: For the commands used in this practice, you can refer to the P3-1.txt file
located in the C:\Labs\Files\Text folder.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 7

Click the Details tab. Click Add icon and then add another command to create the
SEED table:
create table <%=odiRef.getObjectName("L", "SEED1",
"W")%>(SEED_ID NUMERIC)
Name this command: Create SEED table.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 8

In the next step, you will populate the SEED table with records. Add the following
command:
insert into <%=odiRef.getObjectName("L", "SEED1", "W")%>
select rownum from
(select NULL from dual group by cube(1,1,1,1,1,1,1,1,1,1))
where rownum<=1000
name this command: Populate SEED table.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 9

To create a target table, you add the following command. Select the Ignore Error check
box. Name this command Create target table.
Note: This command is necessary only when a target table does not exist. Click the
Details tab.
create table <%=snpRef.getTable("L", "TARG_NAME", "A")%>
(
<%=snpRef.getTargetColList("", "[COL_NAME]\t[DEST_CRE_DT] "
+ snpRef.getInfo("DEST_DDL_NULL"), ",\n\t", "")%>
)

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 10

Add the command to truncate the target table as shown below. Name this command
Truncate target table. Click the Details tab.
truncate table <%=snpRef.getTable("L","TARG_NAME","A")%>

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

g.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 11

Add the command to delete records in the target table. Name this command Delete
Target table. For Log Counter, select Delete. In the Transaction field, select
Transaction1. In the Commit field, select No Commit. Click the Details tab.
delete from <%=snpRef.getTable("L","TARG_NAME","A")%>

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 12

Add the command to insert new rows in the target table. Set the Log Counter to Insert.
In the Transaction field, select Transaction1. In the Commit field, select No Commit.
Note the odiRef.getOption method. It is used to get the option for setting the
number of thousands of records.
insert into
<%=snpRef.getTable("L","TARG_NAME","A")%>
(
<%=snpRef.getColList("", "[COL_NAME]", ",\n\t", "", "((INS)
and REW)")%>
)
select
<%=snpRef.getColList("", "[EXPRESSION]", ",\n\t", "",
"((INS) and REW)")%>
from
<%=odiRef.getObjectName("L", "SEED1", "W")%> S1,
<%=odiRef.getObjectName("L", "SEED1", "W")%> S2
where S2.SEED_ID<= <%=odiRef.getOption("THOUSANDS_OF_RECORDS")%>

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Add the command to Commit the transaction: /* commit */. Name this step
Commit. In the Transaction field, select Transaction1. In the Commit field, select
Commit. Click the Details tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

j.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 15

Add the final step to Drop the SEED table. Enter the following command:
drop table <%=odiRef.getObjectName("L", "SEED1", "W")%>
Name this step Drop SEED table. Click the Details tab and verify the steps, which are
shown in the following screenshots. Click the Save icon to save the KM and close the
tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

k.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 16

To add flexibility to your KM, you will create the options.


a. Right-click the IKM Oracle - Build Sample Data KM and select New Option. In the
Name field, enter TRUNCATE. In the Type field, select Check Box. Set the Default
value to True. In the Description field, enter Truncate the target datastore.
Save this option and close the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 17

Similarly, create another option. In the Name field, enter CREATE_TARGET_TABLE. For
the Type field, select Check box. Set the Default value to False. In the Description
field, enter Create Target Table. Save this option and close the tab.

c.

Create the option to control. In the Name field, enter THOUSANDS_OF_RECORDS.


For the Type field, select Value. Set the Default value to 10. In the Description field,
enter Thousands of records to generate. Save this option and close the tab.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Add the options to your KM steps. Open the IKM Oracle - Build Sample Data KMs for
editing. Click the Details tab. Double-click Create Target table.

e.

Scroll down and select Options. Deselect the Always Execute check box and select the
Create Target Table option. Click the Details tab.

f.

Double-click Truncate Target Table command. In the Options section, deselect Always
Execute and select TRUNCATE. Click the Details tab. Click Save and close the tab.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

You generate data and populate the SALES_SAMPLER datastore located in the
Oracle_RDBMS1 model. The Oracle Database comes with a package called
DBMS_RANDOM. The following functions will be used in this practice:

RandomNumber(Min, Max): Generates a random value (without decimals) between the


Min and Max values

RandomString(Format, Min, Max): Generates a random string with a minimum of Min


characters and a maximum of Max characters. The valid formats are:
o

'u', 'U' Returning string in uppercase alpha characters

'l', 'L' Returning string in lowercase alpha characters

'a', 'A' Returning string in mixed case alpha characters

'x', 'X' Returning string in uppercase alpha-numeric characters

'p', 'P' Returning string in any printable characters

RandomBool(): Generate a 0 or a 1

RandomDecimal(Min, Max): Generates a random value (with decimals) between the Min
and Max values

(MinDate, MaxDate): Returns a date between MinDate and MaxDate (make sure
MinDate and MaxDate are valid dates for Oracle)

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4.

To import user functions in your project Procedures, right-click User Function and
select Import. Navigate to C:\Labs\Files\xml_samples\UserFunctions and
click Open. Select RandomBool and click OK. In the Import Report window, click
Close.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

a.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 22

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Expand the RandomGenerators node and verify that the RandomBool function is
added to the tree.

c.

Repeat the previous steps to add RandomDate, RandomDecimal, RandomNumber,


and RandomString functions. Verify that these functions are added under the
RandomGenerators node.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Create an interface to generate data in the SALES_SAMPLER datastore.


a. On the Projects tab, expand Procedures > First Folder. Right-click Interfaces. Select
New Interface. Name your interface INT_SALES_SAMPLER. Click the Mapping tab.

b.

On the Models tab, expand the Oracle_RDBMS1 model, select the SALES_SAMPLER
datastore, and then drag it to the target section of the INT_SALES_SAMPLER interface.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

In the Target datastore section, select the SAMPLER_ID column. In Mapping


Properties, enter the following mapping expression on the Implementation tab:
RandomNumber(1,999). Click the SAMPLER_ID column again and in the Execute on
field, select Staging Area.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 27

Similarly, implement mapping for each column in the Target datastore. In the Execute
on field, select staging area for each column. Refer to the following table:
Column

Mapping

SAMPLER_ID
SAMPLER_NAME

RandomNumber(1,999)
RandomString('A', 1, 30)

SAMPLER_PROMOTION
SAMPLER_PRICE

case when RandomBool()=0 then 'FALSE'


else 'TRUE'
end
RandomDecimal(1,10000)

SAMPLER_RELEASE_DATE RandomDate('01-JAN-2000', sysdate)


Note: For mapping expressions, you can refer to the P3-1.txt file located in the
C:\Labs\Files\Text folder.
Your Target datastore should look as follows:

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Click the Flow tab. Click the Target datastore. In the Target Properties, view and
accept the default values of the options. Click the Save icon to save the interface.

f.

Click the Execute button

to execute your interface. Click OK. Click OK again.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Click the Operator tab. Expand All executions as shown in the following and verify that
the interface is executed successfully.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

g.

Click the Designer tab. On the Models tab, in the Oracle_RDBMS1 folder, right-click
Sales_Sampler datastore and select View data.
Verify that your target datastore is now populated with randomly generated data.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 31

Close ODI Studio. If open, close SQL Developer.

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

Practices for Lesson 3: Developing Knowledge Modules


Chapter 3 - Page 32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

Chapter 4

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 4:


Designing ODI Integration
Interfaces

Practices Overview
In Practice 4-1, you perform the steps to build an ODI interface that will load an XML file with a
constraint to the database table. The constraint will only allow data to be loaded where client
age is >= 21. Any rows that do not pass the constraint will be loaded to the error table on the
target database E_CLIENT.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 4: Overview

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 2

Overview
In this practice, you perform the following steps:
1. Create a new model for the RDBMS table CLIENT. Define the constraint for the table.
2. Import appropriate Load Knowledge Modules (LKM), Integrate Knowledge Modules (IKM),
and Check Knowledge Modules (CKM) into the project.
3. Create an integration interface for transformation from XML to RDBMS model. You enable
the CKM and error recycling.
4. Test your interface and verify data.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL developer are closed. If they are running, close ODI
Studio and SQL Developer.
b. If necessary, start the command utility and change directory to the following folder:
C:\Labs\ResetPractice\reset_4. Execute the following command:
resetRepo.bat. Press any key when prompted. Verify that this command executed
successfully.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 4-1: Creating an ODI Interface for XML to Database


Transformation with ODI Constraint and Error Recycling

Connect to ODI Studio and create a new model for the RDBMS table CLIENT:
Connect to the DEV_ODI_REPO Work Repository (User: SUPERVISOR, Password:
SUNOPSIS). Click the Designer tab.

a.

Open the Designer tab, then open the Models tab. Click New Model Folder and select
New Model. For model name, enter Oracle_TRG. Set Technology to Oracle. Use the
existing logical schema ODI_STAGE. Click the Reverse Engineer tab.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

For Context, choose Development. Retain the other default settings. Save
model and close the editor.

c.

Create the CLIENT datastore within the Oracle_TRG model by copying from the XML
model. Select and expand the XML_SRC model. Right-click the CLIENT table and
select Duplicate Selection. Click Yes in the Confirmation dialog box.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 5

your

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Drag the new duplicate Copy of CLIENT from the XML_SRC model to the
Oracle_TRG model. Expand the Oracle_TRG model and double-click the Copy of
CLIENT datastore to edit. Change the name to CLIENT. Click Save and close the
editor.
Note: No physical table is created on Oracle_TRG. When the Interface is run, it
creates the CLIENT physical table.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 6

During the duplication of the CLIENT datastore, the constraint for the XML file was also
copied. This constraint should be deleted. Expand Oracle_TRG > CLIENT >
Constraints. Right-click the CITY_CLIENT CITY constraint and click Delete.

f.

You need to set up a new constraint for the CLIENT table in the RDBMS datastore
CLIENT. To set up the ODI constraint on the CLIENT data store in Oracle_TRG
model, right-click Constraints and select New Condition. Specify the parameters of
the new constraint as shown in the table below. Save this constraint and close the
editor.

Parameter

Value

Name

AgeConstraint

Type

Oracle Data Integrator Condition

Where

cast(Client.age as numeric)>=21

Message

Client must be at least 21 years old

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

3.

Before the interface is created, the Load Knowledge Modules (LKM), Integrate Knowledge
Modules (IKM), and Check Knowledge Modules (CKM) need to be imported into the project.
To import these KMs, perform the following steps:
a. Open the Projects tab and expand the Knowledge Modules node. Right-click the
Loading (LKM) node and select Import Knowledge Modules. If not open, browse to
the C:\Oracle\Middleware\Oracle_ODI1\oracledi\xml-reference folder.
Select LKM SQL to Oracle. Click OK. Close the Import Report window.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Note: On first execution of the interface, the SQL will not validate until the table is
created.

Similarly, select the Integration (IKM) node and import IKM SQL Control Append
Knowledge module. Select the Integration (IKM) node and import IKM SQL Control
Append. Knowledge module. Expand Check (CKM) node and import CKM Oracle.
Refer to the screenshots below.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Create a new interface INT_LOAD_TBL_CLIENT. Set the Optimization context to


Development, and then click the Mapping tab.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Open the Models tab to drag the source and target to the interface. Drag the Client
datastore from XML_SRC model into the Sources container. Drag the Client datastore
from Oracle_TRG into the Target container. When Designer asks Do you want to
perform Automatic Mapping? click Yes.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 13

Select the CLIENT_ID column in Target Datastore. Scroll down the Target Column
Properties section and select the Key box to set the CLIENT_ID column to be the
key. Click the Flow tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 14

Click SRCSet0 (XML_GEO_DIM) and set the LKM option to LKM SQL to Oracle.

g.

Similarly, select Target (ODI_STAGE). Set the IKM for Target to IKM SQL Control
Append. Set Options as provided in the following table. Click the Controls tab.
Option

Value

RECYCLE_ERRORS

true

CREATE_TARG_TABLE

true

DELETE_ALL

true

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4.

On the Controls tab, leave the default values as shown on the screenshot. Click the
save icon to save your interface.

To execute and test your interface, perform the following steps:


a.

Click the Execute button


. Leave the execution settings as default. Click OK. When
the Information dialog box indicates that the session started, click OK.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

Open the Operator tab, expand All Executions, and then expand your session as
shown in the screenshot. Verify that the interface executed successfully:

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 18

To check data and recycled errors, perform the following steps:


a. Open Designer > Models tab. Right-click the source datastore CLIENT in XML_SRC
model and select View Data. Note that some clients have value for AGE less than 21
years old. These rows should not pass the constraint recycled in the error table.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 19

View data in the target datastore CLIENT in Oracle_TRG model. There are no records
for customers younger than 21 years old. These records did not pass the constraint.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 20

Right-click the CLIENT datastore in Oracle_TRG model, and select Control > Errors.
View recycled errors in your error table.

d.

Close ODI Studio. If open, close SQL Developer.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 4: Designing ODI Integration Interfaces


Chapter 4 - Page 22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Chapter 5

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 5:


Designing Advanced
Integration Interfaces

Practices Overview
In Practice 5-1, you create a temporary ODI interface for data transformation. You also create
another interface, which uses your newly created temporary interface as a source for
transformation. After that, you modify your interface to enable it to process data from multiple
datasets.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 5: Overview

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 2

Overview
In this practice, you perform the following steps:
1. Create a temporary interface, INT-TEMP_AGG_ORDERS.
Use datastores SRC_ORDERS and SRC_ORDER_LINES from the HSQL_SRC
model, joined on ORDER_ID.
Use SRC_CUSTOMER as a lookup table.

2.

3.
4.

Create a temporary target table, TEMP_AGG_ORDERS.

Aggregate some of its columns by using the MIN, MAX, and AVG functions.
Create the interface INT-TRG_SALES.
Use the temporary interface INT-TEMP_AGG_ORDERS as a source.
Use the datastore TRG_SALES as the target.
Execute INT-TRG_SALES and examine the rows inserted into TRG_SALES.
Create and test the new interface that loads data into the TRG_BULK_SALES table from
multiple datasets using the UNION operator.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL developer are closed. If they are running, close ODI
Studio and SQL Developer.
b. If necessary, start the command utility and change directory to the following folder:
C:\Labs\ResetPractice\reset_5. Execute the command: resetRepo.bat.
Press any key when prompted. Verify that this command executed successfully.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 5-1: Implementing ODI Integration with Temporary Interfaces

Develop an ODI Temporary interface.


a. If not connected, connect to the DEV_ODI_REPO Work Repository (User:
SUPERVISOR, Password: SUNOPSIS). Click the Designer tab.

b.

On the Projects tab, expand: Loads > HandsOn. Right-click Interfaces, and then
select New Interface. Name the new interface INT-TEMP_AGG_ORDERS. In the
Optimization Context field, select Development. For Staging Area, select Hypersonic
SQL: HSQL_DEMO_SRC. Click the Mapping tab.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

Open the Models tab. Expand the HSQL_SRC model, and drag SRC_ORDERS and
SRC_ORDER_LINES datastores from the model to the Source area.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 5

Drag the ORDER_ID column from the SRC_ORDERS datastore to the ORDER_ID
column in the SRC_ORDER_LINES datastore to create a Join. Select the Join icon.
Close the Messages - Log tab and view the Join properties.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 6

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Lookup icon to start the Lookup Wizard


. Ensure that your selected
Driving table is SRC_ORDERS. In the Lookup Table window, expand HSQL_SRC
model. Select the Lookup table, SRC_CUSTOMER, in the HSQL_SRC model. For the
Lookup table, edit the Alias to read: LKUP_SRC_CUSTOMER as shown in the following
screen. Click Next.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 8

Select the CUST_ID column in the Source table and the CUSTID column in the Lookup
table, as shown in the following screen, and then click Join. Click Finish.

g.

Now, you need to create a temporary target datastore. Drag the column CUST_ID from
the SRC_ORDERS table to the Target area. Click <Temporary Target DataStore>. In
the Temporary Target Properties, enter Name: TEMP_AGG_ORDERS, as shown in the
following screenshots:

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Drag the column ORDER_ID from SRC_ORDERS to the Target area. Then click this
SRC_ORDERS.ORDER_ID column in the target datastore. Select this column, and in the
Mapping Properties panel at the bottom of the window, edit the Implementation tab to
read: MIN(SRC_ORDERS.ORDER_ID). Scroll down to the Target Column Properties
section and rename this column to FIRST_ORDER_ID. Scroll back up the Property
Inspector, click the ORDER_ID column in Target Datastore and examine your results
thus far.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 11

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Again, drag the column Order_ID from SRC_ORDERS to the Target area. In the
Mapping Properties panel at the bottom of the window, edit the Implementation tab to
read: MAX(SRC_ORDERS.ORDER_ID). Scroll down and rename this column
LAST_ORDER_ID.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 13

Drag the column ORDER_DATE from SRC_ORDERS to the Target area. In the Mapping
Properties panel at the bottom of the window, edit the Implementation tab to read:
MIN(SRC_ORDERS.ORDER_DATE). Scroll down and rename this column
FIRST_ORDER_DATE.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

j.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 14

Similarly, drag the column ORDER_DATE again from SRC_ORDERS to the Target area.
Edit the mapping properties to read MAX(SRC_ORDERS.ORDER_DATE). Scroll down
and rename this column LAST_ORDER_DATE.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

k.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 15

In the Source area, expand the lookup datastore by clicking the plus sign in the upperleft corner of the lookup datastore, and then stretching the datastore longer until you
see all of its columns. Drag the FIRST_NAME column from the lookup table to the
Target area. In the Target area, click the FIRST_NAME column. Start the Expression
editor
, and then drag the LAST_NAME column from the left panel of the Expression
Editor to the expression area.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

l.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 16

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Properties section, click the


button to validate the expression. An ODI Information
message indicates that the SQL expression is valid. Click OK.
Note: You can find this expression in the file: C:\Labs\Files\Text\P5-1.txt

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

m. Edit the expression to read LKUP_SRC_CUSTOMER.FIRST_NAME || ||


LKUP_SRC_CUSTOMER.LAST_NAME, as shown next. Click OK. In the Mapping

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 18

Scroll down, and in the Target Column Properties, rename this column CUST_NAME.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

n.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 19

Drag the column QTY from the SRC_ORDER_LINES source datastore to the Target
area. Edit the mapping expression to read SUM(SRC_ORDER_LINES.QTY).

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

o.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 20

Drag the column AMOUNT from the SRC_ORDER_LINES source datastore to the
Target area. Edit the mapping expression to read AVG(SRC_ORDER_LINES.AMOUNT).
In the Target Column Properties, rename this column AVG_AMOUNT.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

p.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 21

Drag the column AMOUNT again from the SRC_ORDER_LINES source datastore to the
Target area. Edit the mapping expression to read SUM(SRC_ORDER_LINES.AMOUNT).
Rename this column SUM_AMOUNT.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

q.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 22

Drag the column PRODUCT_ID from the SRC_ORDER_LINES source datastore to the
Target area.

s.

In the Target datastore, click the SUM_AMOUNT column. In the Execute on section,
select Staging Area. Repeat this step for the six other target columns in which you
defined a function in the mapping expression. Refer to the following table to verify the
execution location. Your Target datastore should now look as shown in the screen.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

r.

Execution Location

SUM_AMOUNT

Staging Area

AVG_AMOUNT

Staging Area

CUST_ID

Source

CUST_NAME

Source

FIRST_ORDER_DATE

Staging Area

FIRST_ORDER_ID

Staging Area

LAST_ORDER_DATE

Staging Area

LAST_ORDER_ID

Staging Area

PRODUCT_ID

Source

QTY

Staging Area

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Column

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Flow tab. Verify the flow, and then click the Save button to save your
temporary interface. Verify that your temporary interface appeared in the tree view.
Close your interface tab.
Note the yellow color of your newly created temporary interface in the Designer
Navigators Projects tree view.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

t.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 26

Create a new interface, which uses the newly created temporary interface as a source.
a. In the Loads project, create a new ODI interface, INT-TRG_SALES, as shown next. In
the Optimization Context field, select Development. Open the Mapping tab.

b.

Drag the temporary interface, INT-TEMP_AGG_ORDERS, from the Projects tab to the
Source area.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

On the Models tab, expand Oracle Sales Application model, and drag the datastore
TRG_SALES from the Oracle Sales Application model to the Target Datastore area.
Click Yes to perform automatic mapping. Note that only three of the nine columns were
automatically mapped.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 28

In the Target Datastore, select the FIRST_ORD_DATE column, and then drag the
FIRST_ORDER_DATE column from the temporary interface in the source area to the
Implementation tab in the Mapping Properties area as shown below.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 29

Repeat the previous two-step process to map the remaining target columns to their
corresponding columns in the temporary interface in the Source area. Use the following
table and results screen as your guide:
First click this column in the Target
Datastore TRG_SALES:

Then drag this column from the Source area


down to the Implementation tab:

FIRST_ORD_ID

FIRST_ORDER_ID

LAST_ORD_ID

LAST_ORDER_ID

LAST_ORD_DATE

LAST_ORDER_DATE

AMOUNT

SUM_AMOUNT

PROD_AVG_PRICE

AVG_AMOUNT

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 30

In the Source panel, click INT-TEMP_AGG_ORDERS, scroll down to the Source


Properties section, and then select the Use Temporary Interface as Derived Table
(Sub-Select) check box.

g.

To view data derived from the temporary interface, right-click the temporary interface
and select Data. Close the Data Editor window.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 31

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Flow tab, click Target Datastore, and verify the flow of your interface. In the
Target Properties, set the DELETE_ALL option to true. Save the interface, and then
close the interface tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 33

Execute the interface INT-TRG_SALES and verify the execution results.


a. Execute the interface INT-TRG_SALES.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 34

Open ODI Operator Navigator and verify that the interface INT-TRG_SALES executed
successfully. Scroll down and open the task Integration - INT-TRG_SALES - Insert new
rows (step 35). Verify the number of inserts.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 35

In the Models tab in the Oracle Sales Application model, right-click the TRG_SALES
datastore, and select View Data. View the rows inserted in the target datastore.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 36

Create a new interface that loads data into the TRG_BULK_SALES table from multiple
datasets using UNION operator.
a. In Designer navigator, right-click Interfaces to create a new interface. Name this
interface INT-TRG_BULK_SALES. Open the Mapping tab.
Note: This interface will load TRG_BULK_SALES datastore with data from two
datasets the default dataset from the temporary interface INTTEMP_AGG_ORDERS and another dataset from the TRG_BULK_SALES datastore.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 37

Drag the temporary interface, INT-TEMP_AGG_ORDERS, from the Projects tab to the
Source area.

c.

From the Models tab, drag the datastore TRG_BULK_SALES from the Oracle Sales
Application model to the Target Datastore area. Click Yes to perform automatic
mapping. Note that only three of the nine columns were automatically mapped. Map
other columns as described in steps 3 d and 3 e.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 38

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

In the Source panel, click INT-TEMP_AGG_ORDERS, scroll down to the Source


Properties section, and then select the Use Temporary Interface as Derived Table
(Sub-Select) check box.

e.

Click the Add/Remove DataSet icon


icon

, and then click the Add new DataSet

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 39

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Enter the new dataset name: BULK_SALES. Select Operator: UNION. Close the
Datasets Configuration window.

g.

On the Mapping tab, select the BULK_SALES dataset tab. In the Design navigator
Models tab, drag the SRC_BULK_SALES datastore from the Oracle Sales
Application to the Source area of the interface. Click Yes to perform automatic
mapping.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 40

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 41

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 42

Open the Mapping tab again, click the BULK_SALES tab, and then save the interface.

j.

Click the Execute button


. In the Execution dialog box, select the Simulation check
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 dataset TRG_BULK_SALES with the UNION operator as shown
next.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 43

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

Execute interface INT-TRG_BULK_SALES (do not select the Simulation check box) and
verify the execution results.
a. Execute the interface.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 44

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

6.

Open the Operator. Verify that the session INT-TRG_BULK_SALES executed


successfully. Scroll down and open the task Integration INT-TRG_BULK_SALES Insert new rows (step 15). Verify the number of inserts in the target table. Note that the
result set is now combining data from both datasets as a result of UNION operator.
Close the Session task.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 45

Open the Designer. In Oracle Sales Application, Right-click the TRG_BULK_SALES


datastore and select View Data. Verify that this datastore is now populated with
combined data from the temporary interface INT-TEMP_AGG_ORDERS and
SRC_BULK_SALES datastore as a result of the UNION operator.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 46

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Close ODI Studio. If open, close SQL Developer.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 47

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 5: Designing Advanced Integration Interfaces


Chapter 5 - Page 48

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Chapter 6

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 6: Using


Variables in ODI

Practices Overview
In Practice 6-1, you create an ODI procedure and a package with variables to control execution
of the workflow with integration interfaces. The interfaces have been predefined for the purpose
of this practice.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 6: Overview

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 2

Overview
In this practice, you create a package for executing the number of interfaces and the procedure
for deleting records from the target tables. You define ODI variables that are used to control the
flow in the package.
You create the procedure PRD_CLEAR_TRG to delete records in the datastores TRG_SALES
and TRG_PRODUCT before running the interfaces INT_TRG_PROD_FAMILY and
INT_TRG_PRODUCT, which load the target tables TRG_PROD_FAMILY and TRG_PRODUCT
located in the Oracle Sales Application model. To organize the appropriate workflow, you create
the package PKG_LOAD_PRODUCT. The procedure PRD_CLEAR_TRG should be executed in the
package before running the interfaces to ensure that referential integrity is not violated.
You create numeric variable FLAG to count the number of records in the TRG_PRODUCT
datastore. Only when the value of this variable is greater than 0, then the procedure
PRD_CLEAR_TRG is executed in the workflow.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL Developer are closed. If they are running, close ODI
Studio and SQL Developer.
b. If necessary, start the command utility. Change directory to the following folder:
C:\Labs\ResetPractice\reset_6. Execute the command: resetRepo.bat.
Press any key when prompted. Verify that this command executed successfully.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 6-1: Using Variables in ODI Package

Create the PRD_CLEAR_TRG procedure that deletes data in the TRG_SALES and
TRG_PRODUCT tables in the Oracle sales Application model.
a.

If not open, log in to DEV_ODI_REPO and enter SUPERVISOR for the username and
SUNOPSIS for the password.

b.

On the Designer tab, click the Projects tab, and then select the Procedures node from
the Loads > HandsOn folder. Right-click the Procedures node and select the New
Procedure option.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

c.

Enter PRD_CLEAR_TRG in the Name field, and select Oracle as the Target
.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Technology. Click the Details tab, and then click the Add icon

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 5

In the Name Field, enter DELETE TRG_SALES. You edit fields in the Command on
Target tab. In the Schema field, select ORACLE_ORCL_LOCAL_SALES. In the
Context field, select Development. In the Command field, enter the following
statement:
DELETE FROM <%=odiRef.getObjectName("L", "TRG_SALES",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>
Note: For this and other commands used in this practice, refer to the file:
C:\Labs\Files\Text\P6-1.txt
You use the substitution method odiRef.getObjectName, which returns the
table name with run-time-dependent information, such as the Oracle schema
name that may vary depending on the context and topology. Select the Ignore
Errors check box. Click the Details tab.

e.

Click the Add icon. In the Name Field, enter DELETE TRG_PRODUCT. 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_PRODUCT",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>
Select the Ignore Errors check box. Click the Details tab, save the procedure and
close the editor.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Create a package, PKG_LOAD_PRODUCT, which runs:


1. The PRD_CLEAR_TRG procedure
2. The INT_TRG_PROD_FAMILY
3. The INT_TRG_PRODUCT
Note: These interfaces were precreated for the purpose of this practice.
a. On the Projects tab of the Designer Navigator, expand the Loads > HandsOn folder.
Right-click the Packages node and select the New Package option.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

Enter PKG_LOAD_PRODUCT in the Name field, and then click the Diagram tab. In the
Designer navigator tree view, expand the Interfaces node and Procedures node. Select
the PRD_CLEAR_TRG procedure from the tree view, and then drag it to the diagram
workbench. The step appears in the package.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 8

Repeat the operation for the INT_TRG_PROD_FAMILY and INT_TRG_PRODUCT


interfaces. The package should appear as follows:

d.

Rename your steps with the names of the tables loaded by the step. In the Diagram
window, click the step for the PRD_CLEAR_TRG procedure. Edit the Step name: CLEAR
TARGET TABLES, as shown in the following screenshot. In the diagram, click the step
again. The step is now renamed CLEAR TARGET TABLES.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Similarly edit the names of the other steps in the diagram, as follows:
Rename INT_TRG_PROD_FAMILY step as LOAD PRODUCT FAMILY and the
INT_TRG_PRODUCT step as LOAD PRODUCT.

f.

Click the Step After Success tool icon


on the Package toolbar. Click the CLEAR
TARGET TABLES step. Press and hold the left mouse button and move the cursor
over the LOAD PRODUCT FAMILY step. Then release the mouse button. A green
arrow appears between these steps. Repeat the same operation to connect LOAD
PRODUCT FAMILY step with LOAD PRODUCT step as shown below. When
completed, click the Free Choice tool icon
. That will cancel the Next Step in
Success mode. Click Save button to save this package.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

4.

Run this package and review its execution in ODI Operator.


Click the Execute package button
to run this package. Click OK in the Execution
window that appears, and then click OK again.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

a.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 11

5.

In the Operator Navigator, click the Refresh icon. In the session list, expand the All
Executions node. The session called PKG_LOAD_PRODUCT 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 interfaces that have been
executed.

Create a numeric variable called FLAG that counts the number of lines in TRG_PRODUCT.
This variable will control the execution of the procedure CLEAR TARGET TABLES. Only
when the table TRG_PRODUCT has some records, the procedure will be executed and
records in the tables TRG_SALES and TRG_PRODUCT will be deleted.
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.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Enter 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 the Save button to save the
variable. Close the FLAG variable tab.
SELECT COUNT(*) FROM <%=odiRef.getObjectName("L", "TRG_PRODUCT",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>

6.

Modify a package to have the CLEAR TARGET TABLES step running only if FLAG is
greater than 0.
a. Click the Diagram tab. In the project tree, expand the Variables node. Drag the FLAG
variable from the tree view to the diagram. Click the FLAG step 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.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 6: Using Variables in ODI

Chapter 6 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 15

c.

Right-click the Refresh Count product step and select First Step. Click the Next step
on the Package toolbar, and link the step Refresh Customer

Count to the step Flag >0? Using the same tool, link the step Flag > 0? to the step
CLEAR TARGET TABLES. Click the Next step on failure tool

on the Package

toolbar, and link the step Flag > 0? to the LOAD PRODUCT FAMILY step, as shown
below. Click Save to save the package. Close the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

on success tool

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 16

Run the new package and check if the Clear Target Tables step was executed.
a. Right-click the package PKG_LOAD_PRODUCT, and then select Execute. Click OK in
the Execution window, and then click OK when the Session started message
appears.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

7.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 17

In the Operator, verify that the latest session called PKG_14-2 appears as complete,
with a Delete Target Tables step executed.

c.

Open the Designer tab. If necessary, open the package PKG_LOAD_PRODUCT


again, and then click the Diagram tab. To delete records from the target tables, select
the CLEAR TARGET TABLES step, right-click, and select Execute Step. Click OK in
the Execution window, and then click OK when the Session started message
appears.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

In the Operator, verify that the latest session called CLEAR TARGET TABLES appears
as complete, with the CLEAR TARGET TABLES step executed.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Now, with records from the target tables having been deleted, execute the entire
package PKG_LOAD_PRODUCT again. Click OK in the Execution window, and then click
OK when the Session started message appears.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 20

Open the Operator and expand the latest session called PKG_LOAD_PRODUCT. Verify
that the Delete Target Tables step is no longer executed. Because the Product table
was emptied by the execution of the CLEAR TARGET TABLES step, the value of
variable FLAG >0? changes when refreshed, to false, and the CLEAR TARGET
TABLES step is no longer executed. Close the PKG_LOAD_PRODUCT tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 21

Overview
In some integration projects, a flat file needs to be exported into a relational table. In this
practice, you create the global variable FileName. Its value is used as a dynamic name of a flat
file, which is to be exported to a relational database table. To reference the flat file dynamically,
you edit the source datastore to point to the variable rather than having the resource file name
hardcoded. You create an interface to export a flat file to a relational table, and then create a
package with the variable and the interface. From the package, you generate a scenario. The
actual name of the flat file to be loaded into the relational table will be defined as a startup
parameter when your scenario is executed.

Your Tasks
1.

Create and edit the flat file.


a. Open the folder: C:\Labs\Files\Flat_files. Create a copy of the file
SRC_SALES_PERSON.txt as shown below. Rename the new file:
SRC_SALES_PERSON1.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 6-2: Using an ODI Variable as a Startup Parameter

Open the file SRC_SALES_PERSON1 with WordPad. Edit the file by deleting the last
record. Save and close the file.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Create a global variable FileName.


a. In Designer, open Global Objects accordion. Right-click Global_Variables, and then
select New Variable. In the Name field, enter FileName. The Datatype field should be
set to Alphanumeric. In the Keep History field, select Latest value. For now, leave
this tab open. You will continue to edit it in a couple steps.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

Default value is recommended for the variable. Its value depends on how the location
of the resource file is defined in the physical schema. Open Topology > Physical
Architecture > Technologies > File > FILE_GENERIC. Double-click the default physical
schema FILE_GENERIC.C:\Labs\Files\Flat_files. Verify that a path to the folder
containing your flat files is defined in the Directory fields as shown below. Because this
path to the folder is specified in the schema, you do not have to include it in the Default
Value field for the variable; you just need to specify the file name. Close the
FILE_GENERIC.C\Labs\Files\Flat_files tab.

c.

Return to the FileName variable tab. In the Default Value field, enter
SRC_SALES_PERSON.txt. Save and close the FileName variable tab.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Edit the source datastore to point to your variable FileName as a resource name.
a. Open the Models tab. Expand Flat_File_1 model. Double-click
SRC_SALES_PERSON(SRC_SALES_PERSON.txt) datastore to edit it.

b.

Open the Models tab. Expand Flat_File_1 model. Double-click


SRC_SALES_PERSON(SRC_SALES_PERSON.txt) datastore to edit it. Instead of the
hard-coded value, refer to your variable in the Resource Name field: #FileName, as
shown below. Save and close the tab. Note that the name of the datastore node in the
tree changed to SRC_SALES_PERSON(#FileName).

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

Create an interface to load the flat file into a relational database table.
a. Open the Projects tab. Expand Export Files > First Folder > Interfaces. Right-click
Interfaces and then select New Interface. In the Name field, enter INTTRG_SALES_PERSON_1. Click the Mapping tab.

b.

Select and drag the datastore SRC_SALES_PERSON(#FileName) to the Source


panel of the interface editor.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4.

Expand the Oracle_RDBMS1 model. Select and drag the TRG_SALES_PERSON


target datastore to the Target panel of the interface editor. In the Automap dialog box,
click Yes to perform automatic mapping.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 28

Select the DATE_UPDATED column in the Target Datastore. In the Implementation tab,
enter SYSDATE. In the Execute On section, select the Staging Area option. Click the
Flow tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 29

In the Flow tab, select the source datastore SrcSet0(FILE_GENERIC). Verify and
accept the default settings. Click Target (ODI_STAGE). In IKM Selector, select IKM
SQL Incremental Update. In the Options section:
For FLOW_CONTROL select false
For DELETE_ALL select true
Save the INT-TRG_SALES_PERSON_1 interface and close the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 30

Create the new package.


a. In the Projects tab, expand Export Files > First Folder > Packages. Right-click
Packages and then select New Package. In the Name field, enter PKGTRG_SALES_PERSON_1. Click the Diagram tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 31

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

Practices for Lesson 6: Using Variables in ODI

Chapter 6 - Page 32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Select the global variable FileName and then drag it to the diagram as shown below.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 33

Select the interface INT-TRG_SALES_PERSON_1 and drag it to the diagram. Select


Next Step on Success (OK) icon
. Click the variable step FileName and connect it
to the interface step INT-TRG_SALES_PERSON_1. When done, click the Free choice
icon

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 34

Click the variable step FileName to select it. In the Type field, select Declare Variable.
Save and close the PKG-TRG_SALES_PERSON_1 tab.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 35

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

To test your package, right-click the package PKG-TRG_SALES_PERSON_1 and select


Execute. Click OK in the Execution and Information dialog boxes.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 36

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Note: You may need to click the Refresh icon

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 37

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Open the Operator tab and verify that your package executed successfully.

Generate the scenario with the NameFile global variable as a startup parameter.
a. In the Projects tab, right-click the package PKG-TRG_SALES_PERSON_1. Select
Generate Scenario. Click OK. In the Scenario Variables window, accept the default
settings and click OK.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

6.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 38

To execute the scenario, expand Load Plans and Scenarios accordion. Right-click your
scenario and select Execute. Click OK. The Variable values window is displayed with
the default value of your variable.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 39

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

In the Variable values window, deselect the Last value check box. In the Value field,
enter the name of the file you edited: SRC_SALES_PERSON1.txt. Click OK. Click OK
again.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 40

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Open the Operator tab. Click the Refresh icon


executed successfully.

. Verify that your scenario is

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 41

Now, you can check the data inserted in the target datastore. Open the Models tab. In
the model Oracle_RDBMS_1, right-click the TRG_SALES_PERSON datastore and
select View Data. View and verify your data.

f.

Close ODI Studio. If open, close SQL Developer.

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

Practices for Lesson 6: Using Variables in ODI


Chapter 6 - Page 42

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Chapter 7

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 7:


Accelerating Development in
ODI with Groovy

Practices Overview
One of the great features in Oracle Data Integrator 11.1.1.6 is the integration of the scripting
language Groovy within the ODI user interface. In this practice, you explore how to create an
ODI project, topology, model, and an interface with Groovy.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 7: Overview

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 2

Overview
In this practice, you perform the following steps:
1. Create ODI project with Groovy script.
2. Create a topology and a new model with Groovy script.
3. Create ODI integration interface with Groovy.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL Developer are closed. If they are running, close ODI
Studio and SQL Developer.
b. If necessary, start the command utility. Change directory to the following folder:
C:\Labs\ResetPractice\reset_7. Execute the command: resetRepo.bat.
Press any key when prompted. Verify that this command executed successfully.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 7-1: Automating ODI Tasks with Groovy

Create an ODI project with Groovy script.


a. If not open, log in to ODI Studio as user SUPERVISOR with password SUNOPSIS.

b.

Groovy can be executed by executing a script. You can create a new one or open an
existing Groovy script. To create a new Groovy script, select Tools > Groovy > New
Script.

c.

You should see a new Groovy window appear in the IDE. Also, note that the green
Execute button
is enabled on the toolbar.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

Navigate to the following folder: C:\Labs\Files\Text, and open the text file
Create_Project_sample.txt:

import
oracle.odi.core.persistence.transaction.support.DefaultTransactionD
efinition;
import oracle.odi.domain.project.OdiProject;
import oracle.odi.domain.project.OdiFolder;
def createProject(projectName, projectCode, folderName)
{
txnDef = new DefaultTransactionDefinition();
tm = odiInstance.getTransactionManager()
txnStatus = tm.getTransaction(txnDef)
project = new OdiProject(projectName, projectCode)
folder = new OdiFolder(project, folderName)
odiInstance.getTransactionalEntityManager().persist(project)
tm.commit(txnStatus)
}
createProject("<Project Name>", "<Code>", "<Folder Name>")
e.

In the script, enter the values for parameters of Project Name, Project Code ,
and Folder Name parameters, as shown below:
Parameter

Value

Project Name

DATA WAREHOUSING

Code

EDW

Folder Name

INITIALIZATION

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Click the Execute button


executed.

to execute this Groovy script. Verify that the script is

g.

Open the Designer, and view your newly created Project. Expand
DATAWAREHOUSING > INITIALIZATION nodes and explore other nodes created in
this project tree.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

Click the Save ALL button to save your Groovy script. Navigate to the c:\Labs folder,
and create and open a new folder named Groovy. Name your Groovy script:
Create_Project_Warehousing. Close the Groovy editor.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 7

Create a new model and topology for using the Groovy script.
a.

Note the following methods and their parameters that you will use to create the model
and the topology:

createLogicalSchema:
contextCode: The ODI code for the context used to map the logical schema to the
physical
technologyCode: The ODI code for the technology
nameForLogicalSchema: The name for the logical schema to create
NameForDataserver: The name for the data server to create
userNameForAuthentication: The username for the connection to the data server
passwordForAuthentication: The password for the connection to the data server
urlForAuthentication: The URL for the connection to the data server
driverForAuthentication: The JDBC driver for the connection to the data server
schemaForAuthentication: The schema to use for the ODI physical schema
createModel:
logicalSchemaObject: The ODI logical schema object (instance of
ODILogicalSchema)
contextCode: The ODI context code for reverse engineering
nameForModel: The name for the model to create
codeForModel: The code for the model to create
Note: With these two methods or variations of them, you can easily construct your topology
objects and models. You will create a new model named ORACLE_WH and all of the
topology objects that will allow going straight to reverse engineering when the script has
been run.

To create the topology, enter:


lschema = createLogicalSchema("<Context>", "<Technology>",
"<Logical Schema Name>", "<Data Server Name>", "<Database User
Name>",
ObfuscatedString.obfuscate("<Database User Password>"), "<URL>",
"<Driver>", "<DB Schema used for ODI Physical Schema>")
In this example, you use the following parameters:
lschema = createLogicalSchema("GLOBAL", "ORACLE", "ORACLE_EBS",
"ORACLE_HQ_DEV", "ODI", ObfuscatedString.obfuscate("ODI"),
"jdbc:oracle:thin:@localhost:1521:orcl",
"oracle.jdbc.OracleDriver", "ODI")
To create a model, enter:
createModel(lschema, "<Context>", "<Model Name>", "<Model Code>")
Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

b.

Navigate to the C:\Labs\Files\Text folder and open the text file Create_ModelTopology_sample.txt. Edit the last two statements of file by inserting the
appropriate parameters. Refer to the table below.
Note: If you do not have enough time, you can also use a preconfigured file
Create_Model-Topology from the same folder: C:\Labs\Files\Text.
Topology
Parameter

Value

Context

GLOBAL

Technology ORACLE
Logical
Schema
Name

ORACLE_EBS

Data
Server
Name

ORACLE_HQ_DEV

Database
User Name

ODI

Database
User
Password

ODI

URL

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

Driver

oracle.jdbc.OracleDriver

Schema
used for
ODI
Physical
Schema

ODI

Model
Parameter

Value

Context

GLOBAL

Model
Name

ORACLE_WH

Model
Code

ORACLE_WH

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

In this example, you use the following parameters:


createModel(lschema, "GLOBAL", "ORACLE_WH", "ORACLE_WH")

Copy the configured file into the Groovy editor and execute the script. Verify that the
script executed successfully.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 10

Open the model tab and verify that your ORACLE_WH model has been created.
Right-click the ORACLE_WH model and select Reverse Engineer. View the datastore.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 11

f.

4.

Open the Topology tab. In Physical Architecture, expand Oracle Technology and find
your newly created Data server and Physical Schema.

.
Click the Save button and save your new Groovy script in the C:\Labs\Groovy
folder. Name your Groovy script Create_Model_Topology_Warehousing. Close
your Groovy editor.

Create a new ODI interface using Groovy script. The following Groovy script creates a
simple interface, which performs data transformation from the source datastore to the target
datastore.
Note: You will create this interface with the default knowledge modules and the context
(Global).

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Open the Global Objects tab and expand the Global Knowledge Modules node.
Import the following Knowledge Modules. Refer to the screenshots provided below.
LKM SQL to Oracle
CKM Oracle
IKM Oracle Incremental Update
Note: When the Import Report window is displayed, close it.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

a.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 13

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Topology tab and select Contexts. Double-click the Global context. Select the
Default check box to make this context default. Save Global and close the editor.

c.

Navigate to the file C:\Labs\Files\Text\Create_Interface_sample.txt and


open this file with WordPad. View the script and note the following variables:
// Define variables:
def project = new String("<target project code>") // The target
project code
def folder = new String("<folder in the target project>") //
Folder in target project
// Define file with interfaces info:
def file = new File('<path to the file with interfaces info>')
// The text file containing information about one or more
interfaces to be created

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

You create the new interface in the project and use the model and topology you have
created in steps 1 and 2. Open the Groovy editor. Copy the script from the text file and
paste it into the Groovy editor.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 17

Edit the script by entering the following values from the table below:
Variable

Value

project

EDW

folder

INITIALIZATION

File

C:/Labs/Files/Text/Interfaces.txt

Note: If you do not have time, you can use the following preconfigured file:
C:\Labs\Files\Text\Create_Interface.txt

f.

Open the file that contains information about the interface (or interfaces) you are going
to create: C:\Labs\Files\Text\Interfaces. In the file, you should have the
following parameters, separated by comma.
<Interface Name>,<Source Model>,<Source Datastore>,<Target
Model>,<Target Datastore>

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Parameter

Value

Interface
Name

INT_BLK_SALES

Source
Model

ORACLE_WH

Source
Datastore

SRC_BULK_SALES

Target
Model

ORACLE_SALES_APPLICATION

Target
Datastore

TRG_BULK_SALES

Note: You can create multiple interfaces with one Groovy script by entering more lines in
this file.
g. Run Groovy script and verify that your interface INT_BLK_SALES is successfully
created in the project DATA WAREHOUSING.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Refer to the table below to verify the parameters in the file:

Open the interface with editor. Click Mapping to view the mapping. Click the Flow tab
to verify the flow.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 20

Execute the interface INT_BLK_SALES. In the Context field select Global. Open the
Operator tab and verify the execution results as shown below:

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

Save your Groovy script in the c:\Labs\Groovy folder. Name this script
Create_Interface. Click Save. Close the Groovy editor.

k.

Close ODI Studio. If open, close SQL Developer.

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

Practices for Lesson 7: Accelerating Development in ODI with Groovy


Chapter 7 - Page 22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

j.

Chapter 8

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 8:


Working with Complex Files
in ODI

Practices Overview
In this practice, you explore the Complex File technology in ODI. The Complex File adapter
allows ODI to read flat files with various formats like complex Cobol copybooks, multirecord
format files, and so on. Usually, those files often require some preprocessing. This can be
avoided in ODI with this Complex files technology. Complex files are accessed through the
Oracle Data Integrator Driver for Complex File. This JDBC driver is installed with Oracle Data
Integrator and requires no other installed component or configuration.
To enable the Complex files technology, you have to have the following connection information:
The location of the native schema (nXSD) file associated with your native file
The location of the native complex file

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 8: Overview

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 2

Overview
In this practice, you perform the following steps:
1. View the input complex file and the native schema (nXSD).
2. Define the topology to enable connection to this complex file.
3. Create and reverse-engineer a new model for the complex file.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL Developer are closed. If they are running, close them.
b. If necessary, start the command utility and change the directory to the
C:\Labs\ResetPractice\reset_8 folder. Execute the resetRepo.bat
command. Press any key when prompted. Verify that this command is executed
successfully.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 8-1: Configuring ODI Topology and ODI Model with Complex
Files

View the complex input file and the native schema (nXSD) file, which you will use with
Complex Files technology.
a. If not open, log in to ODI Studio as user SUPERVISOR with password SUNOPSIS.

b.

Navigate to the C:\Labs\Files\Complex Files folder and open the


Purchase_sample.txt and Purchase_schema.xsd files with WordPad. Note the
root element in Purchase_schema.xsd file: invoice.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

The Purchase_sample.txt file is an invoice and stores line items as well as


information about the seller (Oracle) and purchaser (Company One). You can see that
this file contains different types of record formats as well as different delimiters.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Define the topology to enable connection to this complex file.


a. Like every source and target in ODI, you first need to define a Data Server. In ODI
Studio, open the Topology tab. In Physical Architecture, expand the Complex File
technology node. Right-click Complex File and then select New Data Server. Name
this new data server as PURCHASE_SAMPLE_CPLX_FILE.

b.

Click the JDBC tab. The Complex File technology uses a JDBC driver to read the
original input file as well as the metadata definition of this complex file (generated by
using the Native Format Builder, a SOA component). To select driver, click the
magnifying glass and then select JDBC driver:
oracle.odi.jdbc.driver.file.complex.ComplexFileDriver.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

Here, you can see the path, which is automatically inserted in the JDBC URL.
However, you still need to edit it to point to your input file as well as the path to its
nXSD definition.
Note: Handling Complex File in ODI is similar to using the XML technology.

d.

You input the path for the Purchase_sample.txt file and metadata definition file
Purchase_schema.xsd, which are located in the
C:\Labs\Files\Complex_Files folder. Edit the URL to point to the input file and to
the xsd file as shown below.
Note: Highlighted are the sections, which you enter in the URL. You enter invoice as
the root element of the Purchase_schema.xsd file.
jdbc:snps:complexfile?f=C:\Labs\Files\Complex_Files\Purchase_sam
ple.txt&d=C:\Labs\Files\Complex_Files\Purchase_schema.xsd&re=inv
oice
Note: You can also find this preconfigured URL in the P8-1.txt text file located in
C:\Labs\Files\Text.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Test connection:

f.

Create a new Physical schema for this Dataserver as shown in the following
screenshot. For Schema and Work Schema, you select PURCH. Save the physical
schema. Click OK.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Open the Logical Architecture tab. Expand Technologies > Complex File and create
new Logic Schema named Purchase_Sample_CPLX_FILE as shown in the following
screenshot. Connect this Logical schema to the Physical schema
PURCHASE_SAMPLE_CPLX_FILE. PURCH in all contexts. Save this logical schema.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

g.

After you have defined the connectivity to your complex file, open the Designer tab and
define the metadata for this file. Open the Models tab and create New Model. Name
this model as Complex Files. Select Complex File technology. In the Logic Schema
field, select the Purchase_Sample_CPLX_File logical schema. Save your model.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4.

Reverse-engineer your complex files model.


a. In the Models tab, view your new Complex File model.

b.

Right-click this model and select Reverse-engineer.

c.

Expand this complex file model and you can see that five datastores have been
created:
INVOICE represents the file itself

LINE_ITEM stores the information about each purchase

SELLER contains the seller information

PURCHASER contains the purchase information and ADDRESS stores the


addresses of both the seller and the purchaser.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

Expand LINE_ITEM datastore to view the columns. Right-click LINE_ITEM and select
View Data. Close editor windows.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Close ODI Studio. If open, close SQL Developer.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 13

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

Practices for Lesson 8: Working with Complex Files in ODI


Chapter 8 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Chapter 9

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 9:


Integration of ODI in
Enterprise Environment and
SOA

Practices Overview
In these practices, you configure the ODI Java EE Agent with an existing WLS domain and
monitor your ODI environment using Enterprise Manager 11g, and ODI Console.
You learn how to:
Expose an ODI scenario as a Public web service
Modify and invoke the web service to execute the scenario with Java EE Agent
Integrate ODI within a SOA and invoke the ODI scenario from the BPEL process

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 9: Overview

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 2

Overview
In this practice, you perform the steps needed to configure the ODI Java EE Agent with an
existing WLS domain and monitor your ODI environment using Enterprise Manager 11g and
ODI Console.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL Developer are closed. If they are running, close ODI
Studio and SQL Developer.
b. If necessary, start the command utility, Change directory to the following folder:
C:\Labs\ResetPractice\reset_9. Execute the command: resetRepo.bat.
Press any key when prompted. Verify that this command executed successfully.

2.

Create and configure the ODI Java EE Agent to run on the existing WebLogic domain,
SOA_ODI_domain.
Note: This domain was precreated for this practice.
a. In Topology Navigator, open Physical Architecture, and then create a new ODI
Agent. Name this agent OracleDIAgent. Set the port to 8002 and Host to localhost.
Verify that the web application context is set to oraclediagent, as shown 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. Port 8002 is one that is used with WebLogicmanaged server odi_server1.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 9-1: Integrating ODI in the Enterprise Environment

Open Logical Architecture and 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. Click Save to save your agent
definition. Close the logical agent OracleDIAgent editing tab.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Start the WebLogic Server domain.


a. Select the shortcut Start WLS SOA_ODI_domain from the desktop by double-clicking
the icon:

b.

Verify that SOA_ODI_domain started in RUNNING mode. Minimize (but do not close)
this Admin server command window.
Note: It may take 1 or 2 minutes to start WebLogic Server.

c.
d.

Start WebLogic-managed servers: SOA_server1 and odi_server1.


In the command shell, change directory to the directory of the WLS Home:
C:\Oracle\Middleware\user_projects\domains\SOA_ODI_domain\bin.
Execute the command StartManagedWeblogic soa_server1. For Username,
enter weblogic. For password, enter welcome1. It will take a minute or two for the
server to start up and reach RUNNING mode. Verify that your managed server is
started in RUNNING mode.
Note: It may take 1 or 2 minutes to start soa_server1.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

To start the odi_server1 managed server, change directory to WLS Home


C:\Oracle\Middleware\user_projects\domains\SOA_ODI_domain\bin,
and then execute command StartManagedWeblogic odi_server1. For
Username, enter weblogic. For password, enter welcome1. The server will take a
minute or two to start up and reach RUNNING mode. Verify that your managed server
is started in RUNNING mode.
Note: It may take 1 or 2 minutes to start odi_server1.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Minimize (but do not close) this odi_server1 command window.

4.

Return to ODI Topology Navigator in ODI Studio. If necessary, open the Physical
Architecture tab and 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 dialog box, click OK.

Use Enterprise Manager to monitor the WebLogic Server environment.


a. Start the browser and enter http://localhost:7001/em. Log in to Enterprise
Manager. For User Name, enter weblogic. For Password, enter welcome1. On the
Accessibility Preference screen that follows, click Continue.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

With Enterprise Manager, 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. Verify that both managed servers
soa_server1 and odi_server1 are up and running.

c.

Drill down into ODI objects by expanding ODI in the left panel. Expand the ODI node.
Then expand MASTER REPOSITORY. Click Master Repository to view the details on
your agents.
Note: Your information may differ from the information provided on these screens.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Under MASTER REPOSITORY node, click localagent to view the details on your
standalone agent.

e.

Click the OracleDIAgent node in the left panel to see the Java EE Agent information.

f.

Expand the Application Deployments node, and then click


oraclediagent(odi_server1). View the WebLogic Server application deployment
information.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Use ODI Console to explore your ODI environment.


Note: Your information may differ from the information provided on these screens.
a. In the browser, click Logout to exit Enterprise Manager. Enter
http://localhost:8002/odiconsole to start the Oracle Data Integrator Console.
To log in, enter SUPERVISOR as the User Id and enter SUNOPSIS as the Password.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

In the left panel, click the Design Time tab. Expand Projects, Models, and Topology
as shown below:

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 12

Select the Loads project, and then click the View icon:

d.

Scroll down and click the HandsOn folder link. Click the Interfaces tab. Explore the
interfaces created in your Loads project.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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.

f.

Similarly, explore models in your Work Repository. To explore the datastores, scroll
down and select the Global submodel name. Scroll down and view the datastores.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

When you have finished exploring, log out of ODI Console and close the browser.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 16

Overview
In this practice, you create a new ODI scenario, modify a web service, and invoke the Web
service to execute the scenario.
1. Create and execute a new scenario, INT_TRG_SALES_PERSON.
2. Create a new package, OdiInvokeWebService.
3. Use the OdiInvokeWebService tool from the toolbox to create the corresponding step in
the package.
4. Define parameters of the web service by using the Advanced dialog box and the SOAP
Editor.
5. Invoke your web service from the SOAP Editor to execute the scenario
INT_TRG_SALES_PERSON.
6. View the response and verify the execution results.

Your Tasks
1.

Generate a new scenario for the interface.


Note: You should have both WebLogic-managed servers soa_server1 and odi_server1
up and running.
a. If necessary, connect to your ODI Studio, In Designer, open the Projects tab, expand
the Export Files project > First folder > Interfaces. Right-click INTTRG_SALES_PERSON and select Generate Scenario. Enter name
INT_TRG_SALES_PERSON in the Name field, and then click OK. Open the Load Plans
and Scenarios tab and verify that the scenario was generated.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 9-2: Exposing an ODI Scenario as a Web Service

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Important Note: Your version of the generated scenario can be different from the one
shown in the screenshot. Memorize your version. It will be used in future steps.

Right-click the INT_TRG_SALES_PERSON scenario and execute your newly created


scenario, as follows. For Agent, select your Java EE Agent: OraceDIAgent. Click OK
to confirm the execution.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 19

2.

View the results of the execution in Operator Navigator. Click Refresh. Expand Agent
> OracleDIAgent node. The INT_TRG_SALES_PERSON session should appear as
complete.

.
Create a new package by using the OdiInvokeWebService tool.
a. On the Projects tab, expand the Export Files project > First Folder. Right-click
Packages and select New Package. Enter TRG_SALES_PERSON_PKG in the Name
field, and then click the Diagram tab.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

In the Toolbox panel, click the Internet tab, scroll down to the OdiInvokeWebService
tool. Click the OdiInvokeWebService tool and then click the empty panel on the right.
An OdiInvokeWebService tool step appears in the package.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 21

Click the Free choice tool on top of the client and then select the step just added
(OdiInvokeWebService 1). View the properties panel at the bottom of the studio client.
If the properties panel does not appear, expand the size of the client window
(downwardly) to reveal it.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 22

Click the Advanced button on the General Tab under Properties.

e.

In the Properties panel, retain the default name OdiInvokeWebService 1 for the Step
name field. Scroll down and define parameters in the Properties panel as follows:
Parameter

Value

WSDL URL

- Leave blank -

Port Type

- Leave blank -

Operation

- Leave blank -

XML Request

- Leave blank -

Request File

- Leave blank -

Storage Mode for Response File

FILE APPEND

File Encoding for Response File

ISO8859_1

XML Encoding for Response File

ISO-8859-1

Response File

C:/TEMP/WebServiceToolStep

Response File Format

SOAP

HTTP User

- Leave blank -

HTTP Password

- Leave blank -

Execution Timeout (ms)

- Leave blank -

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

.
Click the Advanced button. A new window opens. Enter
http://localhost:8002/oraclediagent/OdiInvoke?wsdl in the Web
Service Description File (WSDL) URL field. Click the Connect to WSDL button .
The appropriate port OdiInvokePortType is automatically detected and the available
operations are displayed on the left.
Note: You can find this URL in the following text file: C:\Labs\Files\Text\
P9-1.txt.

Select the invokeStartScen operation from the panel on the left. Click the Editor tab at
the bottom of the middle panel. Widen the middle panel, if necessary, to see the Name
and Value columns. Enter the parameters in the request parameter fields as provided
in the following table. Your SOAP Editor panel should appear as follows
Note: Press Enter each time to confirm your entries.
Parameter

Value

<OdiUser>

SUPERVISOR

<OdiPassword>

SUNOPSIS

<WorkRepository>

WORKREP

<ScenarioName>

INT_TRG_SALES_PERSON

<ScenarioVersion>

<Insert your version>

<Context>

DEVELOPMENT

<Synchronous>

true

LogLevel

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

g.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Source tab to view the scenario request. Click the Remove Blank Optional
Elements icon
to remove all blank optional elements from the query. This is
necessary to construct a valid query. The request should be as follows.
Note: You can also select the Clean up before execution check box
. This option
automatically deletes the empty optional elements in the SOAP request.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 27

Invoke your Web service.


a.

To invoke your Web service, click the Invoke Web Service


icon. The response is
displayed in the right panel of the editor. Verify that your Web service processed
successfully, as shown in the following screenshot:

b.

Click OK to close the Advanced Editor window. Click the Save button to save your
package and close the tab.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 28

In ODI Operator, verify that the INT_TRG_SALES_PERSON scenario successfully


executed.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Overview
This practice teaches you how to integrate ODI with a BPEL process within SOA.
1. Create and test a new scenario to execute a package previously created in Practice 5-1.
2. Configure and deploy the BPEL process to invoke ODI web service, which will execute the
scenario.
3. Execute, test, and monitor execution of the web service and ODI scenario.

Your Tasks
1.

Your WebLogic Admin server and WebLogic-managed server soa_server1 should be


running at this point. Open the Enterprise Manager (EM) and verify that your
SOA_ODI_domain servers are up and running. If not running, start the WebLogic Server
domain as described in Practice 9-1, Steps 2, 3.
Note: If not started, start EM as described in Practice 9-1, Step 4.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 9-3: Integrating ODI with a BPEL process Within SOA

Generate a new scenario for the package PKG_LOAD_PRODUCT, which you created in
Practice, 6-1.
a. If necessary connect to your ODI Studio. In Designer, open the Projects tab, expand
the Loads project > HandsOn folder > Packages. Right-click PKG_LOAD_PRODUCT
and select Generate Scenario. Enter name PKG_LOAD_PRODUCT in the Name field,
and then click OK

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

Important Note: You version of the generated scenario can be different from the one
shown in the screenshot. Memorize your version. It will be used in future steps.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 31

In the Scenario Variables window, accept Use Selected and click OK. Open the
Load Plans and Scenarios tab and verify that the scenario was generated.

c.

Right-click the PKG_LOAD_PRODUCT scenario and execute your newly created


scenario, as follows. For Agent, select your Java EE Agent: OraceDIAgent. View the
current value of variable, and then click OK to confirm the execution.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 33

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

View the results of the execution in Operator Navigator. Click Refresh. Expand Agent
> OracleDIAgent node. The session PKG_LOAD_PRODUCT should appear as
complete.

.
3.

Create the BPEL process that will call your ODI scenario.
a. Open JDeveloper by double-clicking the Shortcut to jdeveloper on the desktop.
Ensure that you have only double-clicked once to prevent additional copies from
loading (the interface may take a minute to load).

Note: When you start JDeveloper for the first time, it may take longer to open the GUI.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 34

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

You should see the partially preconfigured BPEL process ODIInvokeBPEL.bpel. This
BPEL process is located in the ODI_SOA_HOL application under ODI_Invoke > SOA
node. Note the steps in the BPEL process. The odiinvokebple_client partner link
should be present in your diagram.
Note: If not open, click View > Application Navigator to view Applications, Projects, and
other resources.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 35

In this step, you will be adding the ODI scenario created in Step 3 to the BPEL
process. In the Partner Links lane, right-click and select Create Partner Link.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 36

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

When prompted with the Create Partner Link dialog box, rename Partner Link as
ODIAgentWS and enter the following WSDL URL:
http://localhost:8002/oraclediagent/OdiInvoke?wsdl

Note: You can find this URL in the following text file: C:\Labs\Files\Text\P9-3.txt.

Click the down arrow to Partner Link Type and select Yes to the Partner Link Type
dialog box.

Change the Partner Link Type to requestPortType_PL. Change Partner Link Role to
requestPortType_Role.
The Create Partner Link dialog box should look like this. Click OK.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 37

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

From the Component Palette on the right, choose BPEL Constructs > Web Service >
Invoke and drag the construct to the design area after the PrepareODIParam step.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 38

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 39

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Drag the right arrow of the Invoke step to the ODIAgentWS partner link.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 40

In the Edit Invoke dialog box, enter a new Name CallInvoke. Select
invokeStartScen as the Operation. Next to the Input variable, click the lookup icon. In
the Variable Chooser dialog box, select CallInvoke_invokeStartScen_InputVariable.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

g.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 41

Next to the Output variable, click the lookup icon. In the Variable Chooser dialog box,
select CallInvoke_invokeStartScen_OutputVariable.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

h.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 42

Click OK.
Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 43

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

The Edit Invoke dialog box should look like the following:

The input variable for the CallInvoke step has already been initialized in
PrepareODIParam.
However, you need to edit some of these parameters. Double-click the
PrepareODIParam step to edit it. To edit the values for input parameters, right-click the
parameter and select Edit From expression as shown below.
Important Note: You have to use your version of the generated scenario.
Parameter

Value

<OdiUser>

SUPERVISOR

<OdiPassword>

SUNOPSIS

<WorkRepository>

WORKREP

<ScenarioName>

PKG_LOAD_PRODUCT

<ScenarioVersion>

<Your Scenario
Version>

<Context>

DEVELOPMENT

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 44

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

i.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 45

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

You Assign step should look as follows:

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

j.

Click OK.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 46

Drag another Invoke after PrepareODIGetStatus:

l.

Drag the right arrow of the Invoke onto the previously defined ODIAgentWS partner
link.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 47

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

k.

Choose the operation getSessionStatus.


Next to the Input variable, click the lookup icon. In the Variable Chooser dialog
box, select ODIGetStatus__ getSessionStatus_InputVariable.
Next to the Output variable, click the lookup icon. In the Variable Chooser
dialog box, select ODIGetStatus_ getSessionStatus
_OutputVariable.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

m. In the Edit Invoke dialog box:


Enter a new Name ODIGetStatus.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 48

n.

The input variable for the CallInvoke step has already been initialized in
thePrepareODIGetStatus step. Double-click this step to review and verify data
entered for the variables. You dont need to edit this step. Click OK.
Note: The session ID in the output of the StartScenario call is used for input here.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 49

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

The Edit Invoke dialog box should look like this. Click OK.

The BPEL Process ODIInvokeBPEL.bpel should look as follows:

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 50

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

o.

4.

Deploy your BPEL process project to the application server and test your web service.
a. Right-click the ODIInvoke project, and then select Deploy > ODIInvoke. In the Deploy
ODIInvoke dialog box, select Deploy to Application Server. Click Next.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 51

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click the Save All button to save your project.

In the Deploy Configuration section, select the Overwrite any existing composites
with the same revision ID check box. Click Next.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 52

In the Select Server section, select the server SOA, and click Next.

Click Next, and then click Finish.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 53

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 54

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 55

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Test your composite SOA application.


a. Open web browser with Enterprise Manager. If necessary, enter the following URL to
log in to Enterprise Manager 11g:
http:// localhost:7001/em
For User Name, enter weblogic. For Password enter welcome1.

b.

Expand Farm_SOA_ODI_domain > SOA > soa-infra (soa_server1) > default. Click
ODIInvoke [1.0]. Click the Test button as shown below. In the next screen, click Test
Web Service.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 56

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

5.

Verify that ODI invocation was successful as shown below:

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 57

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

In ODI Studio, open the Operator. Expand Agent > OracleDIAgent node, and then
verify that your ODI scenario was successfully executed by the Java EE Agent:

e.

Close ODI Studio. If open, close SQL Developer.

Stop the managed WebLogic Server and WebLogic Admin Server.


a. Run the command utility and change the directory to:
C:\Oracle\Middleware\user_projects\domains\SOA_ODI_Domain\bin
To stop the managed WebLogic Server, execute the command:
stopManagedWeblogic soa_server1
For username, enter: weblogic. For password, enter welcome1. Verify that the
managed server is stopped.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 58

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

6.

d.

To stop WebLogic Server, from the same directory execute the command:
stopWebLogic
For username, enter weblogic. For password, enter welcome1.
Verify that WebLogic Server is stopped.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 59

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA


Chapter 9 - Page 60

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Chapter 10

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 10:


Enhancing ODI Security

Practices Overview
Oracle Data Integrator can use Oracle Platform Security Services (OPSS), a standards-based
and portable security framework for Java applications, to authenticate its users against an
external Identity Store, which contains enterprise users and passwords. Such an identity store is
used at the enterprise level by all applications, in order to have centralized user and password
definitions and Single Sign-On (SSO). In such a configuration, the ODI master repository only
contains references to these enterprise users. This authentication method is called External
Authentication.
Practice 10-1 provides a step-by-step walkthrough of the process of implementing ODI external
authentication with OID LDAP Server.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practices for Lesson 10: Overview

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 2

Overview
In this practice, you perform the following steps:
1. Use SQL Developer to create an RDBMS (11g) Schema/User for a new ODI Master
Repository.
2. Create a new OID user with Directory Services Manager.
3. Edit the ODI jps-config.xml file to point to your external OID LDAP server.
4. Run the script to set up the credentials for idstore.oid LDAP in the identity store.
4. Create a new ODI master repository referencing a user in the external OID LDAP server.
5. Switch the Master Repository authentication mode between external and internal
authentications.

Your Tasks
1.

Reset your practice environment.


a. Verify that ODI Studio and SQL Developer are closed. If they are running, close them.
b. If necessary, start the command utility, change the directory to the
C:\Labs\ResetPractice\reset_10 folder. Execute the resetRepo.bat
command. Press any key when prompted. Verify that this command is executed
successfully.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Practice 10-1: Implementing ODI External User Authentication

You have to create the RDBMS schema or user (Oracle 11g) for the new Master repository.
The schemas can be created by executing the following SQL commands:
a. If not open, start SQL Developer and connect to the ORCL connection with the
password as oracle1.
b. The schemas can be created by executing the following SQL command:
create user oiduser identified by oiduser
default tablespace users temporary tablespace temp;
Note: In this command, the password to connect to the oiduser user is oiduser.
Note: You can find this and other commands in the P10-1.txt text file located in the
C:\Labs\Files\Text folder.

c.

Verify that the OIDUSER schema is created under the Other Users node.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

In SQL Developer, execute the command to grant necessary privileges to OIDUSER:


Grant connect, resource to oiduser;
When done, close SQL Developer.

3.

Start the WebLogic server and external LDAP server (OID).


Run the command utility and change the directory to
C:\Oracle\Middleware\user_projects\domains\IDMDomain\bin.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

To start the Admin WebLogic server, execute the command:


startWebLogic.cmd
For User and Password, enter weblogic and welcome1, respectively. When the
WebLogic server starts in the RUNNING mode, minimize (but do not close) the
command window.
Note: It may take 1 or 2 minutes to start the WebLogic server.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

a.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 6

To start managed WebLogic server, open the new command window and change to
the same directory:
C:\Oracle\Middleware\user_projects\domains\IDMDomain\bin
Execute the startManagedWeblogic wls_ods1 command.
For User and Password, enter weblogic and welcome1, respectively.
Verify that the managed server is started in the RUNNING mode. Minimize (but do not
close) the command window.
Note: It may take 1 or 2 minutes to start managed WebLogic server.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 7

Create a new LDAP user with Directory Services Manager.


a. To connect to DSM, start the browser and enter the URL:
http://edvmr1p0:7005/odsm/

b.

Click Connect to Directory and then select the OID-oid1 connection. For password,
enter welcome1. Click Connect.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 8

Click the Data Browser tab. In the Data Tree, expand Root >
dc=Myrealm>cn=Users. Right-click cn=orcladmin and then select Create Like.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Select the person tab and click Next. In Mandatory Properties, enter the new
administrative username as supervisor1 in first two fields (cn and sn) as shown in
the following screenshot. In the Relative Distinguished Name field, select cn. Click
Next.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 11

For the Optional Properties, enter the values provided in the following table. Click Next.
Click Finish.
Note: You may need to scroll down to view all properties.
Field:

Value:

givenName

supervisor1

mail

supervisor1@oracle.com

orclActiveStartDate

Leave default value

orclSAMAccountName

supervisor1

uid

supervisor1

userPassword

SUNOPSIS1

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

e.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 12

5.

Verify that the new LDAP user supervisor1 was created and shown in the Data tree:

The configuration to connect to and use the identity store is contained in an OPSS
Configuration file called the jps-config.xml file. This file is already preconfigured to
point to your external OID LDAP Server.
a. Copy the jps-config.xml file from the C:\Labs\Files\LDAP folder and paste it
into the following folder:
C:\Oracle\Middleware\Oracle_ODI1\oracledi\client\odi\bin

b.

In the same folder. Open the jps-config.xml file with WordPad and verify that you
have the following four sections in the file and view their properties. Close the jpsconfig.xml file.
Note: This file is preconfigured for the purpose of this practice. Do not edit this file.
1) <!-- ldap provider -->
2)
3)

<!-- JPS OID LDAP Identity Store Service Instance -->


<!-- Basic Authenticator Login Module -->

4)

<!-- The default JPS context -->

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

f.

Property

Value

"subscriber.name"

"dc=myrealm"

"idstore.type"

"OID"

"cleartext.ldap.credentials
"

"cn=orcladmin:welcome1"

"ldap.url"

"ldap://edvmr1p0.us.oracle.com:3060
"

<extendedProperty>
user.search.bases

cn=users,dc=myrealm

</extendedProperty>
group.search.bases

cn=groups,dc=myrealm

</extendedProperty>
"username.attr"

"uid"

</extendedProperty>
"groupname.attr"

"cn"

Note: Your machine name in ldapurl property is edvmr1p0. The port number of your
LDAP server in this configuration is 3060.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

To ensure proper configuration, verify that the parameters in OID LDAP Identity
Store Service Instance section are based on the values provided in the following
table.
Note: You do not need to edit these parameters.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Also, verify that you have the following three sections in your file.
Note: You do not need to edit them.

Create the new ODI master repository referencing a user in the external OID LDAP server.
a. If not started, start ODI Studio, and then open New Gallery by choosing File > New. In
the New Gallery, in the Categories tree, select ODI. Select from the Items list the
Master Repository Creation Wizard. Click OK. The Master Repository Creation Wizard
appears.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

6.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 16

In the Master Repository Creation Wizard, select the browse icon of the JDBC Driver
and then select Oracle JDBC Driver. Click OK. Edit the JDBC URL to read
jdbc:oracle:thin: localhost:1521:orcl.
Note: Do not copy and paste this URLthat may cause some errors!
Enter the User as oiduser and the Password as oiduser. For the DBA user, enter
system, for DBA Password, enter oracle1. Click the Test Connection button and
verify successful connection. Click OK. Click Next on the Master Repository Creation
Wizard screen.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 17

In the Authentication window, select Use External Authentication. (If you had
selected Use ODI Authentication, you would have been using ODI's internal
authentication.) For Supervisor User, enter supervisor1 and for Supervisor
Password, enter SUNOPSIS1, as they exist in your external datastore. Click Next.
Note: Usernames and passwords are case-sensitive in ODI.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 18

In the Password Storage window, select Internal Password Storage, and then click
Finish. It takes 2 or 3 minutes to create the Master repository. When the Master
Repository is successfully created, you will see the Oracle Data Integrator Information
message. Click OK. The ODI Master repository is now created.
Note: It may take a few minutes to create ODI Master Repository.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 19

Create the new ODI Master Repository Login.


a. You connect to the ODI Master repository by creating a new ODI Master Login. Open
the New Gallery by choosing File > New. In the New Gallery, in the Categories tree,
select ODI. From the Items list, select Create a New ODI Repository Login.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

7.

Configure Repository Connections with the parameters from the following table. In the
Oracle Data Integrator Connection section, enter the User and Password of the
authenticated user in your external store. In this example, you specify SUPERVISOR1
as the User and SUNOPSIS1 as the Password from the OID LDAP Server. In the
Database Connection (Master Repository) section, enter the User and Password of
the schema user you created for the master repository. In this example, you specify
oiduser as the User and oiduser as the Password. To enter the JDBC URL, click
the button next to the JDBC URL field and select
jdbc:oracle:thin:@<host>:<port>:<sid> as shown in the screenshot, and then
edit the URL. Select the Master Repository Only button. Click the Test button. Verify
successful connection and click OK. Click OK to save the connection.
ODI Connection section field

Value

Login Name

LDAP LOGIN

User

supervisor1

Password

SUNOPSIS1

Database Connection (Master


Repository) section field

Value

User

oiduser

Password

oiduser

Driver List

Oracle JDBC Driver

Driver Name:

Oracle.jdbc.OracleDriver

Url:

Jdbc:oracle:thin:@localhost:1521:orcl

Note: Do not copy and paste in the JDBC URL field. This may cause problems with
entering a valid URL string. Instead, open the drop-down menu and select the correct URL
from the list. Edit the URL in the URL field.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Click Connect to Repository. Log in to connection LDAP Test Login created above by
using the supervisor1/SUNOPSIS1 credentials.
Note: For the purpose of this practice, you are not connected to your development
work repository used for other exercises.

If not open, open ODI Security Navigator. Expand the Users accordion. Doubleclick User supervisor1 to open it. You can now see that the SUPERVISOR user has
External GUID, which comes from the OID LDAP server. Close the supervisor1 tab.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Switch the Master repository authentication mode between external and internal
authentications.

a. Disconnect Oracle Data Integrator Studio from the repository. From the ODI main
menu, select Switch Authentication Mode.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

8.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 26

Select LDAP LOGIN. Specify the JDBC connectivity details of your Oracle Data
Integrator master repository as defined when you connect to the Master Repository.
For User and Password, enter oiduser and oiduser, respectively.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 27

9.

In this screen, you are prompted to switch to internal authentication. You must
provide and confirm a password for the new SUPERVISOR user that the wizard will
automatically create in the repository. For Password, enter twice: SUPERVISOR. Click
Finish. The Authentication mode is changed.

Re-activate users after switching to Internal Authentication.


a. Reconnect to the Oracle Data Integrator master repository. Select LDAP LOGIN. Enter
the new user name SUPERVISOR, with the password you have provided in the wizard:
SUPERVISOR.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

Note that in the Security tab, the user supervisor1 is shown as deactivated. Rightclick user supervisor1 to edit it.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 29

Deselect Expiration Date. Click the Change Password button and enter the new
password for this user: SUNOPSIS1. Click the Save icon.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 30

Click the Refresh icon. Verify that your user supervisor1 is now shown as active.
Close the supervisor1 tab. Disconnect LDAP LOGIN.

10. Now, you may want to experiment with switching back to external authentication mode.
Remember that ODI users with the same name as users in external LDAP server (for
example, user supervisor1) will be mapped automatically. Users that cannot be mapped
will be inactivated in ODI. In this step, you will switch your actual ODI work repository
environment to external authentication mode.
a. To connect to your practice environment, select the Login Name as DEV_ODI_REPO.
For User, you enter SUPERVISOR and for Password, enter SUNOPSIS.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 31

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

Select the Security tab, and then select New User, as shown below.

c.

The new user name should match the user name in LDAP server. You enter
supervisor1. For password, enter supervisor1. Select the Supervisor Access
Privileges check box. Click the Save button.
Note: The password supervisor1 is still the internal user password and it will be
dropped during switch.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

b.

Disconnect from your work repository by selecting ODI > Disconnect


DEV_ODI_REPO. From ODI menu, select Switch Authentication Mode.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

d.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 33

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

In the Switch Authentication Mode window, select the Login: DEV_ODI_REPO. For
User and Password, enter dev_odi_repo and oracle1, respectively. Click Next and
then click Finish. In the Information window, click OK.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 34

Verify that you have an access to your work environment. In the Security tab, select
Users accordion. Note that user supervisor1 is now active, but user SUPERVISOR
has been deactivated during the switch to the External Authentication mode.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 35

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

To verify that you have successfully switched your work repository environment to
External Authentication mode, log in DEV_ODI_REPO with your LDAP user credentials.
For User and Password, enter supervisor1 and SUNOPSIS1, respectively.

b.

To stop managed WebLogic server, execute the command:


stopManagedWeblogic wls_ods1
For User and Password, enter weblogic and welcome1, respectively.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 36

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

11. Stop managed WebLogic server and Admin server.


a. Run the command utility and change the directory to:
C:\Oracle\Middleware\user_projects\domains\IDMDomain\bin

To stop the WebLogic server, from the same directory, execute the stopWebLogic
command.
For User and Password, enter weblogic and welcome1, respectively.
Verify that WebLogic server is stopped.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 37

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

c.

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

Practices for Lesson 10: Enhancing ODI Security


Chapter 10 - Page 38

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.