Professional Documents
Culture Documents
Oracle ODI 12c Student Guide 2
Oracle ODI 12c Student Guide 2
Oracle ODI 12c Student Guide 2
D48459GC40
Edition 4.0
January 2010
D65207
Author Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
Viktor Tchemodanov Disclaimer
This document contains proprietary information and is protected by copyright and other intellectual
Technical Contributors property laws. You may copy and print this document solely for your own use in an Oracle training
and Reviewers 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,
Christophe Dupupet perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part
Benoit Gagnon without the express authorization of Oracle.
Denis Gray The information contained in this document is subject to change without notice. If you find any
Art Hetherington 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.
Taj-ul Islam
Gerry Jurrens Restricted Rights Notice
FX Nicolas 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:
Nagavalli Pataballa
Pallavi Rajan U.S. GOVERNMENT RIGHTS
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these
Usha Ramanathan training materials are restricted by the terms of the applicable Oracle license agreement and/or the
Noel Schneider applicable U.S. Government contract.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be
Editor trademarks of their respective owners.
Amitha Narayan
Graphic Designer
Rajiv Chandrabhanu
Publishers
Jayanthy Keshavamurthy
Giri Venugopal
Contents
1 Introduction
Course Objectives 1-2
Objectives 1-3
Agenda of Lessons 1-4
Oracle Data Integrator: Introduction 1-6
What Is Oracle Data Integrator? 1-7
Why Oracle Data Integrator? 1-8
Conventional Integration Process: ETL 1-10
EL-T 1-11
ODI Architecture and Components 1-13
ODI Architecture 1-14
ODI Components: Overview 1-16
Graphical Modules 1-17
ODI Designer 1-18
ODI Operator 1-19
ODI Topology Manager 1-20
ODI Security Manager 1-21
What Is an Agent? 1-22
Types of ODI Agents 1-23
Run-Time Components: Example 1-24
Metadata Navigator 1-25
Oracle Data Integrator Repositories 1-26
ODI Repositories 1-27
Master and Work Repositories 1-28
Repository Setup: Example 1-30
Components: A Global View 1-31
Quiz 1-32
Summary 1-34
iii
Creating a Work Repository 2-12
Connecting to the Work Repository 2-14
Changing the Work Repository password 2-16
Managing ODI Agents 2-17
ODI Physical Agent 2-18
Creating a Physical Agent 2-19
Launching a Listener Agent 2-20
Launching a Scheduler Agent 2-21
Launching a Web Agent 2-22
ODI Agent Parameters 2-23
Stopping the ODI Agent 2-25
Load Balancing: Example 2-26
Quiz 2-28
Summary 2-29
iv
Important Note 5 3-32
Defining Contexts 3-33
Mapping Logical and Physical Resources 3-34
Agents in Topology 3-36
Agents 3-37
Important Note 6 3-38
Infrastructure with Agents: Example 3-39
Defining Agents: Example 3-40
Defining a Topology: Best Practices 3-41
Planning the Topology 3-42
Matrix of Logical and Physical Mappings 3-43
Quiz 3-44
Summary 3-46
v
Oracle Data Integrator Projects: Overview 5-5
How to Use ODI Project in Your Work? 5-6
Creating a New Project 5-7
Using Folders 5-8
What Is a Folder? 5-9
Creating a New Folder 5-10
Organizing Projects and Folders 5-11
Understanding Knowledge Modules 5-12
What Is a Knowledge Module? 5-13
Types of Knowledge Modules 5-14
Which Knowledge Modules Are Needed? 5-15
Knowledge Modules: Examples 5-16
Importing a New Knowledge Module 5-17
Replacing Existing KMs 5-18
Exporting and Importing Objects 5-20
Exporting and Importing 5-21
Exporting an Object 5-22
Importing an Object 5-23
ID Numbers: Overview 5-24
Import Types 5-25
Choosing the Import Mode 5-26
Using Markers 5-27
What Is a Marker? 5-28
Tagging Objects with Markers 5-29
Removing Markers 5-30
Marker Groups 5-31
Project and Global Markers 5-32
Creating a Marker Group 5-33
Quiz 5-34
Summary 5-36
vi
What Is Reverse Engineering? 6-16
Methods for DBMS Reverse Engineering 6-17
Other Methods for Reverse Engineering 6-18
Standard Versus Customized Reverse Engineering 6-19
Note 6-20
Creating Models 6-21
How to Create a Model by Reverse Engineering 6-22
Step 1: Creating and Naming a New Model 6-23
Note 6-24
Step 2: Defining a Reverse Engineering Strategy 6-25
Step 3: Starting the Reverse Engineering Process 6-27
Selective Reverse Engineering 6-28
Step 4: Fleshing Out Models 6-29
Quiz 6-30
Summary 6-32
vii
An Overview of the Process 7-30
Exploring Your Data 7-31
Displaying the Contents of a Datastore 7-32
Viewing the Distribution of Values 7-33
Analyzing the Contents of a Datastore 7-34
Constructing Business Rules 7-35
Defining Business Rules in ODI 7-36
From Business Rules to Constraints 7-37
Deducing Constraints from Data Analysis 7-38
Testing a Constraint 7-39
Auditing a Model or Datastore 7-40
How to Review Erroneous Records 7-41
Quiz 7-42
Summary 7-44
viii
What Is an Interface? 8-30
Creating a One-to-One Interface 8-31
Creating and Naming an Interface 8-32
Defining the Target Datastore 8-33
Important Note 8-34
Defining the Source Datastore 8-35
What Is a Mapping? 8-36
Defining the Mappings 8-37
Valid Mapping Types 8-38
Saving the Interface 8-39
Executing the Interface 8-40
Quiz 8-41
Summary 8-43
9 Designing Interfaces
Objectives 9-2
Multiple Sources and Joins 9-3
Multiple Source Datastores 9-4
Creating a Join Manually 9-5
Advanced Joins 9-6
Types of Joins 9-7
Setting Up a Join 9-8
Filtering Data 9-10
Filters in ODI 9-11
Defining a Filter Manually 9-12
Setting Up a Filter 9-13
An Overview of the Flow in ODI Interface 9-14
Flow 9-15
What Defines the Flow? 9-16
The Scenario 9-17
The Basic Process 9-18
Selecting a Staging Area 9-19
What Is the Staging Area? 9-20
Case Study: Placing the Staging Area 9-21
Important Note 9-22
How to Specify the Staging Area 9-23
Case Study: Flow 1 9-24
Case Study: Flow 1 in ODI 9-25
Case Study: Flow 2 9-26
Case Study: Flow 2 in Oracle Data Integrator 9-27
Case Study: Flow 3 9-28
Case Study: Flow 3 in ODI 9-29
Configuring Filters, Joins, and Mappings 9-30
Options for Filters, Joins, and Mappings 9-31
ix
Setting Options for Filters, Joins, and Mappings 9-32
How to Disable a Transformation 9-33
How to Enable a Mapping for Inserts or Updates 9-34
Execution Location 9-35
Execution Location and Syntax 9-36
Why Change the Execution Location? 9-37
How to Change the Execution Location 9-38
Selecting the KM 9-39
Which KMs for Which Flow? 9-40
More About KMs 9-42
Identifying IKMs and LKMs 9-43
IKMs and LKMs: Strategies and Methods 9-44
Flow: Example 1 9-45
Flow: Example 2 9-46
Flow: Example 3 9-47
How to Specify an LKM 9-48
How to Specify an IKM 9-49
Common KM Options 9-50
Quiz 9-51
Summary 9-52
x
Business Rules in Interfaces 11-4
Business Rule Elements 11-5
More Elements 11-6
Using Variables 11-7
Using a Variable in Code 11-8
Binding Versus Substitution 11-10
Note: Case-Sensitivity 11-11
Using Sequences 11-12
Referring to Sequences 11-13
Note: Sequences Updated by Agent 11-14
Using Sequences in Mappings Correctly 11-15
Using ODI Sequences in Mappings 11-16
Populating Native Identity Columns 11-17
Note 11-18
Using User Functions 11-19
What Is a User Function? 11-20
Why Use User Functions? 11-21
Properties of User Functions 11-23
Using User Functions 11-24
How to Create a User Function 11-25
Defining an Implementation 11-26
Syntax and Implementations 11-27
User Functions at Design Time 11-28
User Functions at Run Time 11-29
Note: Functions in Execution Log 11-30
Using Substitution Methods 11-31
Substitution Methods: Examples 11-34
The Expression Editor 11-35
Modifying Knowledge Modules 11-37
Description of KM Steps 11-38
Details of the Steps 11-39
Setting KM Options 11-40
Developing Your Own KM: Guidelines 11-41
Using RKM for Customized Reverse Engineering 11-43
Quiz 11-45
Summary 11-46
xi
Creating a Blank Procedure 12-8
How to Create a New Procedure 12-9
Adding Commands 12-10
Creating a Command 12-11
Arranging Steps in Order 12-13
Which Parameters Should Be Set? 12-14
Valid Types of Commands 12-15
More Elements 12-16
Why Use a Source Command? 12-17
Adding Options 12-18
Types of Options 12-19
How to Create a New Option 12-20
How to Make a Command Optional 12-21
Using an Option Value in a Command 12-22
Running a Procedure 12-23
Procedure Execution 12-24
Using Operator to View Results 12-25
Quiz 12-26
Summary 12-28
xii
How to Create a Procedure Step 13-27
Model, Submodel, and Datastore Steps 13-28
How to Create Model, Submodel, and Datastore Steps 13-29
Models, Submodels, and Datastore Steps 13-30
Variable Steps 13-32
How to Create a Variable Step 13-33
Variable Steps 13-34
Controlling the Execution Path 13-36
Controlling Execution 13-37
Error Handling 13-38
How to Create a Loop 13-39
The Advanced Tab 13-40
Quiz 13-41
Summary 13-43
xiii
15 Enforcing Data Quality with ODI
Objectives 15-2
Data Quality 15-3
Why Data Quality? 15-4
When to Enforce Data Quality 15-5
Data Quality in Source Applications 15-6
Data Quality Control in the Integration Process 15-7
Data Quality in the Target Applications 15-8
Business Rules for Data Quality 15-9
Data Quality Business Rules 15-10
From Business Rules to Constraints 15-11
Enforcing Data Quality 15-12
Data Quality System: Overview 15-13
Static and Flow Controls: Differences 15-14
Data Quality Control: Properties 15-15
Synchronous Control 15-16
Enforcing Data Quality with ODI 15-17
What Is Data Quality Control? 15-18
What Is a Constraint? 15-19
What Can Be Checked? 15-20
How to Enforce Data Quality in an Interface 15-21
1. Enabling Static/Flow Control for an Interface 15-22
Setting Up Static/Flow Control 15-23
How to Enable Static/Flow Control 15-24
2. Setting the Options 15-25
How to Set the Options 15-26
3. Selecting Which Constraints to Enforce 15-27
How to Select Which Constraints to Enforce 15-28
How to Select Which Constraints to Check 15-29
Differences Between Control Types 15-30
4. Reviewing Erroneous Records 15-31
How to Review Erroneous Records 15-32
Quiz 15-33
Summary 15-35
xiv
Consistent CDC Journalizing 16-10
Consistent CDC: Infrastructure 16-11
Setting Up Journalizing 16-12
Setting CDC Parameters: Example 16-13
Arranging the Datastores in Order for Consistent Set Journalizing: Example 16-14
Adding a Subscriber: Example 16-15
Starting Journal: Example 16-16
Journalizing Status 16-17
Viewing Data/Changed Data: Example 16-18
Using Changed Data 16-19
Quiz 16-21
Summary 16-23
18 Using Web Services and Integration of Oracle Data Integrator with SOA
Objectives 18-2
Web Services in Action 18-3
Two Types of Web Services 18-4
xv
Using Data Services 18-5
What Are Data Services? 18-6
Generation of Data Services 18-7
Data Services in Action 18-8
Setting Up Data Services 18-9
1. Setting Up Data Sources in a Web Services Container: Example 18-11
2. Configuring the Topology 18-13
2. Configuring the Topology: Example 18-14
3. Setting Up the Model 18-17
3. Setting Up the Model: Example 18-19
4. Generating, Deploying, and Testing Data Services: Example 18-24
Testing Data Services: Example 18-27
Using Public Web Services 18-31
What Are Public Web Services? 18-32
Public Web Services in Action 18-33
Installing Public Web Services 18-34
Using Public Web Services 18-36
A Simple SOAP Request for the OdiInvoke Web Service: Example 18-37
Note 18-38
A Simple SOAP Request for the OdiInvoke Web Service: Example 18-39
A Simple SOAP Response for the OdiInvoke Web Service: Example 18-40
Invoking Web Services 18-41
OdiInvokeWebService Tool 18-42
Invoking a Web Service: Example 18-44
Processing a Web Service Response 18-49
Integration of ODI with SOA 18-52
ODI with SOA: Example 1 18-53
Oracle Data Integrator with SOA: Example 2 18-54
Example 2: Creating an ODI Error Hospital with BPEL Human Workflow 18-55
Quiz 18-61
Summary 18-63
xvi
Using ODI Packages
Objectives
In this lesson, you learn how to create packages that can run interfaces and other tools automatically.
By now, you should have a good understanding of the ODI interfaces. These are the most important
objects that will be used in a package.
In this lesson, you focus on using these interfaces to create a complete data integration job. An ODI
package contains all necessary steps to run a complete job. You should also learn how to create
several kinds of steps, and then run the package.
What Is a Package?
An ODI package defines a complete data integration job. A job is made up of many smaller steps.
Normally, you design these steps first, such as the ODI procedures and interfaces. Other steps are
created in the package.
Toolbar
Diagram
Oracle Data
Integrator
Toolbox for tool step
ODI Interface step
tools (selected)
Interface step
(selected)
Package Diagram
This is how the Diagram tab of a package appears.
The Diagram represents the steps of the package as icons, with green links representing the success
path between them. The currently selected step is highlighted by a box around it. The first step is
marked with a green arrow.
At the bottom, you see the properties of the currently selected step. You can rename the step here.
Different properties are displayed for different types of steps.
In Toolbox at the left, all the tools that you can use are categorized. You can also access the tools
without categorization under All. Tools are covered in the next slide.
On the toolbar, there are buttons for sequencing packages. This is examined more closely in the next
slide. You can move or undock the Toolbox and the Properties pane to improve your workspace.
Select Rearrange
Next step on selection Shows errors
success in the diagram
Delete selection
Next step
Duplicate
on failure
selection
Steps
The most useful package steps for most situations are either interfaces or ODI tools. Interfaces, as
you know by now, transfer data from one or more source datastores into a target datastore. ODI tools
perform a much wider variety of tasks, including sending email or waiting for data. There are other
steps, such as updating or testing variables, but they are not covered here.
Steps are created by dragging objects onto the package diagram, which is found on the Diagram tab.
They are then sequenced by creating links from one step to the next.
Note
Unlike interface steps, tool steps are simple commands that call the macros of ODI tools. You cannot
reuse a tool step, but you can duplicate it.
To create reusable ODI tool commands, you must create a procedure. You can place several tool
commands inside a single procedure. Then, you can reuse the same procedure in many different
packages. You can, of course, duplicate steps within the same package, if you want to perform the
same action multiple times. But, they are copies of each other and so are maintained separately.
Sequencing Steps
Every package must have a first step. This is where the execution of a package always begins. To
define the first step, select a step, right-click and select First Step.
After that, the sequence of steps splits in two directions: If the step executes successfully, the
execution follows the green “ok” link. If the step fails, it follows the red “ko” link. Success is defined
by the step returning a code 0. Any return code other than 0 is treated as a failure.
First step
Step on
failure
A Simple Package
This is an example of a simple package. When it is executed, the first step “Load Country Table” is
executed. If it fails, the step “Mail the Admin” is carried out. You can see this by the red “ko” path,
which indicates the path to follow after a step fails. The package then terminates. If it succeeds,
however, the execution proceeds to “Load City Table.” This is shown by the green “ok” path. Again,
if it fails, ODI sends an email to the administrator. Lastly, if the first two steps succeed, the “Archive
Files” step is carried out. This also sends an email if it fails.
Note: A package can be designed to end at many different points depending on which steps succeed
or fail. But there must always be one starting step. In this example, the package may end after
archiving some files, or it may end after sending an email to the administrator. But it always starts by
loading the Country table.
Executing a Package
Now that you have created a package, you want to execute it. This is similar to executing an
interface. In this case, however, each interface or tool step becomes a step in the session.
Procedure Steps
You begin by looking at procedure steps. Unlike other types of steps, procedures are primarily
intended to be used in packages. You should, therefore, be familiar with how to do this.
Datastore
Submodel
Model
defined for the model is used.
– If using customized reverse engineering,
you must set the RKM options
on the Options tab. Reverse engineer
Datastore
Submodel
Model
• Journalize step type:
– The journalizing
type and strategy
Reverse engineer
(JKM) set for the
model is used in the Journalize
step.
– The journalizing Check
mode
(simple/consistent
set) determines
which options are
available.
– JKM-specific
options are set on
the Options tab.
Variable Steps
You now look at placing variables in packages. There are four different types of variable steps that
you can create this way.
Variable Steps
The four types of variable steps are as follows:
• The Declare Variable step is often placed at the start of a package. It explicitly defines the
variable that is used in an interface, procedure, or other package step. In general, variables are
implicitly declared when they are referred to in a package. However, in certain complex
situations, this cannot be guaranteed. Using this kind of step also improves readability, as you
can visually display all the variables that are used in the package.
The variable’s value may not be its default value when the step is executed. In this case, the
variable’s persistence type determines what happens. If it is “historized” or “last value,” the
Declare Variable step does not change the stored value. If it is “not persistent,” however, the
stored value is discarded. It is then replaced by the default value of the variable.
• The Set Variable step is straightforward and can be used to perform two different actions. You
can assign a specific value to a variable. For example, you can set an error counter to zero. You
can also increment the value of a variable. For example, you can count the number of times a
particular step is executed by putting a Set Variable step just before it with an increment of one.
Controlling Execution
After each step in a package is executed, there are two possible choices for the next step:
• If the step is executed correctly, the “success” path is taken.
• If the step fails, the “failure” path is taken.
• If the next step does not exist, the execution of the package ends. For example, if a step fails
and there is no failure step, the package stops. Similarly, if a step succeeds but does not define
the next step on success, execution stops.
There are two distinct ways of making a branch:
• You can use the success and failure paths leading out of each step.
• You can use an Evaluate Variable step. This performs a comparison on a variable and takes one
of two different paths depending on the result of the comparison.
Some examples of these control structures are covered in the next slide.
Error Handling
As stated earlier, steps have a failure path that is taken if the step fails. Failure, in this context, has
several different causes.
• Interfaces fail when a fatal error occurs, which prevents them from executing completely or
when the source datastore cannot be found on the database. However, they also fail when the
predetermined maximum number of errors is exceeded during flow control.
• For example, you can specify a limit of 10 errors while processing an interface. If more than 10
errors are detected, the interface stops and is considered to have “failed.”
• Procedures and other steps fail when a fatal error occurs, which prevents them from continuing.
Note, for procedures, you can specify that errors for a particular step should be ignored. These
will not cause the procedure to fail as a whole.
You should take into account the possibility of errors for every step. It is possible for every type of
step to fail, so you should build error handling to respond to these situations.
A common solution is to link the failure path of every step to a common step that emails an
administrator. You may want to consider adding error handling for the case where the mail server is
down. For example, you can then write a file to a log file.
3.
1. 2.
Package Loop 4.
Answer: b
There are two distinct ways of making a branch:
• You can use the success and failure paths leading out of each step.
• You can use an Evaluate Variable step. This performs a comparison on a variable and takes one
of two different paths depending on the result of the comparison.
The Refresh Variable step is not used to create a branch.
Answers: a
Explanation: Variable steps are created by dragging an object (variable) into the package. This
creates a reference, or link, rather than a copy of the object. It means that modifying the original
variable will affect the behavior of the package.
Summary
In this lesson, you learned about:
• Adding procedures to packages to create procedure steps. These are straightforward as there is
only one type of procedure step.
• Adding models, submodels, or datastores to packages. Here, you discussed three choices:
reverse engineering steps, static data check steps, and steps for reconfiguring journalization. Be
careful with these because they can make major changes to your models.
• Variable steps. You learned that you can declare, set or increment, refresh, and evaluate a
variable by selecting the appropriate type.
• Using variable steps to create complex package workflows. You also learned that there are two
different ways of branching: using the success and failure paths of any step, or using the
“Evaluate Variable” step type. By combining the “Set Variable” step with the “Evaluate
Variable” step, you can repeat steps in a loop.
Objectives
This lesson focuses on releasing your Oracle Data Integrator (ODI) projects for production.
The goals for this lesson are:
• To understand how to generate deployable scenarios from your ODI objects
• To know how to generate, execute, and export scenarios
• To release generated scenarios so that they can be put into production
Scenarios
The first section of this lesson describes the scenarios and how they allow you to release your work.
What Is a Scenario?
Remember that an interface, procedure, or package can be modified at any time. A scenario is
created by generating code from such an object. It thus becomes frozen, but can still be executed on a
number of different environments or contexts. Because a scenario is stable and ready to be run
immediately, it is the preferred form for releasing objects developed in ODI.
Properties of Scenarios
Scenarios are created by generating code from ODI objects. This process is similar to compiling a
program from source code. They are easily deployed on any repository and executed with an agent
having access to the repositories.
Like compiled programs, scenarios cannot be modified. A scenario that works today will work
tomorrow as well.
Because scenarios represent snapshots in the development of an object, they have a name and a
version. You can retain several versions of the same scenario. In ODI, the different versions of a
scenario are always displayed attached to the original object.
The most common way to create scenarios is to generate them from packages. However, you can also
create scenarios from interfaces, procedures, or even variables using the Common Format Designer
option.
Scenarios are still context independent. You can generate a scenario to load data into a sales
database, then run the same scenario in different contexts to load the sales databases for different
sites.
Managing Scenarios
Now, you see how to perform some practical tasks with scenarios.
Scenario-Related Tasks
In the remaining lesson, you assume that you are generating a scenario from a package, which is the
most common situation. You learn how to generate scenarios and regenerate them if they change.
After you generate a scenario, you can export it to a file. This enables you, for example, to transfer it
to a remote site.
Finally, you learn how to execute scenarios, which can be done directly from the ODI GUI, from an
operating system command line, or using the Sunopsis API.
It is also possible to start scenarios using an external scheduler, using ODI’s built-in scheduling
feature, or from Metadata Navigator’s Web interface. However, these methods are not covered in this
lesson.
Generating a Scenario
To generate a scenario for a package, perform the following:
1. Right-click the package.
2. From the context menu, select Generate Scenario.
3. Select a name and version for the scenario. You can choose any version numbering scheme you
want. However, the combination of name and version must be unique for this package.
- If there are variables in the package, you must specify which ones to use as parameters.
When you launch the scenario using schedules or from Metadata Navigator, ODI asks you
for the value of these parameters.
- You can choose to use all variables as parameters or none of them.
- If you want to specify which variables to use, select Selective Use.
4. Click OK. ODI generates the scenario. Depending on the complexity of the package, the
scenario generation may take a while.
Regenerating a Scenario
Although you can store several versions of a scenario, at times you may want to regenerate an
existing scenario. Regeneration replaces the selected version of the scenario with a freshly generated
copy.
To do this, right-click the scenario and select Regenerate. The parameters that you previously defined
are used again. ODI generates the scenario. Again, this may take a while for complex scenarios.
• Regeneration:
– Overwrites the scenario
– Reattaches any schedules for the current scenario
• Generation:
– Preserves a history of scenarios
– Requires schedules to be redefined
1. Right-click the
scenario that you
want to run.
2. Select Execute.
3. Set the session
parameters:
– Context
– Agent
– Log level
4. Click OK.
4. Click OK.
Exporting a Scenario
To export a scenario, perform the following:
1. Right-click the scenario.
2. Select Export from the context menu. The Export window appears.
3. Specify the directory where you want to export the scenario. You can use the browse button to
select the directory by navigating to it. Specify the file name to export the scenario to. The .xml
extension is automatically added to it. Select the Child components export check box. Always
do so; otherwise, steps that make up the scenario are not exported.
4. Click OK to begin the export.
agentscheduler.bat –NAME=localagent
Creating Versions
To create a version:
1. Select the object for which you want to check in a version. Right-click and select Version >
Create.
2. A window appears. In this window, the Previous Versions (>>) button expands the list of
versions already checked in. A version number is automatically generated in the Version field.
Modify this version number if necessary.
3. Enter the details for this version in the Description field. Click OK.
Note: When editing the object, the Versions tab provides a list of versions checked in, with the
checkin date and the name of the user who performed the checkin operation.
3 3
Restoring Versions
To restore a version:
1. Select the object for which you want to restore a version. Right-click and select Version >
Restore. A window appears with the list of existing versions.
2. Select the version you want to restore and then click OK.
3. Click OK to confirm the restore operation.
1 Restore version
1
2
3
Modified
entries
Answer: d
Scenarios are context independent. You can generate a scenario to load data into a sales database,
then run the same scenario in different contexts to load the sales databases for different sites.
Answers: b
Explanation: Restoring a version cannot be undone. It permanently erases the current object and
replaces it with the selected version.
Objectives
This lesson is an overview of monitoring and improving your data quality using ODI. In this lesson,
you learn why you should enforce data quality, and in which situations. The lesson will also cover
the different types of rules that can be enforced with ODI and how to enforce these rules using the
various kinds of data quality control.
Data Quality
In the first few slides of this lesson, you get an answer to why and when you should enforce data
quality.
• Deduplication rules:
– Primary keys
– Alternate keys
– Unique indexes
• Reference rules:
– Simple: column A = column B
– Complex: column A = function (column B, column C)
• Validation rules:
– Mandatory columns
– Conditions
Source Target
ORDERS
Integration process SALES
ERRORS
Static control is
LINES started by:
ERRORS
Static control is - Interfaces after
started: Flow control integration
- Automatically is started. - Packages
(scheduled) - By interfaces during - Manually
- manually CORRECTIONS execution
File
• “Quick” check
• Available on the Control tab
of the Constraint window
– For keys, references, and
conditions
• Useful to check whether a
rule is correct
• Requires a SQL-enabled
system
Start synchronous
control
Number of erroneous
rows
Synchronous Control
A synchronous option is available to perform a “quick” check of one constraint. This option is
available on the Control tab of the windows for keys, references, and conditions.
By clicking the Check button, you can perform a synchronous check on the constraint, which tells
you the number of rows that violate the constraint. Use this button whenever possible to check
whether your rule is correct. For example, if this check returns half of your rows as duplicates, you
probably have made a mistake.
You should remember that synchronous checks query the data server directly to get the number of
invalid rows. This feature works only with SQL-based systems. For instance, you cannot perform a
synchronous check on a file-based datastore. Also, note that, unlike a normal static check, the result
of a synchronous check is not saved anywhere.
What Is a Constraint?
A constraint in ODI is a general term for rules that are enforced on data in datastores. Although
constraints are often duplicated by rules defined in databases, they act independently. They serve to
ensure the validity of data in a given datastore, and thus the integrity of the model as a whole.
Constraints defined on a target datastore can be used by interfaces to the check the validity of data.
These checks are generally carried out before integration into the target. This prevents invalid data
from ever reaching the target datastore.
Types of constraints:
• Uniqueness (primary/alternate key–PK/AK)
– Is my customer number a unique value?
– Do I have duplicated values in my invoice number field?
• Referential Constraint (foreign key–FK)
– Does the customer number in my INVOICE table correspond
to the customer number in my CUSTOMER table?
• Conditions (Check–CK)
– The driver’s license candidate must be older than 16 yrs.
– The date of the last update must be more recent than the
creation date.
• Mandatory Fields (Not null)
– The name field must not be null.
Answer: a
Explanation: Even a database table accepts nulls, you can specify a value as mandatory for the
purpose of ODI transformation.
Answer: d
Explanation: All of the above are examples of business rules for data quality.
Objectives
This lesson is an overview of monitoring and improving your data quality using ODI. In this lesson,
you learn why you should enforce data quality, and in which situations. The lesson will also cover
the different types of rules that can be enforced with ODI and how to enforce these rules using the
various kinds of data quality control.
• CDC:
– Allow applications to process changed data only
– Load will only process changes since the last load
– Reduce the volume of data to be processed
• CDC is extremely useful for near real-time
implementations, synchronization, and Master Data
Management.
CDC Techniques
There are number of CDC techniques:
• Trigger based: ODI will create and maintain triggers to keep track of the changes.
• Logs based: For some technologies, ODI can retrieve changes from the database logs (Oracle,
AS/400).
• Time stamp based: If the data is time stamped, processes written with ODI can filter the data
comparing the time stamp value with the last load time. This approach is limited because it
cannot process deletes. The data model must have been designed properly.
• Sequence number: If the records are numbered in sequence, ODI can filter the data based on
the last value loaded. This approach is limited because it cannot process updates and deletes.
The data model must have been designed properly.
Journalizing Components
The journalizing components are:
• Journals: Where changes are recorded. Journals only contain references to the changed records
along with the type of changes (insert/update, delete).
• Capture processes: Journalizing captures the changes in the source datastores either by
creating triggers on the data tables or by using database-specific programs to retrieve log data
from data server log files. See the documentation on Journalizing Knowledge Modules (JKMs)
for more information about the capture processes used.
• Subscribers: CDC uses a publish/subscribe model. Subscribers are entities (applications,
integration processes, and so on) that use the changes tracked on a datastore or on a consistent
set. They subscribe to a model’s CDC to have the changes tracked for them. Changes are
captured only if there is at least one subscriber to the changes. When all the subscribers have
consumed the captured changes, these changes are discarded from the journals.
Setting Up Journalizing
This is the basic process for setting up CDC on an ODI data model. Each of these steps is described
in more detail below.
1. Set the CDC parameters.
2. Add the datastores to the CDC.
3. For consistent set journalizing, arrange the datastores in order.
4. Add subscribers.
5. Start the journals.
Set journalizing
mode.
3
1
4
Set Journalizing
KM.
1
2
Journalizing Status
Datastores in models or interfaces have an icon marker indicating their journalizing status in
Designer’s current context:
• OK: Journalizing is active for this datastore in the current context, and the infrastructure is
operational for this datastore.
• No Infrastructure: Journalizing is marked as active in the model, but no appropriate
journalizing infrastructure was detected in the current context. Journals should be started. This
state may occur if the journalizing mode implemented in the infrastructure does not match the
one declared for the model.
• Remnants: Journalizing is marked as inactive in the model, but remnants of the journalizing
infrastructure such as the journalizing table have been detected for this datastore in the context.
This state may occur if the journals were not stopped and the table has been removed from
CDC.
Answer: b
Explanation: Each journalized datastore is treated separately when capturing the changes and does
not provide the guarantee of the consistency of the captured changes in linked datastores.
Answer: d
Explanation: All of the above are the features of the Journal table structure.
Objectives
This lesson provides an overview of monitoring and improving your data quality using ODI. In
this lesson, you learn why you should enforce data quality, and in which situations. The lesson
will also cover the different types of rules that can be enforced with ODI and how to enforce
these rules using the various kinds of data quality control.
Note
The .jar file must be installed on every ODI installation, including the agents, whereas adding
an Open Tool in Designer needs to be done only once for a given Master repository.
The Open Tool SimpleMessageBox is delivered with ODI. You find the corresponding Java
class in the demo\plugins\src\com\myCompany\sunopsisOpenTools
subdirectory of ODI. The Open Tool SimpleMessageBox opens a message box displaying the
message you have specified. You use this Open Tool in the following examples. Now add the
SimpleMessageBox to your project.
1
If you know the name of the Open Tool’s 2
Java class, you can enter it directly in You can also use the Search option to
the “Open Tool class name” edit box. find existing open tools. Click Find in
the classpath. A new window opens.
Search options:
Click OK to confirm
your choice.
3
Click Add Open Tool.
Version number
4
Description Click OK
Error message
:
Note: Change the classpath or move the Open Tool to the right
directory.
1
Select the name of the Open
Tool that you want to delete.
2
Click Delete.
1
In Toolbox, select the tool that you
want to use. Open tools are listed
under the Plugins group.
2
3 Click the diagram and a
You can now set the parameters for step corresponding to
the selected tool in the Properties your tool is created.
panel.
2
Select Sunopsis API as
the technology.
3
Create the command line
using the Expression Editor.
The syntax is the same as for
the command in a package. 4
Click OK.
Click Execute.
Example: SimpleMessageBox
The source code is available in the demo/plugins/src
directory.
SimpleMessageBox "-TEXT=<text message>" "-TITLE=<window
title>"
1. Define the syntax.
2. Create two icons (1616 and 3232 - .gif format).
3. Create and implement the class.
4. Compile the class and create a package with the two icon
files.
5. Install the Open Tool as described in the section titled
“Using Open Tools.”
package com.myCompany.OpenTools;
import oracle.odi.sdk.opentools.IOpenTool;
import oracle.odi.sdk.opentools.IOpenToolParameter;
import oracle.odi.sdk.opentools.OpenToolExecutionException;
import oracle.odi.sdk.opentools.OpenToolAbstract;
import oracle.odi.sdk.opentools.OpenToolParameter;
Abstract
Class used for class you
parameters extend
Menus
Toolbar
Tree views
Import profile.
1
2
1
2
Select the method you want to assign, then drag and drop it
onto the user or the profile.
1
3
5
4
2
Answer: a
Explanation: If the Open Tool is not found by ODI, the Add Open Tools window displays the
error message. In this case, you should either change the classpath or move the Open Tool to the
right odi/plugins directory.
Answer: d
Explanation: Objects and methods are predefined in ODI and should not be changed.
Objectives
The aim of this lesson is to provide an understanding of the Web services created and used in ODI.
OdiInvokeWebService
tool
Repository
The ODI Public Web services and Data services are two
different types of Web services:
Data Services:
Are generated by ODI to give
you access to your data through Web services
Oracle DI J2EE
Web services
Datastore
Java classes container
SKM
Data sources
ESB
3
These data sources contain the connection
2 properties required to access data, and must
…they make use of data sources correspond to data servers defined within the
defined within the Web services ODI topology.
container or on the application server.
Select Axis2.
Enter JDBC URL and test
connection.
3
4
...
<resource-ref>
<description>Data Integrator Data Services on OracleSource
</description>
<res-ref-name>jdbc/OracleSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Click OK.
Third-party J2EE
application
Web services
container Start scenario
Business
processes SOAP Public Web
ODI agent
Service
2
ESB Source
Sybase Target Oracle
Public Web services Integration
provide operations such ORDERS process
as Starting a Scenario. SALES
LINES
<JdbcDriver>oracle.jdbc.driver.OracleDriver</JdbcDriver>
<JdbcUrl>jdbc:oracle:thin:@localhost:1521:xe </JdbcUrl>
<JdbcUser>snpm1</JdbcUser>
<JdbcPassword>password</JdbcPassword> URL of the data server
<OdiUser>SUPERVISOR</OdiUser> hosting the repository
<OdiPassword>SUNOPSIS /OdiPassword>
<WorkRepository>WORKREP1</WorkRepository>
Data server password for
</RepositoryConnection> the database user
Note
There are two important notes to keep in mind concerning the definition of the Work repository in a
SOAP request:
• The first one is about the protocols invoking the Web services: The Web service accepts
passwords in a plain text format. Therefore, it is strongly recommended that you use secured
protocols (HTTPS) to invoke Web services over a nonsecured network.
• The second one is about the Repository Connection structure: If the agent is connected to the
Work repository, the entire RepositoryConnection structure is not mandatory. For a Scheduler
Agent, for example, the agent has all the repository connection information. In this case, only
the ODIUser and ODIPassword parameters are required.
A Simple SOAP Request for the OdiInvoke Web Service: Example (continued)
The SOAP request defines the scenario with the parameters ScenName, the name of the scenario, and
ScenVersion, indicating the version of the scenario. Note that, if the version specified is –1, the
latest version of the scenario is executed.
You also need to indicate the context for the execution of the scenario.
The synchronization mode (SyncMode) is used for the scenario execution and has an effect on the
response. If the synchronization mode equals 1, you have chosen the synchronous mode. The
response is returned after the session is completed and the response reflects the execution result.
If the synchronization mode equals 2, you have chosen to execute the scenario in asynchronous
mode. In this case, the response is returned after the session is started. This means that the response
only reflects the fact that the session was correctly started.
The last component that is described in the SOAP request is the agent that executes the scenario.
For the Host parameter, you have to indicate the network name or IP address of the machine on
which the agent is running. For the Port, specify the listening port used by the agent. Note that, by
default, this port is 20910.
A Simple SOAP Response for the OdiInvoke Web Service: Example (continued)
In this slide, you have the SOAP response for the OdiInvoke Web service returned by the scenario
execution in synchronous mode.
The odi:Ok parameter indicates whether the session was started or not. It is a Boolean value.
odi : SessionNumber is a unique ID number attributed to the session in the repository.
You have now seen how to define a simple SOAP request and how to interpret the corresponding
response.
OdiInvokeWebService Tool
ODI provides the OdiInvokeWebService tool to invoke Web services. With this tool, you can invoke
any third-party Web service. The OdiInvokeWebService tool can be used in the tool step of a package
or in a Knowledge Module. The response of the Web service request is written and saved to an XML
file that can be used in ODI.
OdiInvokeWebService in action
OdiInvokeWebService invokes a specific
operation on a port of the Web service.
1 2 The Web Services Description Language
(WSDL) file URL must be provided.
The OdiInvokeWebService tool
sends a client request to the
Web service via HTTP or
HTTPS protocols.
Web service
XML 3
4 The response is written to an XML file that The response is written
can be processed with ODI. to a SOAP file.
2
Enter or select the appropriate
values for the result file
parameters of the tool.
1
2
Enter the location
Click “Connect
of the WSDL. to WSDL.”
6
Enter the fields for the
SOAP request and press
Enter to confirm the entries.
4
Select the operation
from the list.
Source panel
SOAP Editor
panel
2
Enter the export directory
and the character encoding.
3
Click OK to save.
1
3
Example 2: Creating an ODI Error Hospital with BPEL Human Workflow (continued)
Create the BPEL process that will import data errors from the error table. The BPEL process will
then create the Human Workflow Tasks from the error records. In the next steps, you will build a
new BPEL process to track the errors for each execution of the ODI package and present them to a
user for review. The user will be able to update each of the fields and correct any errors so that on the
next execution of the ODI package, the corrected rows are inserted into the target. In this example,
JDeveloper is the tool that you use to build the BPEL process and deploy it to the application server.
1. Create a New Project for the BPEL process.
2. Create and configure the connection to ODI data source.
3. Invoke database adapters to read errors and write error corrections back to the error table.
Example 2: Creating an ODI Error Hospital with BPEL Human Workflow (continued)
4. Add Human Task to your BPEL process.
5. Configure the Human Task parameters.
Example 2: Creating an ODI Error Hospital with BPEL Human Workflow (continued)
1. Deploy the BPEL process to Application server.
2. Create the ODI package to execute the interface and invoke the Web service.
3. Execute your ODI package.
2
1
Example 2: Creating an ODI Error Hospital with BPEL Human Workflow (continued)
Monitor execution of the BPEL process from the BPEL console, and complete the human task:
1. Using Oracle BPM Worklist application, perform an action on the human task to correct errors.
2. Return to the BPEL Console page and refresh the browser. The process has now updated and
you see that it has progressed past the Error Hospital Human workflow activity. Click the
Invoke_Corrections activity to see the data that the error table has been updated with.
Note: You should now have a fully functional ODI to BPEL Human Workflow Error Hospital. If you
rerun your ODI Scenario now, the corrected errors are picked up and resubmitted to the target table.
Answer: b
Explanation: You need to define only one physical schema per Web services container. On the
Context tab, you need to define one logical schema for each context in which you will deploy the
data services.
Answer: a
Explanation: If the synchronization mode equals 2, you have chosen to execute the scenario in
asynchronous mode. In this case, the response is returned after the session is started. This means that
the response only reflects the fact that the session was correctly started.