Student Guide
Student Guide
ble
fe r a
ans
n - t r
n o
s a
h a
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
l o r in to u
u (f nse
e l c l i ce
e d
n N
F lori
Oracle Data Integrator 12c:
Advanced Integration and
Development
Student Guide
D87557GC10
Edition 1.0 | January 2015 | D89774
publish, license, post, transmit, or distribute this document in whole or in part without
Brent Dayley the express authorization of Oracle.
Christophe Dupupet
The information contained in this document is subject to change without notice. If you
Gerry Jurrens find any problems in the document, please report them in writing to: Oracle University,
Alex Kotopoulis 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Julien Testut
Restricted Rights Notice
Editors If this documentation is delivered to the United States Government or anyone using
Smita Kommini
the documentation on behalf of the United States Government, the following notice is
ble
Aju Kumar
applicable:
fe r a
U.S. GOVERNMENT RIGHTS
an s
- t r
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or
n
Graphic Designer
Rajiv Chandrabhanu a no
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 h a s
m ) deฺ
Publishers o of Oracle iand/or
e ฺ c
Oracle and Java are registered trademarks
G u its affiliates. Other names
Syed Imtiaz Ali may be trademarks of their
r a cl ent
respective owners.
Srividya Rameshkumar
@ o tud
e l c his S
u
ฺ n ed se t
l o r in to u
u (f nse
e l c l i ce
e d
i n N
r
Flo
Contents
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
1 Introduction
Lesson Objectives 1-2
Course Objectives 1-3
Target Audience 1-4
Class Introductions 1-5
Agenda of Lessons 1-6
ble
Course Environment 1-8
fe r a
Course Materials 1-9
ans
Course Practices 1-10
n - t r
How Can I Learn More? 1-11 no
s a
Related Training 1-12
h a
) deฺ
Agenda 1-13
c o m u i
e ฺ G
Oracle Data Integrator: Features 1-14
r a cl ent
o tud
Oracle Data Integrator: Features Knowledge Modules 1-15
@
c his S
u
Conventional Integration Process: ETL 1-16
e l
ETL Versus E-LT 1-17
ฺ n ed se t
E-LT Steps 1-18
l o r in to u
(f nse
ODI Architecture 1-19
u
e l c
Summary 1-20
l i ce
e d
n N Practice 1-1: Exploring Your Environment 1-21
iii
Description of Knowledge Module Tasks 2-15
Details of the Tasks Are Generic 2-16
Setting Knowledge Module Options 2-17
Replacing Existing Knowledge Modules 2-18
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Agenda 2-20
Developing Your Own Knowledge Module: General Guidelines 2-21
Substitution API 2-22
Using Substitution Methods 2-23
Various ODI Substitution Methods 2-24
Substitution Methods: Basic Examples 2-25
Using Substitution Methods in Actions 2-26
ble
Working with Object Names 2-28
fe r a
Working with Lists of Tables, Columns, and Expressions 2-30
ans
Example: Using getTargetColList to Create a Table 2-33
n - t r
Example: Using getColList in an Insert Values Statement 2-34n o
Example: Using getSrcTablesList 2-35 s a
Generating the Source Select Statement 2-36 h a
) deฺ
c o m u i
e ฺ
Generating the Source Select Statement: Example 2-37
G
Working with Datasets 2-38
r a cl ent
@ o tud
Obtaining Other Information with the API 2-39
e l c his S
u
ed se t
Quiz 2-40
Summary 2-41 ฺ n
in to u
l o r
(f nse
Practice 2-1 2-42
u
c ice
del
3 eDeveloping lKnowledge Modules
N
in Objectives 3-2
r
Flo Agenda 3-3
Developing KMs: Targeting a Particular Stage of your Integration Process 3-4
Developing KMs: What to Avoid and What to Use 3-6
Developing KMs: Other Recommendations 3-7
Agenda 3-8
Using Java in Knowledge Modules 3-9
Using Code Generation Tags: 3-10
Using Code Generation Tags: Examples 3-11
Code Generation Techniques 3-12
Agenda 3-14
Using ODI Substitution Methods: getJoin() 3-15
Using ODI Substitution Methods: getFilter() 3-16
Using ODI Substitution Methods: getPK() 3-17
Using ODI Substitution Methods in Journalizing Knowledge Modules:
Examples 3-18
iv
Using ODI Substitution Methods in Reverse-Engineering KM: getModel() 3-20
Agenda 3-22
Troubleshooting KMs 3-23
Quiz 3-27
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Summary 3-29
Practice 3-1 Overview: Creating a New Knowledge Module for
Data Generation 3-30
v
Using Set-Based Operators with Integration Mappings 5-8
Example: Flow with Multiple Datasets 5-9
Defining a Dataset 5-10
Using Set-Based Operators with Integration Mappings 5-11
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
vi
7 Using Variables in ODI
Objectives 7-2
Agenda 7-3
Using Variables in ODI: Overview 7-4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
vii
Performing an SDK Task Using Java with Groovy Editor: Example 8-13
Using Custom Libraries 8-14
Defining Additional Groovy Execution Classpath 8-15
Read Input with the odiInputStream Variable 8-16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
viii
Quiz 9-29
Summary 9-30
Practice 9-1 Overview: Configuring ODI Topology and ODI Model with
Complex Files 9-31
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ix
Processing ODI Errors with BPEL Human Workflow 10-36
Quiz 10-37
Summary 10-38
Practice 10-1 Overview: Integrating ODI in the Enterprise Environment 10-39
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
x
6b. Creating New ODI Master Repository Referencing a User in the External
LDAP Server 11-35
Switching the Master Repository Authentication Mode 11-36
Reactivating Users After Switching to Internal Authentication 11-37
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
12 Choosing Integration Strategies: Best Practices
fe r a
Objectives 12-2
ans
Agenda 12-3
n - t r
Integration Strategies 12-4 n o
Agenda 12-5 s a
Strategies with Staging Area on the Target 12-6 h a
) deฺ
c o m u i
e ฺ
Strategies with Staging Area on the Target: Append 12-7
G
r a cl ent
Strategies with Staging Area on the Target: Control Append 12-8
@ o tud
Strategies with Staging Area on the Target: Incremental Update 12-10
e l c his S
u
ed se t
Strategies with Staging Area on the Target: Incremental Update:
ฺ n
in to u
Optimization 12-12
l o r
(f nse
Working with Slowly Changing Dimensions 12-13
u
l c ce
Working with Type 2 Slowly Changing Dimensions 12-14
e l i
e d
Type 2 SCDs: Example 12-15
n N
lori
Implementing Type 2 SCDs 12-16
F Implementing Type 2 SCDs: Steps 12-17
Agenda 12-19
Strategies with Staging Area Different from the Target 12-20
Strategies with Staging Area Different from the Target: Server to
Server Append 12-21
Strategies with Staging Area Different from the Target: Server to File or
JMS Append 12-22
Agenda 12-23
Using ODI for Bulk Processing 12-24
Using ODI for Bulk Processing: Design Patterns 12-25
Using Cross-Reference (XREF) Table: Overview 12-27
Using the XREF Knowledge Module 12-28
Agenda 12-30
Loading Data Patterns 12-31
Oracle GoldenGate: Overview 12-32
xi
Oracle GoldenGate Solutions: Overview 12-33
Oracle GoldenGate Concepts 12-34
Using ODI and OGG Together 12-35
ODI and OGG Topology: Data Servers 12-36
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
xii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Introduction
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Lesson Objectives
• Business analysts
• Process architects
• IT developers
• Data administrators
• Professional services consultants ble
fe r a
• Oracle solution architects s
• Data Warehouse administrators - t r an
n no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
ind
Implied e
el licdefinition
the audience is the prerequisite of the information contained in the previous
N
n ODI 12c: Integration and Administration [D82167GC10] or equivalent.
course,
F lori
• Name, title/position
• Company
• Experience using Oracle Data Integrator and other
Fusion Middleware products:
– WLS e
– SOA r a bl
s fe
• Reasons for attending - t r an
n no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Did youeattend lice class, Oracle Data Integrator 12c: Integration and Administration?
del the prerequisite
i n N
lo r
F
• Day 1:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
– Lesson 1: Introduction
– Lesson 2: ODI Knowledge Modules: Overview
– Lesson 3: Developing Knowledge Modules
– Lesson 4: Designing ODI Integration Mappings
• Day 2:
a b le
– Lesson 5: Designing Advanced Integration Mappings e r
– Lesson 6: Managing Object Versions a n sf
o n -tr
– Lesson 7: Using Variables in ODI n
s a
– Lesson 8: Accelerating Development with
h aGroovy
) deฺ
– Lesson 9: Working with ASCII Files
c o m ui
c l eฺ nt G
o ra ude
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cecovered per day is at the discretion of the local instructor.
e d
The actual
e
lessons tol i
be
n N
F lori
• Day 3:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Web Browser
and Studio
Oracle Unified
Directory (LDAP) Oracle SOA Suite
ble
fe r a
ans
FUSION MIDDLEWARE - t r
WEBLOGIC SERVER
n on
JDeveloper
s a
a
c om) h ideฺ
12 l e ฺc t Gu
Virtual o ac drunning
rMachine e n
Linux
u @ S tu
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce products are used for lessons and practices:
e d e
In this course, the l i
following
n N
lori
• Oracle Database 12c
F • WebLogic Server 12c
• Oracle Data Integrator 12c
• Oracle SOA Suite (BPEL)
• JDeveloper 12c
• Oracle Unified Directory 11g (there is no 12c version as of the course printing)
• MySQL Database 5.6
• Other supporting products
These layered products together comprise the Oracle Data Integrator runtime environment, all
contained in a virtual machine (VM) running 64-bit Oracle Enterprise Linux.
• Student Guide
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
• Activity Guide
• Online Videos
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce the lecture slides and notes. The Activity Guide contains the practices
d e l i
e Both are in Adobe Reader .pdf format to allow annotation. The videos are on the
The Student Guide contains
n
for N
the course.
i website (used for Practices 12 and 13).
F lorOracle
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cVirtual
e
If you are d e
taking a l
Live i Class (LVC), the practices are accessed through NoMachine NX
N
n across a VPN.
client
F lori
Topic Website
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Course
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
• Features
• ETL
• E-LT
• Architecture
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
fe r a
• Declarative design improves developer productivity. ans
• n -tr
Knowledge Modules provide flexibility and extensibility.
o
n a
a s
m ) h deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce uses disparate RDBMS engines to process and transform data
e
• ODI’sd e
E-LT l i
architecture
i n N
faster than traditional ETL. This approach optimizes performance and scalability, and lowers
r
Flo overall solution costs.
• ODI turns the promise of active integration into reality by providing all the key components
that are required to enable real-time data warehousing and operational data hubs. ODI
combines three styles of data integration: data-based, event-based, and service-based. ODI
unifies silos of integration by transforming large volumes of data in batch mode, by
processing events in real time through its advanced Changed Data Capture (CDC),
integrating with Oracle GoldenGate (OGG), and by providing data services to the Oracle
Service-Oriented Architecture (SOA) Suite.
• ODI shortens implementation times with its declarative design approach using a GUI and
drag-and-drop. Designers specify what they want to accomplish with their data, and then the
tool generates the details of how to perform the task. With ODI, the business user or the
developer specifies the rules to apply to the integration processes. The tool automatically
generates data flows and administers correct instructions for the various source and target
systems. With declarative design, the number and complexity of steps is greatly reduced,
which in turn shortens implementation times. Automatic code generation reduces the
learning curve for integration developers and streamlines non-IT professionals to the
definition of integration processes and data formats.
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce are at the core of the ODI architecture. They make all ODI processes
e d e
• Knowledge l i
Modules
i n N
modular, flexible, and extensible. Knowledge Modules implement the actual data flows and
r
Flo define the templates for generating code across the multiple systems involved in each
process. ODI provides a comprehensive library of knowledge Modules, which can be tailored
to implement existing best practices (for example, for highest performance, for adhering to
corporate standards, or for specific vertical knowhow). By helping companies capture and
reuse technical expertise and best practices, ODI’s Knowledge Module framework reduces
the cost of ownership. It also enables metadata-driven extensibility of product functionality to
meet the most demanding data integration challenges.
ODI streamlines the high-performance movement and transformation of data between
heterogeneous systems in batch, real-time, synchronous, and asynchronous modes. It
dramatically enhances user productivity with an innovative, modularized design approach and
built-in connectivity to all major databases, data warehouse appliances, analytic applications, and
SOA suites.
Integration process
Extract - Transform (check) - Load
A machine A machine
Source
Target
ORDERS A machine
Transform
SALES
ble
LINES
fe r a
an s
n t r
Errors
-
a no
CORRECTIONS
File
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
Extract Transformr a
o tud Load
@
cu his S
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceis also known as an extract, transform, and load (ETL) process.
e d e
This integration l
processi
n N
i first part of an ETL process involves extracting data from the source systems. Most data
F lorThe
warehousing projects consolidate data from different source systems.
The transform stage applies a series of rules or functions to the data extracted from the source to
derive the data for loading into the target. Some data sources will require very little or even no
manipulation of data. In other cases, transformations (such as filtering, joining, sorting, and so on)
may be required to meet the business and technical needs of the target database.
The load phase loads the data into the target, usually the data warehouse.
Note: You can add to this process the checks that ensure the quality of data flow, as shown in the
slide.
1. Extract 1. Extract
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
2. Transform 2. Load
3. Load 3. Transform
Conventional ETL architecture Next-generation E-LT architecture
ble
Transform
fe r a
s
Transform
n
Extract
Transform
Load Extract Load-t
n ra
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
Data is e deofl the most
one licimportant assets of any company, and data integration constitutes the
n N
backbone of any enterprise’s IT systems. Choosing the technology for data integration is critical
F lorfori productivity and responsiveness of business divisions within an enterprise.
E-LT stands for extract, load, and transform. It includes the processes that enable companies to
move data from multiple sources, reformat and cleanse the data, and load it into another
database, or a data warehouse for analysis, to support a business process.
ODI provides a strong and reliable integration platform for IT infrastructure. Built on the next-
generation architecture of extract, load, and transform (E-LT), ODI delivers superior performance
and scalability connecting heterogeneous systems at a lower cost than traditional, proprietary ETL
products. Unlike the conventional extract, transform, and load (ETL) design, with ODI, E-LT
architecture extracts data from sources, loads it into an optional Staging Area (work schema), then
a target, and transforms it by using the database power according to business rules. The tool
automatically generates data flows, manages their complexity, and administers correct instructions
for the various source and target systems.
s a
Extract Load
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e
1. Extractd e l i
n N
i first step in the E-LT process is extracting data from various sources. Each of the source
Fl orThe
systems may store its data in a completely different format. The sources are usually flat files or
RDBMS, but almost any data storage can be used as a source for an E-LT process.
2. Load
This step involves loading the data into the Staging Area, which must be an RDBMS; then the
destination target(s), which might be a database or data warehouse.
3. Transform
After the data has been extracted and loaded, the next step is to transform the data according to a
set of business rules. The data transformation may involve various operations including, but not
limited to, filtering data, sorting data, aggregating data, splitting/joining data, cleaning data,
generating calculated data based on existing values, and validating data.
Java EE Operator
Application Servlet Container Web Service Container
Topology
ODI SDK Java EE Runtime WS
Security Application ODI Public Data
Console Java EE WS Services
ODI SDK Agent
h a s Runtime WS
ODI Master
Repository ODI Work
m ) deฺ
Repository
ฺ c o u i Stand-alone
Agent
Legacy
e
cl ent
Files / XML DBMS
G Applications
ERP/CRM/PLM/SCM
DW / BI / EPM
Metadata is an open
relational model with r a
o tud
Heterogeneous Big
built-in Flex Fields.
u @
c his S
access Data
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cecentral component of the ODI architecture. This stores configuration
e d e
The repository forms l i
the
n N
information
i about the IT infrastructure; the metadata for all applications, projects, scenarios, and
F lorexecution logs. Repositories can be installed in an online transaction processing (OLTP) relational
database. The repository also contains information about the ODI infrastructure, defined by the
administrators. The two types of ODI repositories are Master and Work Repositories.
At design time, developers work in a repository to define metadata and business rules. The
resulting processing jobs are executed by the agent, which orchestrates the execution by
leveraging existing systems. The agent connects to available servers and asks them to execute
the code. It then stores all return codes and messages in the repository. The agent also stores
statistics, such as the number of records processed, and the elapsed time. Several repositories
can co-exist in an IT infrastructure. The graphic in this slide shows two repositories: one for the
development environment and the other for the production environment. Developers release their
projects in the form of scenarios that are sent to production.
In production, these scenarios are scheduled and executed on a Scheduler Agent that also stores
all its information in the repository. Operators have access to this information and can monitor the
integration processes in real time.
Business users, as well as developers, administrators, and operators, can gain web-based read
access to the repository by using the ODI Console.
your practices.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Flori
N n
e d e l c u
l
l
i
o r
ce
ฺ n
(f nse
e l
in to u
u
ed se t
@
r a
c his S
e ฺ c
o tud
o m
cl ent G
h
u
a
i
s a
) deฺ
o n n
- t r an
s
fe r a bl
e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
• Import as “Global”
• Use the built-in ones (not listed)
bl e
fe r a
s
ran
Built-in KMs
n-t
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceKMs to be shared across multiple projects. In previous versions of ODI,
e d
Global KMs
eallow l i
specific
n
KMs N
were always specific to a project and could be used only within the project into which they
i imported.
F lorwere Global KMs are listed in the Designer Navigator in the Global Objects accordion.
New to 12c is a small collection of built-in KMs. These are the same generic KMs, only they differ
in scope. The list of built-in KMs is not displayed in Studio, it is documented either in the manuals
or by a suffix of .GLOBAL in the name. Even though “global” is in the name, they are not listed in
the Global KMs, shown in the middle of the screen.
Why would you not want all KMs to be global? Perhaps you have modified one or two KMs for
custom code, and they may have the same names as their originals.
DB2/UDB
ble
LINES
Extract/Join/
Transform IKM
TEMP_
fe r a
Join/Transform
SALES
an s
n - t r
ERRORS
LKM TEMP_2 CKM
a no
CORRECTIONS Extract/Transform
h a s
Check constraints/
File
) deฺ
Isolate errors
m
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d
KMs define
e
a way of l i
implementing business rules on a given technology. They connect the
N
n logic of your business rules to the concrete reality of your data servers.
abstract
F lori
If your data servers change, you just select a different KM to match. Your business rules remain
unchanged. If your business rules change, you do not have to modify any code—you just update
the SQL expressions that define them in ODI.
In your example, you have Loading KMs (LKMs) that describe how to move data from the MySQL
source server to the DB2/UDB Staging Area. Remember that the Staging Area must be a SQL
RDBMS (for example, not JMS). Integration KMs (IKMs) perform the work of creating temporary
tables and moving data onto the Oracle target server. Lastly, Check KMs (CKMs) implement
constraint checking and isolating errors in a separate table.
Note: KMs are generic because they enable data flows to be generated regardless of the
transformation rules. And they are highly specific because the code they generate and the
integration strategy they implement are finely tuned for a given technology.
Of course the source can be almost anything, it is not restricted to MySQL; and the target can be
almost anything, it is not restricted to Oracle.
plus
Other metadata:
Generated code:
Truncate Table SCOTT.EMP - Topology of your
Insert into SCOTT.EMP servers
ble
Select Round(Sum(Sal*Coeff)) …
r
- Models in servers
fe a
Begin … If .. Then … Else
ftp ... s
- Technology, and
an
so on
n - t r
a no
Sources
h a s
Run
o
Truncate
m Table
i eฺSCOTT.EMP
) intodSCOTT.EMP
ฺc … t Gu
Insert
time e
l
Targets
o racODIuAgentd enorchestrates the
u @ S t of the generated code.
running
el c s
e d e thi
r i n ฺn © 2015,uOracle
s and/or its affiliates. All rights reserved.
o Copyright
t o
u (fl nse
d e lc lice
Business
N e and their implementation on a server are being carefully kept separate. Now you
rules
willnsee how ODI combines the two at run time.
F lori
For example, you have a mapping that the net income of an employee is the sum of the income
components multiplied by their coefficients. This is an expression in SQL, but there is no code to
perform this integration.
You have a KM that can wipe a destination table and fill it with source data. However, it knows
nothing about your business rules.
Then you have all the other metadata that you defined in ODI: the topology of your servers, the
models that exist on them, the technologies used by each server, and so on.
When you put these three things together, ODI generates a code to carry out the integration. This
code is specific to a technology, a layout, and a set of business rules. However, if any of these
three things changes, all you need to do is regenerate the code.
At run time, the ODI Agent orchestrates the running of the generated code. Based on execution
locations, various parts of the generated code will be executed either on the Source, Staging, or
Target.
KM Type Description
LKM Loading Assembles data from source data stores to the Staging
Mappings
Area
IKM Integration Uses a given strategy to populate the target data store from
the Staging Area
bl e
CKM Check Checks data in a data store for errors statically or during an
fe r a
integration process
t r a ns
RKM Reverse Retrieves the structure of a data model from a database.
n o n- It
engineering is needed only for customized reverse engineering. a
Models
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u cefew cases when you create a KM from the beginning. Most often you
e d e
In real practice, therel i
are
n
wouldN just edit an existing KM (as shown on the next page)
F lori
To create a new KM:
1. Add a new KM of the appropriate type (LKM, IKM, CKM, and so on).
2. Specify the name, technology (technologies if multi-connection), and add the details (code
template) to create the functionality of your KM based on your project needs and available
technology.
In this case, the new KM is associated with only one project (myBigData), as indicated in the panel
title. The Type is disabled because you are creating a new LKM. The reason you have an option
for both Source and Target technology is because you have multi-connections selected. If that had
not been selected, then only Target technology would have been an option. Tasks (used to be
called Details in 11g) is where the actual code commands go. The Tasks tab is shown in the next
slide.
1 2
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
l e t G
3rac e n
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u cecreate a KM from the beginning, but rather develop a KM starting from
In most e del you dolinot
cases,
some
i n Nexisting KM. To develop/edit a KM:
o r
Fl 1. Import a KM of appropriate type, or duplicate an existing one. This creates a “Copy of (old
name)” KM. It does not matter if you do the import from either the main Knowledge Module
node or any of the specific KM nodes below it; any kind of KM can be imported from any kind
of node (for example, you can import a RKM from the CKM node).
2. On the Tasks tab, modify the KM by adding a new functionality according to your project
requirements. The green plus is the Add line icon. The light blue arrows move your new task
line up or down, top or bottom. The individual command line highlighted in dark blue is
shown in detail in the Properties panel below.
3. The commands themselves are for either the Source or Target technology. When your
mouse pointer is near that command field, a gear appears on the right side. Clicking the gear
opens the Expression Editor, which gives you color-coded assistance with entering
commands. The Expression Editor is shown in the next slide.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
lice right of the slide. Clicking that icon opens the Editor you see here.
delin the bottom
Note theegear
i n N
lo r
Use the Knowledge Module Editor to create customized KMs. Keywords for this technology (in the
F example, Oracle SQL), are shown in one color (orange), literals as indicated by “quotes” in blue,
numbers in green, and so on. Delimiters, such as parentheses ( ), brackets [ ], and APIs <% %>,
highlight matching pairs. The colors change depending on the technology.
As you can see, the KM code can be complex.
General
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Options
bl e
fe r a
ans
n - t r
a no Line-
Specific
a s
m ) h deฺ Options
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cEditor
e d
The Knowledge
e l
Modulei also has a section to edit the KM’s options. The top example shows
the N
indefault values for the options for this KM. The bottom example shows the options for a specific
F lortask, in this case the “drop check table” task. For this task, the KM default is to not drop the check
table (shown above), but for this task, the override is to drop the check table (shown below). You
can add or remove options.
KMs are used later in this course. For additional detailed information about KMs, see the ODI
Knowledge Modules Reference Guide.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce Step, Task. A KM is made of tasks.
• Thee d e
hierarchy isl i
Session,
i•n N
Each task has a name and a template for the code to be generated.
r
Flo • Tasks are listed on the Tasks tab.
• After the execution, the task names will be suffixed with the KM name, and viewable in ODI
Operator for a given session.
• Click the task to view the executed code from the KM.
Substitution
ble
methods
fe r a
ans
Parameters of the
n - t r
substitution
methods a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce on source and command on target. In the Command window, you can
e
Each taskd e
has a l i
command
n
view N
and modify each command manually.
F lori• Details of the tasks are generic:
The source and target tables are not known, only the technologies are known.
• Substitution methods are the placeholders for the table names and column names.
• Parameters of the substitution methods: Tables or columns
1. Open mapping
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
2. Physical tab
3. Select object
4. Select KM of
interest
5. Modify Options e
r a bl
6. Save and Run s fe
- t r an
n no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u coreOff and is defined on the Options tab of each task of the KM. KMs have
e d
Each option
ecan be l
On i
n N
options that enable users to:
F lori• Override or accept the default
• Turn options on or off (Boolean)
• Specify or modify values used by the KM
Options are defined in the KM editor itself (new with 12c).
Options are used in the KM code with the substitution methods such as:
<%=odiRef.getOption "OptionName")%>
KM options are set on the Options tab of each KM task.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce mode, perform the following:
e
To import d
a
e
KM in l i
replacement
n N
Fl ori1. Right-click the name of the KM that is to be replaced.
2. Select Import Replace from the context menu.
3. Enter the name of the XML file that contains the new version of the KM. You can use the
browse button to select a file. Note that you can replace only one KM at a time.
Consider regenerating any scenarios that use the KM to take the changes into account. This
includes both the mappings and packages. Regenerating scenarios is discussed later in the
course.
Note: You should regenerate any scenarios that use the KM. “Regenerate” keeps the version
number; do you want that or do you want a new version number? This will be discussed in the
lesson titled “Managing Object Versions.”
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
u (f nse
c lice by using the ODI substitution API. The API methods are Java
del as templates
KMs areewritten
n N that return a string value. They all belong to a single object instance named “odiRef”.
methods
i
r
loThe same method may return different values depending on the type of KM that invokes it. The
F following example illustrates how you would write a CREATE TABLE statement in a KM and what it
would generate. The following code is entered in a KM:
CREATE TABLE <%=odiRef.getTable("L", "INT_NAME",
"A")%>(<%=odiRef.getColList("", "\t[COL_NAME] [DEST_CRE_DT]", ",\n",
"", "")%>)
The generated code for the PRODUCT table is:
CREATE TABLE db_staging.I$_PRODUCT( P RODUCT_ID numeric(10),
PRODUCT_NAME varchar(250), FAMILY_ID numeric(4), SKU varchar(13),
LAST_DATE timestamp)
The generated code for the CUSTOMER table is:
CREATE TABLE db_staging.I$_CUSTOMER( CUST_ID numeric(10), CUST_NAME
varchar(250), ADDRESS varchar(250), CITY varchar(50), ZIP_CODE
varchar(12), COUNTRY_ID varchar(3))
After being executed with appropriate metadata, the KM has generated a different code for the
PRODUCT and CUSTOMER tables.
<%=odiRef.method_name(parameters)%> bl e
fe r a
• tra
Refer to the Knowledge Module Developer’s Guide-for
ns
o n
Oracle Data Integrator. an s
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cedirect calls to ODI methods implemented in Java. These methods are
e d
Substitution
e
methods l i
are
used
i n N
to generate text that corresponds to the metadata stored in the ODI repository or session
F lorinformation.
If you write an expression to express a business rule, you do not generally know in which context
this expression is run (not hard-coding schema names, host names, and so on). For instance, if
you refer to a specific schema by its name in your test setup, it may not work in your production
environment. But you want to be able to specify your table in a generic way. Substitution methods
enable you to do this. You can specify the table name with a substitution method. At run time, ODI
automatically adds the name of the appropriate physical schema for the context. You can also use
substitution methods to retrieve information about the current session. For example, you can
include the time when the session was launched, its name, or the code for the current context.
Similarly, substitution methods give you access to the metadata about the source and target of
your mapping. The general syntax to use a substitution method is as follows:
<%=odiRef.method_name(parameters)%>
Angle brackets with percentage signs enclose all substitution method calls. The equal sign tells
ODI to replace the tags and everything inside with the result of the method call.
odiRef is a special ODI Java object, which contains all the methods for performing substitution.
You can obtain more information about these methods in Knowledge Module Developer’s Guide
for ODI.
situation.
– They can be used in any KM or in actions.
• Methods that can be used specifically in KMs of a certain
type:
– Journalizing KM methods
– Loading KM methods ble
fe r a
– Integration KM methods ans
n - t r
– Check KM methods no
a
– Reverse-Engineering KM methods
) has eฺ
– Service KM methods om ฺ c u id
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cebe categorized depending on the type of KM in which they can be used.
e d
Substitution
emethods l i
can
i n N
Global methods are the methods that can be used in any situation (in all KMs and in actions). In
l o raddition to the methods from the “Global Methods” list, some methods can be used specifically in:
F
• Journalizing Knowledge Modules (JKMs)
• Loading Knowledge Modules (LKMs)
• Integration Knowledge Modules (IKMs)
• Check Knowledge Modules (CKMs)
• Reverse-Engineering Knowledge Modules (RKMs)
• Service Knowledge Modules (SKMs)
For details on using each substitution method, refer to Appendix A, “Substitution API Reference” in
Developing Knowledge Modules with Oracle Data Integrator.
ODI:
• '<%=odiRef.getColDefaultValue()%>'
• addFKs(): Call the Add Foreign Key action for all the foreign keys of the current table.
• dropFKs(): Call the Drop Foreign Key action for all the foreign keys of the current table.
• enableFKs(): Call the Enable Foreign Key action for all the foreign keys of the current
table.
• disableFKs(): Call the Disable Foreign Key action for all the foreign keys of the current
table.
• addReferringFKs(): Call the Add Foreign Key action for all the foreign keys pointing to
the current table.
• dropReferringFKs(): Call the Drop Foreign Key action for all the foreign keys pointing to ble
the current table. fe r a
ans
n - t r
• enableReferringFKs(): Call the Enable Foreign Key action for all the foreign keys
pointing to the current table.
no
a
• disableReferringFKs(): Call the Disable Foreign Key action for all the foreign keys
s
pointing to the current table. h a
) deฺ
c o m
• addChecks(): Call the Add Check Constraint action for all check constraints of the current
u i
table. e ฺ G
a cl ent
• dropChecks(): Call the Drop Check Constraint action for all check constraints of the
r
current table. @ o tud
l c his S
u
• addIndexes(): Call the Add Index action for all the indexes of the current table.
e
ฺ n ed se t
• dropIndexes(): Call the Drop Index action for all the indexes of the current table.
r in to u
• modifyTableComment(): Call the Modify Table Comment for the current table.
l o
(f nse
• AddColumnsComment(): Call the Modify Column Comment for all the columns of the
u
l c
current table.
e l i ce
e d
n N
F lori
c u @
“R”=Remote S “D”=Data
l i s
n e de e th
i nฺ © t2015, s and/or its affiliates. All rights reserved.
uOracle
o r
Copyright
o
u (fl nse
d e lc lice
e in Designer, you should avoid specifying physical information such as the database
When working
N
in orphysical
name
lorcorrect
schema name because they may change depending on the execution context. The
information will be provided by ODI at execution time by using substitution
F methods.
This API is overloaded in that there are half a dozen possible parameter syntaxes you could use,
each with its own set of parameter types and number of parameters. For example, should it expect
and return a partition name as part of the full name? That depends on the context.
Qualified name
Method Usable In
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
required
Any object named
OBJ_NAME getObjectName("L", "OBJ_NAME", "D") Anywhere
The target data LKM, CKM, IKM,
store of the current getTable("L", "TARG_NAME", "A")
mapping JKM
The integration (I$)
table of the current getTable("L", "INT_NAME", "A") LKM, IKM
mapping.
bl e
The loading table
(C$) for the current LKM fe r a
loading phase.
getTable("L", "COLL_NAME", "A")
an s
The error table (E$) n - t r
for the data store
being checked.
getTable("L", "ERR_NAME", "A")
a noCKM, IKM
LKM,
h a s
The data store
being checked getTable("L", "CT_NAME", "A")
m ) deCKM ฺ
ฺ c o u i
The data store
l e t G
referenced by a
foreign key rac uden "A") CKM
getTable("L", "FK_PK_TABLE_NAME",
o
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cemethods that calculate the fully qualified name of an object or data store
e d e
The substitution API l i
has
n N
taking into account the context at run time. These methods are listed in the table in this slide.
F lori
Option choices:
• “L”=Local (for example, schema.table) versus “R”=Remote (for example,
schema.table@hostname)
• “D”=Data versus “W”=Work schema versus “A”=Automatic. It enables ODI to determine
which physical schema to use (the Data schema [“D”] or the Staging (work) schema [“W”]).
• The auto-generated names are C$_0name, C$_1name, C$_2name, and so on, depending
on how many sources there are, where “name” is the target table name.
• In 12c, GUIDs also assigned to keep names unique.
• “CT_NAME” is Constraint Name.
“for” loop. ODI provides methods that help you generate code
based on lists. These methods return a string and accept at
least four parameters:
• Start
• Pattern
• Separator a b le
s f er
• End
- t r an
• Additional optional parameter: n on
s a
Selector h a ) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
clist
e d
Generating
e
code froml ia of items often requires a “while” or “for” loop. Oracle Data Integrator
N
in methods
addresses this issue by providing powerful methods that help you generate code based on lists.
F lorThese act as “iterators” to which you provide a substitution mask or pattern and a
separator, and they return a single string with all patterns resolved separated by the separator.
All of them return a string and accept at least these four parameters:
• Start: A string used to start the resulting string, for example: “CREATE TABLE”
• Pattern: A substitution mask with attributes that will be bound to the values of each item of
the list
• Separator: A string used to separate each substituted pattern from the following one, for
example, a comma
• End: A string appended to the end of the resulting string, for example, a closing parenthesis
Some of them accept an additional parameter (the Selector) that acts as a filter to retrieve only
part of the items of the list. For example, list only the mapped column of the target data store of a
mapping.
Some of these methods are summarized in the tables on the following pages.
getTargetColList() Returns the list of columns in the target data LKM, CKM, IKM, JKM,
store SKM
Returns the list of columns defined for an
CKM, SKM
getAKColList()
alternate key
ble
getPKColList() Returns the list of columns in a primary key CKM, SKM fe r a
ans
getFKColList() Returns the list of referencing columns and
referenced columns of the current foreign key
CKM, SKM
n - t r
getSrcTablesList() Returns the list of source tables of a mapping a no LKM, IKM
Returns the list of filter expressions in a) h
as ฺ
getFilterList()
mapping o m uidLKM, e IKM
l c
eฺ nt G
c
ra ude
@ St o
l c u is
e d e t h
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u ce
Note e d e l i
n N
ri• Instead of the getPKColList() method, you can alternatively use getColList with the
Flo selector parameter set to “PK.”
• Instead of getSrcTablesList(), whenever possible use the getFrom method. The
getFrom method is discussed later in this lesson.
• Instead of getFilterList(), use the getFilter() method, which is more appropriate
in most cases.
• KM code:
Create table MYTABLE
<%=odiRef.getTargetColList("(\n",
"\t[COL_NAME] [DEST_WRI_DT]", ",\n", "\n)")%>
• Generates the following formatted statement: e
r a bl
Create table MYTABLE (
ns fe
CUST_ID numeric(10),
t r a
CUST_NAME varchar(250),
n on-
ADDRESS varchar(250), NoteNote
thethe
s
carriage a
carriage
returns
returns
froma
) h"\n"dparms.
from
the the
CITY varchar(50),
m
optional
“\n”
o
parms.
i eฺ
ZIP_CODE varchar(12),
l e ฺc t Gu
COUNTRY_ID varchar(3)
o rac uden
) u@ St lc this
e d e
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u ce
e d e
In this example: l i
n N
lori return (\n).
• Start is set to "(\n": The generated code will start with a parenthesis followed by a carriage
F
• Pattern is set to "\t[COL_NAME] [DEST_WRI_DT]": The generated code will loop over
every target column and generate a tab character (\t) followed by the column name
([COL_NAME]), a white space, and the destination writable data type ([DEST_WRI_DT]).
DEST_WRI_DT is a variable, not a keyword, for example, NUMERIC, VARCHAR, CLOB, and so
on.
• The Separator is set to ",\n": Each generated pattern will be separated from the next one
with a comma (,) and a carriage return (\n).
• End is set to "\n)": The generated code will end with a carriage return (\n) followed by a
parenthesis.
n e de e th
i nฺ © t2015, s and/or its affiliates. All rights reserved.
uOracle
o r
Copyright
o
u (fl nse
d e lc the values
l i ce that need to be inserted into MYTABLE are either bind variables with
e
In this example,
N
then same name as the target columns or constant expressions if they are executed on the target.
F lorToi obtain these two distinct set of items, the list is split using the Selector parameter:
• "INS AND NOT TARG": First, generate a comma-separated list of columns ([COL_NAME])
mapped to bind variables in the “value” part of the statement (:[COL_NAME]). Filter them to
get only the ones that are flagged to be part of the INSERT statement and that are not
executed on the target.
• "INS AND TARG": Then generate a comma-separated list of columns ([COL_NAME])
corresponding to expression ([EXPRESSION]) that are flagged to be part of the INSERT
statement and that are executed on the target. The list should start with a comma if any
items are found.
• To obtain the result set from any SQL source server, use
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
• To obtain the result set from any SQL Staging Area server fe r a
n s
to build your final flow data, use the following SELECT
n - tra
statement in your IKM:
a no
h a s
)REW")%> eฺfrom
select <%=odiRef.getPop("DISTINCT_ROWS")%> <%=odiRef.getColList("",
"[EXPRESSION]", ",\n\t", "", "(not TRG) oand m i d
<%=odiRef.getFrom()%> where (1=1) <%=odiRef.getJoin()%> l e ฺc t Gu
r
<%=odiRef.getFilter()%> <%=odiRef.getJrnFilter()%>
o ac den
c u @ Stu
<%=odiRef.getGrpBy()%> <%=odiRef.getHaving()%>
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce of code you use to obtain the result set from any SQL RDBMS
e
This slide d e
shows you l i
examples
n N
source server and any SQL RDBMS Staging Area server to build your final flow data.
F lori
Note that the getColList is filtered to retrieve only expressions that are not executed on the
target and that are mapped to writable columns. Because all filters and joins start with an AND, the
WHERE clause of the SELECT statement starts with a condition that is always true (1=1).
@ o tud
<%=odiRef.getFilter(i)%> <%=odiRef.getJrnFilter(i)%>
<%=odiRef.getGrpBy(i)%> <%=odiRef.getHaving(i)%> <%}%>
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cEarlier
e d e
ODI supports l
datasets.i versions, such as 11g, required the use of datasets, 12c does not.
EachN
in dataset represents a group of joined and filtered sources tables, with their mappings.
F lorDatasets are merged into the target data store by using set-based operators (UNION, INTERSECT,
and so on) at the integration phase.
During the loading phase, the LKM always works on one dataset. During the integration phase,
when all datasets need to merged, certain odiRef APIs that support working on a specific dataset
are called using an index that identifies the dataset. The example in this slide explains how this
dataset merging is done. A Java For loop iterates over the datasets. The number of datasets is
retrieved by using the getDataSetCount method.
For each dataset, a SELECT statement is issued, each statement separated from the previous one
by the dataset’s set-based operator retrieved by using the getDataSet method. The SELECT
statement is built as in Generating the Source Select Statement (see previous slide), except that
each method call is parameterized with i, the index of the dataset being processed. For example,
getFrom(i) generates the FROM statement for the dataset identified by the value of i. All the
methods that support a parameter for the dataset index also support a syntax without this index
value. Outside an IKM, these methods should be used without the dataset index. Within an IKM, if
used without the dataset index, these methods address the first dataset.
All the methods that support a parameter for the dataset index also support mappings and KMs.
new one.
a. True
b. False
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
Answer:ebd
el lice
i n N
lo r
Explanation: Duplicating an existing KM and enhancing it by changing its technology, or copying
F lines of code from another KM is a regular practice for developing a KM. Note that some of the
built-in KMs cannot be duplicated.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce of KMs out of the box. It is recommended that you start by reviewing
e d
ODI provides
e a large l i
number
n
the N
existing
i customize KMs and start from an existing KM that is close to your use case. Duplicate this KM
F lorand it by editing the code.
When developing your own KM, remember that it is targeted at a particular stage of the integration
process. As a reminder:
• LKMs are designed to load remote source data sets to the Staging Area into Loading (“C$”)
tables. LKMs is plural because it always implies multiple data servers.
• IKMs apply the source flow from the Staging Area to the target. They:
- Start from the Loading tables
- May transform and join them into a single integration (“I$”) table
- May call a CKM to perform data quality checks on this integration table
- Finally write the flow data to the target
Optional Host
Source
Transform and
ble
Staging Area integrate
Target
fe r a
ORDERS
LKM TEMP_1 IKM SALES
an s
n - t r
LINES
Extract/Join/
Transform IKM
TEMP_
SALES a no
Join/Transform
h a s
m ) CKMdeฺ ERRORS
LKM TEMP_2
ฺ c o u i
e
cl ent G
CORRECTIONS
File
Extract/Transform
r a
o tud
Check constraints/
Isolate errors
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
l data e
cquality
e
• CKMsd echeck l i in a data store or an integration table (“I$”) against data quality
N
in rules expressed as constraints. ODI will not override active DB constraints. You can,
r
Flo however, relax DB constraints. The rejected records are stored in the error table (“E$”).
• If Static=True and Flow=False, then CKM is triggered AFTER the IKM loads the data,
so you will potentially insert/update bad data.
• If Static=True and Flow=True, then it does NOT insert/update bad data, but rather it
diverts those rows into an error table named E$_targ_name.
• So Static does not remove rows, only flags them. Flow DOES remove (really “diverts”)
the rows.
• RKMs are in charge of extracting metadata (reverse-engineer) from a metadata provider to
the ODI repository by using the SNP_REV_xx temporary tables.
• JKMs are in charge of creating and managing the Change Data Capture (CDC)
infrastructure via journaling. JKMs are used with Oracle GoldenGate (OGG) integration. This
is covered in more detail in the lesson titled Choosing Integration Strategies: Best Practices.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
bl e
<%
fe r a
myVar = 'VAR'; n s
%> n - tra
... a no
h a s
select ...
m ) deฺ
from ... ฺ c o u i
l e G
rac ent
where COL1 = <%=myVar%>
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cODI
The codee d e
generation l
ini is able to interpret any Java code enclosed between “<%” and “%>”
n
tags. N
F lori
connect my_user/<%=odiRef.getInfo("DEST_ENCODED_PASS")%>
insert into <%=odiRef.getTable("L","TARG_NAME", "D")%>
select <%=odiRef.getColList("", "[COL_NAME]", ", ", "", "")%> 1
...
Compiled by ODI Designer Generation of a session or a scenario
connect my_user/<?=odiRef.getInfo("DEST_ENCODED_PASS")?>
insert into <?=odiRef.getObjectName("L","TARG_NAME", "MY_LSCHEMA", "D")?>
select EMP_ID, EMP_NAME, EMP_CODE 2
...
ble
Compiled by the Agent Written in the Logs
fe r a
ans
connect my_user/<@=odiRef.getInfo("DEST_ENCODED_PASS")@>
n - t r
no 3
insert into SCOTT.EMP
select EMP_ID, EMP_NAME, EMP_CODE
...
s a
Compiled by the Agent Execution h
) deฺ a
c o m u i
e ฺ G
cl ent
connect my_user/M4678GHT
insert into SCOTT.EMP
o r a d 4
select EMP_ID, EMP_NAME, EMP_CODE
...
u@ is S t u
l c
n e de e th
i nฺ © t2015, s and/or its affiliates. All rights reserved.
uOracle
o r
Copyright
o
u (fl nse
d e lc lice
N e
This slide shows examples of code generation tags used in compilation steps:
n Procedure / KM as it appears in ODI Designer. The “connect” is to log in to SQL*Plus
lori (sqlplus).
1.
F
2. Generated Code:
- Independent from the context, schema different for each physical context. Schema still
a variable.
- Resolution of the attribute (column list) names
- Scenario or session ready to be executed
3. Generated code:
- Resolution of the context (schema.tablename). Password still a variable.
- Sensitive information
- Visible in the ODI logs
4. Executed code, includes the encoded password
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
u (f nse
e c
l method
l i ceretrieves the SQL join string (on the source during the loading, on the
e d
The getJoin()
n N
Staging Area during the integration) for a given result of a mapping.
F lori
Parameter
pDSIndex (Int): Index identifying which of the datasets is taken into account by this command
Note: The pDSIndex parameter can be omitted when this method is used in an LKM. It can also
be omitted for IKMs. In this case, the dataset taken into account is the first one.
u (f nse
e c
l method l i ce returns filter expressions separated by an AND operator. When used
e d
The getFilter()
an N
inin LKM, it returns the filter clause because it should be executed by the source server. When
F lorused in an IKM, it returns the filter clause because it should be executed by the Staging Area
server.
Notice the WHERE (1=1). This is where a filter would go regardless of whether you do or do not
have a filter. Your clause is added via an AND operator to the always-present 1=1.
The join clauses are considered part of the WHERE.
a journalized table
– Usage: public java.lang.String
getSubscriberList( java.lang.String pStart,
java.lang.String pPattern, java.lang.String
pSeparator, java.lang.String pEnd)
– Parameters (String): e
r a bl
• Example: s fe
- t r an
no
<%=odiRef.getSubscriberList("\nBegin List\n", n
s a
"- [SUBSCRIBER]", "\n", "\nEnd of aList\n")%>
m ) h deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce method returns a list of subscribers for a journalized table. The
d e l i
e parameter is interpreted and then repeated for each element of the list, and separated
The getSubscriberList()
n N
i its predecessor with the pSeparator parameter. The generated string begins with pStart
pPattern
F lorfrom
and ends with pEnd. If no element is selected, pStart and pEnd are omitted and an empty string
is returned.
Parameters (String):
• pStart: This sequence marks the beginning of the string to generate.
• pPattern: The pattern is repeated for each occurrence in the list. The list of the attributes
usable in a pattern is detailed in the following Pattern Attributes List. Each occurrence of the
attributes in the pattern string is replaced by its value. Attributes must be between square
brackets ([ and ]). Example:
My name is [SUBSCRIBER]
• pSeparator: This parameter separates each pattern from its predecessor. Example: new
line "\n".
• pEnd: This sequence marks the end of the string to generate.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
• Correct statement:
bl e
BEGIN fe r a
SCHEMA.PACKAGE.MYPROC(PARAM1, PARAM2); -tra
ns
n on
END; a s
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cethe call made to a non-SQL syntax, such as the call to an Oracle-stored
e d
A frequent
e
cause is l i
also
n N
procedure using the inappropriate syntax:
Fl ori EXECUTE SCHEMA.PACKAGE.MYPROC(PARAM1, PARAM2)
The valid SQL call for a stored procedure in this environment is:
BEGIN
SCHEMA.PACKAGE.MYPROC(PARAM1, PARAM2);
END;
You can minimize syntax errors by using the Expression Editor (the gear), which dynamically
checks syntax against the selected technology as you type.
Note: The syntax EXECUTE SCHEMA.PACKAGE.PROC(PARAM1, PARAM2) is specific to
SQL*Plus, and does not work with JDBC.
generation?
a. ODI <%if%> statements
b. Check box options
c. Substitution parameters
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ebd
el lice
i n N
lo r
Explanation: You should avoid using <%if%> statements instead of check box options for
F conditional code generation. Substitution is used for portability, not conditional code. See the
section titled “Developing KMs: What to Avoid and What to Use” for more information.
code?
a. Write the KM entirely in Java.
b. Use numeric variable names such as VAR01 and VAR02
instead of descriptive names such as Cust_ID and
Last_Name.
ble
c. Use the built-in Expression Editor.
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ecd
el lice
i n N
lo r
Explanation: The Expression Editor does syntax checking as you type, as well as highlighting
F matched and unmatched brackets and parentheses.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Optional Host
Source
Transform and
ble
Staging Area integrate
Target
fe r a
ORDERS
LKM TEMP_1 IKM SALES
an s
n - t r
LINES
Extract/Join/
Transform IKM
TEMP_
SALES a no
Join/Transform
h a s
m ) CKMdeฺ ERRORS
LKM TEMP_2
ฺ c o u i
e
cl ent G
CORRECTIONS
File
Extract/Transform
r a
o tud
Check constraints/
Isolate errors
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cisealways needed in a mapping. This process integrates data from the
e d e
An integration l
process i
n N
source or loading tables into the target datastores by using a temporary integration table.
Fl ori
An integration process uses an integration strategy, which defines the steps required in the
integration process. The following elements may be used in the integration process:
• An integration table (also known as the flow table) is sometimes needed to stage data after
all Staging Area transformations are made. This loading table is named after the target table,
prefixed with I$_. This integration table is the image of the target table with extra fields
required for the strategy to be implemented. The data in this table is flagged, transformed, or
checked before being integrated into the target table. In this example, TEMP_SALES would
really be named I$_SALES.
• The source (C$_name) and/or loading tables (created by the LKM). The integration process
loads data from these tables into the integration table or directly into the target tables. In this
example, TEMP_1 would really be named C$_0, and TEMP_2 would really be named C$_1.
• Mapping metadata
Optional Host
Source
Transform and
ble
Staging Area integrate
Target
fe r a
ORDERS
LKM TEMP_1 IKM SALES
an s
n - t r
LINES
Extract/Join/
Transform IKM
TEMP_
SALES a no
Join/Transform
h a s
m ) CKMdeฺ ERRORS
LKM TEMP_2
ฺ c o u i
e
cl ent G
CORRECTIONS
File
Extract/Transform
r a
o tud
Check constraints/
Isolate errors
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceModule. The IKM may initiate a flow check phase to check the data in the
e
• Checkd eKnowledge l i
i n N
integration table against some of the constraints of the target table.
r
Flo -Invalid data is removed from the integration table (removed from the flow). It is possible
to re-inject the “bad” rows later.
• Mapping metadata, such as Insert, Update, UD1, and so on, or model metadata such as the
Slowly Changing Dimension (SCD) behavior. They are used at the integration phase to
parameterize column-level behavior in the integration strategies.
- Insert: You can make a SYSDATE inserted as a CREATION_DATE column on the
target, but that is a rare thing to happen on the target.
- UD1: “Unique iDentifier 1”: used in flat files for “key” fields. They could be column
positions, or an XML tag. ODI will enforce “unique and not null” (that is, act like a
primary key) on a flat file. So numbers UD1, UD2, and UD3 can be thought of as the
“order of the composite keys.”
- SCD: You may want to add old/new values, or DATE_CHANGED, and so on.
- UDn and SCD flags can only be used in an IKM.
Source
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cthee three factors that structure the flow. The most important is choosing
e
Now look d
at
ethe first l
of i
n
whereNto put the Staging Area.
F lori
Source Target
Transform and
(MySQL) integrate (Oracle)
ORDERS 4
1 C$_0
4 SALES
Extract/Join/
LINES Transform 33 I$_SALES
bl e
Join/Transform
fe r a
2 C$_1
an s
CORRECTIONS
n - t r
no
Extract/Transform
File
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cofe operations is more or less unavoidable to implement this integration.
e d e
The following l
sequence i
n N
However, you have some latitude in controlling how and where they are performed.
F lori1. The two source orders tables must be extracted and joined. The constraint that orders must
be closed is applied here.
2. Data from the corrections file must be extracted and transformed into the correct format. This
happens to be a “File to SQL LKM.”
3. Now, data from these two sources must be joined and transformed into a temporary table,
I$_SALES. This temporary table looks identical to the target SALES table.
4. The data from this table must be copied to the target Oracle server by using an IKM.
5. (Not shown) You can also optionally do a data check, or Flow Control, by using a CKM.
6. (Not shown) You can also optionally do journalizing to track changed data by using a JKM.
But the big question is WHERE do you do those things that are shown in the middle of the slide?
The short answer is, “It depends.” Answering that question more thoroughly is the topic for the
next section of this lesson.
n - t r
SALES
LINES
Extract/Join/
Transform
3 TEMP_
a no
Join/Transform SALES
h a s
m ) d4 eฺ ERRORS
2
2 TEMP_2
ฺ c o u i
e
cl ent G
CORRECTIONS
File
Extract/Transform
r a
o tud
Check constraints/
Isolate errors (CKM)
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce most of the transformation and error checking is usually performed.
e d
The Staging
e Area is l i
where
n
After N
those tasks are performed, you copy or load the data into the target server.
F lori
The Staging Area is a special area that you create or assign when you set up a database in ODI.
ODI creates temporary tables in the Staging Area, and uses them to perform data transformation.
To prevent temporary tables from cluttering production catalogs, at the very least the Staging Area
should be a separate, dedicated schema (but it does not have to be). To simplify backup
considerations, often the Staging Area is a separate, dedicated tablespace (on technologies
where that is appropriate).
You can place the Staging Area on your source server, your target server, or another server
altogether. However, the best place for the Staging Area is usually on the target (or bigger) server.
This gives you the greatest scope for data consistency checking, and minimizes network traffic.
You now look at some of the consequences of different choices.
But what happens if you decide (or politics dictates) that the Staging Area is not on the target?
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Area, which is different from the target. ODI provides two ways
for loading the data from a Staging Area to a Target:
ble
IKM LKM IKM fe r a
ans
n - t r
Staging Target Staging
a noTarget
h a s
m ) deฺ
ฺ c o u i
TEMP_1 SALES TEMP_1
e
cl ent G SALES
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce to design an ETL-style mapping where the Staging Area is an RDBMS
e d e
In this topic, you l
learn ihow
n N
database or any ANSI-92–compliant database and the target on an RDBMS database.
F lori
In an ETL-style mapping, ODI processes the data in a Staging Area, which is different from the
target (perhaps, due to politics, you are not allowed to make temporary objects on target).
“Different” here could mean on the source, or a third server, or even just a different instance in the
same host server.
ODI provides two ways for loading the data from a Staging Area to a Target:
• Using a Multi-Connection IKM: A Multi-Connection IKM allows updating a target where the
Staging Area and sources are on different data servers.
• Using an LKM and a Mono-Connection IKM: If there is no dedicated Multi-Connection
IKM, use a standard exporting LKM in combination with a standard Mono-Connection IKM.
Note: Depending on the KM strategy that is used, flow and static control are supported.
Exporting CKM
ble
LKM LKM
fe r a
ans
JDBC or n - t r
DB*Link
a no
Staging h a s Mono-
transformations
o m ) Connection
i d eฺ IKM
e ฺ c G u
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e
Configuration: l i
n N
F lorIfithere is no dedicated Multi-Connection IKM, use a standard exporting LKM in combination with a
standard Mono-Connection IKM. This slide shows the configuration of an integration mapping
using an exporting LKM and a Mono-Connection IKM to update the target data. The exporting
LKM is used to load the flow table from the Staging Area to the target. The Mono-Connection IKM
is used to integrate the data flow into the target table.
Limitations:
Note that this configuration (LKM + exporting LKM + Mono-Connection IKM) has the following
restrictions:
• Changed Data Capture (CDC) of any kind is not supported: neither simple CDC nor
consistent CDC are supported when the source is on the same data server as the Staging
Area (explicitly chosen in the Mapping Editor).
• Temporary Indexes are not supported.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Source Target
Mapping
with IKM
Errors bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
liceto recycle errors from previous runs so that they are added to the flow
del it is useful
In someecases,
and
i n N again to the target. This method can be useful, for example, when receiving daily
applied
o r
Fl sales transactions that reference product IDs that may not exist (yet). Suppose that a sales record
is rejected in the error table because the referenced product ID does not exist in the product table.
This happens during the first run of the mapping. In the meantime, the missing product ID is
created by the data administrator. Therefore, the rejected record becomes valid and should be re-
applied to the target during the next execution of the mapping.
This mechanism is implemented by IKMs with an extra task that inserts all the rejected records of
the previous executions of this mapping from the error table into the integration table. This
operation is made before calling the CKM to check the data quality, and is conditioned by a KM
option, usually called RECYCLE_ERRORS. This is used to optionally insert the corrected rows the
next time.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
– Lookups
– Datasets
– Sets
• Partitioning
• Reusable Mappings e
r a bl
s fe
- t r an
no n
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Component
Palette
bl e
More on this fe r a
later…
ans
n - t r
a no
h a s
The order
m ) deฺ
matters!
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cavailable
A Lookupe d e
component l i
is in the Component Palette to create lookups by using a source
N
orin
as the driving table and a lookup datastore or mapping. These lookups now appear as compact
Fl graphical objects in the mapping sources diagram.
This feature simplifies the design and readability of mappings that use lookups, and enables
optimized code for execution.
Ensure that the technology you have chosen supports lookups. There are three possible levels of
Lookup Support: None | Join | Select. In this case, the lookup is just a special case of a join. Drag
the Lookup Component from the Palette on the right and drop it in between the source and target
tables. The Lookup Condition is:
SRC_CUSTOMER.SALES_PERS_ID = SRC_SALES_PERSON.SALES_PERS_ID
You can hook up the two inputs by dragging the connectors, or by selecting them from the
Connected From pull-downs. Be careful which you have as the driving table (usually the bigger
one) and which you have as the lookup table (usually the smaller one) because that affects the
cost-based optimizer in composing the SQL.
Source
Sales Name
Target Sales
Name
bl e
fe r a
an
Attribute s
- t r
Expression
n
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceusing a lookup is to denormalize a table. The source datastores have the
e d
The business
e reason l i
for
n N
salesperson information in a separate table from the customers, and they are linked by the join
i of SALES_PERS_ID.
F lorcriteria The goal is to add the salesperson’s LAST_NAME and FIRST_NAME
to the target customer datastore.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceis an RDBMS, and the tables all have primary keys, and the foreign key
e d e
If your source l
technologyi
n N
relationships
i technologyare set up properly, then you should never get this situation. But what happens if the
F lorsource is a file-based datastore? What happens if the “unique and not null” (primary
key) constraint was never set on the SALES_PERS_ID in SRC_SALES_PERSON? This Lookup
Match Rows Multiple Match option can accommodate bad source data and let you transform it into
good target data. You might have a business rule that declares that the last one in the file “wins.”
If your data was set up properly in the first place, then it does not matter what you put here, the
default is fine.
Only one
option
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u ce
is d
If there e
el
no match inlithe lookup table, then you want to at least see what was the value that did
not
i n N (like an outer join). To do that, rather than just error out, insert the unmatched row with
match
r
lothe driving table attribute value where the missing lookup value should have been. You can also
F insert a string value, such as “Missing person!”, or another attribute from the driving table, or a
calculated value, such as SYSDATE.
• Set operators
• Merging several data flows in target(s)
• Mappings and diagrams are per data
flow
• Benefits: e
– Faster design r a bl
s fe
– Better performance - t r an
n no
– 11g compatibility a
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cwith,
e
A dataset dis
eoften l
used i but is unrelated to, a set operator.
N
Fl orAindataset represents the data flow that comes from a group of joined and filtered source
datastores. One target can be loaded with data coming from several datasets.
Set-based operators (UNION, UNION ALL, INTERSECT, MINUS, and so on) are used to merge the
different datastores or datasets into the target datastore(s). DISTINCT (a new component with
12c) is not really a set operator, but acts like one.
Each dataset corresponds to one diagram of source datastores and the mappings used to load the
target datastore from these source datastores.
• Benefits of using datasets:
- Accelerates the mapping design
- Reduces the number of mappings needed to merge several data flows into the same
target datastore
- Allows you to “think” in an 11g-style interface
• Drawbacks of datasets:
- They are no longer required, so they are extra overhead (a performance hit).
- They may make the execution location an all-or-nothing decision.
COUNTRY
-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Staging: MEMORY_ENGINE
CUSTOMER
LKM SQL to DataSet0 - Orders
-
REGION Oracle LOAD)
ORDERS C$ (SS0)
Target: ORACLE_SERVER1
fe r a
C$ (SS1) UNION ALL
an s
CURRENCY
-
IKM SQL
n - t r
no
DataSet2 - Bookings
to SQL
PRODUCTS
s a Append
-
SS_2 (3): DB2_HSCM
C$ (SS0)
h
) deฺ a
LKM DB2
c o m u i
to Oracle
EMPLOYEE
e ฺ MINUS
G
BOOKINGS (LOAD)
r a cl ent
PRODUCTS
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l
(f nseo
c u ce
The useeof
el
ddatasets islioptional, but it may help you to think in terms of a “black box of data”
n N to a reusable mapping, covered later in this lesson).
(similar
i
lo r
F
Only one
port: output
ble
fe r a
ans
n - t r
a no
h a s
Connection
m ) deฺ
can be
Lookup or ฺ c o u i
Join.
Join e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e
To create d
a
enew l i
dataset:
n N
Fl ori1. Either create an empty dataset when making a new mapping, or drag a Dataset icon from
the Component Palette into the workspace.
2. Drag datastores into the dataset.
3. Drag an attribute (for example, SRC_ORDERS.CUST_ID) from one datastore onto its
matching attribute in another datastore (for example, SRC_CUSTOMER.CUSTID). Note that
different spelling is allowed for attributes/columns.
4. Decide if you want the connection to be a Join or a Lookup.
ORD_05
ORDERS2
ORDERS1
CORRECT
UNION
LINES
SALES
ble
LINES INTERSECT
fe r a
MINUS
ans
n - t r
MODIF_File1
a no
h a s
MODIF_File1
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce are shown merged into the mapping target datastore using set-
e d
In this slide,
eseveral l i
datasets
i n
based N operators such as UNION and INTERSECT.
lo r
F Note that the support for datasets as well as the set-based operators supported depend on the
capabilities of the Staging Area’s technology.
The set-based operators are always executed on the Staging Area.
When designing the integration mapping, the mappings for each dataset must be consistent. This
means that each dataset must have the same number and type of target columns mapped.
ble
fe r a
This icon…
ans
…makes
n - t r
this set.
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce for using set-based operators successfully.
e
This slide d e
offers l i
guidelines
n N
lori
• Make sure that your technology supports set-based operators.
F - Check Support Set Operators.
• In your mapping, add several datasets or datastores:
- Save before adding datasets.
- Share the same target structure.
- Order counts for precedence.
• Select an IKM that supports datasets (though datasets are optional with sets).
- Datasets are merged from the Staging Area.
The yellow (unmatched) and gray (matched) arrows in the UNION set are based on the default
auto-mapping. You will probably have to do some more transformations to get the columns to be
the same number and type. For example, the DEAR in SRC_CUSTOMER is numeric (0, 1, 2), and
the DEAR in the two TRG_ tables is VARCHAR (‘Mr.’, ‘Mrs.’, ‘Dr.’), so a CASE needs to happen. Also
the TRG_ tables are expecting a single CUST_NAME whereas the SRC_ has separate LAST_NAME
and FIRST_NAME that will need to be concatenated. Lastly, you may choose to ignore
SALES_PERS_ID in the SET because there is no match in the TRG_ tables.
Partitioning
• Reusable Mappings
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Partitioning features:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
, cust_first_name VARCHAR2(20)
, cust_last_name VARCHAR2(20)
Partition
, cust_address VARCHAR2(20) key
, nls_territory VARCHAR2(30)
, cust_email VARCHAR2(30))
PARTITION BY LIST (nls_territory) (
PARTITION asia VALUES ('CHINA', 'THAILAND'),
PARTITION europe VALUES ('GERMANY', 'ITALY', 'SWITZERLAND'),
PARTITION west VALUES ('AMERICA', 'MEXICO', 'BRAZIL' ),
PARTITION east VALUES ('INDIA', 'PAKISTAN'));
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
del
Partitioneinformation licebe reverse-engineered by using Customized (not Standard) Reverse
can
n N Knowledge Modules (RKMs), or can be manually created into models.
Engineering
i
lo r
F
Blank (null)
means that you
ble
will ignore
fe r a
partitions in
an s
t r
SELECT.
n -
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cspecify
e d e
In a mapping, you l
can i the use of partitions on a target datastore.
N
nUPDATE and INSERT, this may not apply. For SELECT statements, this is a performance
lori
For
F issue, not a “requirement.” But what happens if you do not do this? DML INSERT still works
correctly anyway. This is really metadata, more of a hint than a directive.
• Partitioning
Reusable Mappings
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
an s
n - t r
a no
Either this way…
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud …or this way.
@
cu his S
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e
Two typesd e
of ODI l i
mappings:
n N
lori
• Target datastore is permanent (predefined in the model; icon shows a straight arrow).
F • Target datastore is reusable, or temporary (defined in the mapping; icon shows circular
arrows).
You can create a mapping that would not have a predefined, permanent target datastore. In this
case, all rows in the target are derived from the rows of one or more source datastores. These
mappings are referred to as “reusable mappings.” Such mappings are designed to be used by
other mappings as sources or targets for further transformation. In some ways, this is similar to a
dataset.
For purposes of configuring the signature, the input signature uses only the output port, and the
output signature uses only the input port. Even though there is an output port on the reusable icon
in this mapping, it is not intended for use in this context. On the other hand, when it comes time to
use the signature in another mapping (as shown in the next slide), then the input signature uses
only the input port, and the output signature uses only the output port (as their names suggest).
Note: This is similar to an Oracle Database inline view.
Reusable
mapping is used
as a source
datastore in the
permanent
mapping.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce mapping would show up in lots of other mappings, similar to a
e d
The intention
e is that al i
reusable
n N
database view. (If you only used it once, then why bother defining it as a separate reusable thing?)
F lorIni this example, the reusable mapping myReusable, with its target datastore TRG_SALES, is used
in place of a source datastore for the mapping myMap. You can have other datastores and other
permanent mappings in the integration with the reusable mapping at the same time.
In Mapping Properties, you can see that the rows of the reusable mapping are mapped to the rows
of the target datastore (more has to be done, this is just a start).
ble
fe r a
ans
n - t r
If this is selected… a no
h a s
…and it is a reusable
m ) deฺ
mapping…
ฺ c o u i
e
cl ent G
…then this option
may appear. r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l
(f nseo
l c u cedatastore that is the target in reusable mapping as a source or as a
e
When usingd ea temporaryl i
n N
lookup table for another mapping, you can choose:
F lori• To use a persistent temporary datastore: You will run a first mapping creating and loading
the temporary datastore, and then a second mapping sourcing from it. In this case, you
would typically sequence the two mappings in a package.
• To use a sub-select: The second mapping generates a sub-select corresponding to the
loading of the temporary datastore. This option is not always available because it requires all
datastores of the source mapping to belong to the same data server (for example, the source
mapping must not have any source sets). You activate this option by selecting Subselect
Enabled on the source.
Note the following when using a reusable mapping as a derived table:
• The generated sub-select syntax can be either a standard sub-select syntax (default
behavior) or the customized syntax from the IKM used in the first mapping.
• All IKM commands except the one that defines the derived-table statement option “Use
current command for Derived Table sub-select statement” are ignored. This limitation
causes, for example, the disabling of support for temporary index management.
REU_1
REU_2
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce to using derived select for reusable mappings. A reusable mapping
There aree d e
some l i
limitations
i n
REU_1 N becomes eligible to be a source derived table in another parent mapping REU_2 if, and
r
loonly if:
F
• All source datastores and submappings of REU_1 are on the same physical server as the
target table of REU_2
• The technology of this physical server supports derived tables in the FROM clause
• No datastore within REU_1 is used as journalized
successfully?
a. Your technology must support set-based operators.
b. You must use a file-based technology.
c. The source and target structures must be different.
d. You must use datasets to support sets. e
r a bl
s fe
- t r an
n no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ead
el lice
i n N
lo r
Explanation: Make sure that your technology supports set-based operators. Check Support Set
F Operators.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
– Flags
– Creating
– Restoring
• Version Browser
ble
fe r a
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u celesson examines how ODI supports version management.
e
The first d e
section of l i
this
n N
F lori
can be versioned.
• Creating a version generates the
XML definition of an object.
• Versions can be restored into any
Work Repository.
• ODI provides a tool (Version a b le
s f er
Browser) to display versions. an
- t r
• Versions of ODI objects can be n on
compared by using the Version s a
a
h eฺ
Comparison Tool, highlighting the om) id
differences in colors. e ฺ c G u
cl nt ra ude
@ St o
l c u is
e d e t h
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u ce can be versioned:
e d e
The following ODI l i
objects
n N
lori
• Projects • Scenarios
F • Folders • Model Folders
• Packages • Models
• Mappings • User Functions
• Procedures • Variables
• Sequences
A version is a backup copy of an object. It is checked in at a given time and may be restored
later. Versions are saved in the Master Repository. They are displayed on the Versions tab of
the object window.
Creating a version creates the XML definition of the object, and then stores it in compressed
form in the Master Repository version tables.
bl e
fe r a
Object Statusniss
a
n-tr
“U” = Updated
no
s a
h a
o m ) Object
i d eฺ status is
l e ฺc t Gu“I” = Inserted
o rac uden
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce is created or modified, a flag is displayed in the tree view on the
When ane d e
object in l i
Designer
n N
lori
object icon to indicate its status:
F • I = Object status is inserted.
• U = Object status is updated.
When an object is inserted, updated, or deleted, its parent objects are recursively flagged as
updated. For example, when a step is inserted into a package, it is flagged as inserted, and
the package, folder(s), and project containing this step are flagged as updated. When an
object version is created, the flags on this object are reset.
bl e
fe r a
ans
- t r
no3n a
a s
m ) h deฺ
1 ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d
To create
e
a version:l i
n N
lori
1. Select the object for which you want to check in a version. Right-click and select Version
F > Create Version.
2. A window appears. In this window, the Previous Versions (>) button in the top-right
corner expands or collapses the list of versions already checked in. An incremented
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, description, and the name of the user who performed the checkin operation.
2 e
r a bl
s fe
- t r an
n no 3
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
1 @o
u S tud
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce cannot be undone. It permanently erases the current object and
e d e
Note: Restoring a l i
version
n N
lori
replaces it with the selected version.
F 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 Yes to confirm the restore operation.
Version Browser
– Comparisons
– Solutions
– Locking for concurrent changes
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u celesson examines how the Version Browser works.
e
The nextd e
section of l i
this
n N
F lori
Export
version
as an
XML file.
1
2 Restore the
version.
ble
fe r a
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl e3nt G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce Browser to browse the versions stored in the repository.
e
You can d e
use the l i
Version
n N
lori
1. In the ODI menu, select Version Browser.
F 2. Use the object type and object name drop-down boxes to filter the objects for which you
want to display the list of versions.
3. From the Version Browser, you can restore, export to XML file, or delete existing
versions.
Note: The Version Browser displays the versions that existed when you opened it. Click
Refresh to view all the new versions created since then.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce highlighted. The following color code is applied:
e d e
The differences are l i
color
n N
lori
• White (default): Unchanged
F • Red: Deleted
• Green: Added/new
• Yellow/Brown: Modified (the value inside this field has changed)
Note: If one object does not exist in one of the versions (for example, when it has been
deleted), it is represented as an empty object (with empty values).
…or…
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
1
ble
fe r a
ans
n - t r
a no
h a s2
m ) deฺ
Modified
ฺ c o u i
entries e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cine the Projects tree view. From the Projects tree view in Designer,
e d
• Select
e the l i
object
i n Nselect the object whose versions you want to compare.
r
Flo - Right-click the object.
- Select Version > Compare with version. The Compare with window appears.
- Select the version with which you want to compare the current version.
- Click OK. The Version Comparison Tool opens.
• Using the Versions tab of the object:
- In Designer, open the object whose versions you want to compare.
- Open the Versions tab. The Versions tab provides the list of all versions created
for this object. Select the two versions that you want to compare by keeping the
Ctrl key pressed.
- Right-click and select Compare. The Version Comparison Tool opens.
• Using the Version Browser:
- In Designer, select File > Version Browser.
- Select the two versions that you want to compare.
- Right-click and select Compare. The Version Comparison Tool opens.
The comparison window shows the differences between two versions: on the left pane, the
newer version and on the right pane, the older version of your selected object.
Oracle Data Integrator 12c: Advanced Integration and Development 6 - 12
Working with Solutions
2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
3 e
r a bl
s fe
- t r an
n no
s a
h
) deฺ a
1 c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e d
A solution
e
is a l i
comprehensive and consistent set of interdependent versions of objects. Like
N
orin
other objects, it can be checked in at a given time as a version, and may be restored at a later
Fl date. Solutions are saved into the Master Repository. A solution assembles a group of
versions called the solution’s elements.
A solution is automatically assembled by using cross-references. By scanning cross-
references, a solution automatically includes all dependent objects required for a particular
object. For example, when adding a project to a solution, versions for all the models used in
this project’s interfaces are automatically checked in and added to the solution. You can also
manually add or remove elements into and from the solution. Solutions are displayed in the
Solutions tree in Designer Navigator.
These objects may be added to solutions: Projects, Models, Model Folders, Load Plans,
Scenarios, Global Variables, Global User Functions, Global KMs, and Global Sequences.
To Create a Solution:
1. Select Designer tab > Solutions > New Solution.
2. In the Solution editor, enter the name of your solution and a description, and then save
the solution. The resulting solution is an empty shell into which elements may then be
added.
Removing Elements
To remove an element from a solution, select the element that you want to remove in the
Elements list and then click the Delete button. This element is removed from the list. Existing
checked-in versions of the object are not affected.
Comparing Solutions with Smart Import/Export
Solutions were meant to be used for versioning, whereas smart import/export is really meant
to help with import/export dependencies management. It does not manage versions at all. But
ble
r
it is capable of handling missing dependencies in particular for imports. It will also let you
fe a
s
choose what action to take if you are trying to import an object that already exists (overwrite,
an
keep existing object).
n - t r
n o
s a
h a
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
l o r in to u
u (f nse
e l c l i ce
e d
n N
F lori
1 2
ble
fe r a
3
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce automatically adds required elements that have not yet been
e d e
Synchronizing a l i
solution
n N
lori
included in the solution, creates new versions of modified elements, and automatically
F removes unnecessary elements. The synchronization process brings the content of the
solution up to date with the elements (projects, models, and so on) stored in the repository.
To Synchronize a Solution:
1. Open the solution that you want to synchronize.
2. Click Synchronize in the toolbar menu of the Principal Elements section. ODI scans
the cross-references.
3. If the cross-reference indicates that the solution is up to date, a message appears.
Otherwise, a list of elements to add or remove from the solution is shown. These
elements are grouped into Principal Elements (added manually), Required Elements
(directly or indirectly referenced by the principal elements), and Unused Elements (no
longer referenced by the principal elements). Select the Accept boxes to version, and
include the required elements or delete the unused ones. Then click OK to synchronize
the solution.
Note
• Version creation windows may appear for elements that require a new version to be
created.
• You must synchronize your solutions regularly to keep the solution contents up to date.
You must also synchronize before checking in a solution version.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u c e
Answer: d
ea e l i
i n N
F lorExplanation: Statement A is true. In one sense, restoring a version cannot be undone. It
permanently erases the current object and replaces it with the selected version.
However, you can restore any versions of an object you exported earlier, by importing that
earlier version. See page 6-7.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cBrowser
e
Use the d e
ODI Versionl i and Version Comparison Tool to compare these two versions of
N
n mapping, and detect the differences between them.
lori
the
F Generate a PDF report of the versions, and then restore the original version.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce Editor (invoked by clicking the Target Expression gear), the
When youe d e
use the l i
Expression
n N
variables are retrieved directly from the repository.
F lori
• #MY_VAR
• #MY_PROJECT_CODE.MY_VAR
• #GLOBAL.MY_VAR
Objects
referring to
Variable X
ble
variables
fe r a
an s
Variable X
- t r
Project B
n
a no
Project A
h a s
m ) deฺ
ฺ c o u i
Global
e
cl ent G
Variable X
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
l this syntax,ce the variable must be in the same project as the object referring to it. Its
e
#MY_VAR: d e
With l i
n
valueNwill be substituted.
F lori • To avoid ambiguity, consider using fully qualified syntax by prefixing the variable name with
the project code
#MY_PROJECT_CODE.MY_VAR: Using this syntax allows you to use variables by explicitly stating
the project that contains the variable.
• It prevents ambiguity when two variables with the same name exist, for example, at global
and project level. The value of the variable will be substituted at run time.
#GLOBAL.MY_VAR: This syntax allows you to refer to a global variable. Its value will be
substituted in your code.
• You reference an ODI variable prefixed with the # character. ODI substitutes the name of the
variable by the value before the code is executed (recommended).
• The call of the variable works for OS commands, SQL, and ODI API calls.
• Example:
TOWN = '#GLOBAL.VAR_TOWN‘
Case sensitive: My_Var, my_var, MY_VAR are three different variable names.
Types: numbers (scalar, not array), text, alphanumeric (mix of numbers and text), and dates
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o stepGu
i
The Refresh Variable step The Evaluate e
clthe valueeofnthe
Variable
t
updates the variable value
r a
compares
by executing the SQL
expression of the variable. u @ o against
variable
value toS tudbranches.
create
a constant
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce of using variable steps in a package to control the workflow. The
e
This slide d e
shows an l i
example
n N
Refresh
i Variable step (implicitly declares, then) updates the variable value by executing the SQL
F lorexpression of the variable. The Evaluate Variable step compares the value of the variable against
a constant value to create true/false branches.
ble
fe r a
ans
n - t r
n o
s a
h a
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
l o r in to u
u (f nse
e l c l i ce
e d
n N
F lori
• Expression:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
'#PRODUCT_PREFIX' || PR.PRODUCT_CODE
• Join:
CUS.CUST_ID = #DEMO.UID * 1000 + FF.CUST_NO
• Filter: bl e
fe r a
ORDERS.QTY between #MIN_QTY and #MAX_QTY
ans
n - t r
a no
• Option value: a s
TEMP_FILE_NAME: #DEMO.FILE_NAME h
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u ce
l '#PRODUCT_PREFIX'
e d e
• Expression: l i || PR.PRODUCT_CODE
N
in - Concatenates the current project’s product prefix variable with the product code. As the
r
Flo value of the variable is substituted, you need to enclose the variable with single straight
quotation marks because it returns a string.
• Join: CUS.CUST_ID = #DEMO.UID * 1000 + FF.CUST_NO
- Multiply the value of the UID variable of the DEMO project by 1000 and add the
CUST_NO column before joining it with the CUST_ID column.
• Filter: ORDERS.QTY between #MIN_QTY and #MAX_QTY
- Filter orders according to the MIN_QTY and MAX_QTY thresholds.
• Option Value: TEMP_FILE_NAME: #DEMO.FILE_NAME
- Use the FILE_NAME variable as the value for the TEMP_FILE_NAME option.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
del to use
It is alsoepossible licevariables as substitution variables in graphical module fields such as
n N names or schema names in the topology. You must use the fully qualified name of the
resource
i
r
lovariable (Example: #GLOBAL.MYTABLENAME) directly in the ODI graphical module’s field.
F
Using this method, you can parameterize elements for execution, such as:
• Physical names of files and tables (Resource field in the datastore) or their location (Physical
Schema’s schema [data] in the topology)
• Physical Schema
• Data Server URL
Examples:
• Step 1: SQL
Insert into #DWH.LOG_TABLE_NAME
Values (1, 'Loading Step Started', current_date)
– Add a row to a log table that has a name only known at run e
time. r a bl
s fe
• Step 2: Jython
- t r an
f = open('#DWH.LOG_FILE_NAME', 'w') no n
f.write('Inserted a row in table %s' a %s
a
h
) deฺ
('#DWH.LOG_TABLE_NAME') )
c o m u i
f.close() l e ฺ t G
ra ude c n
– Open file defined by theoLOG_FILE_NAME variable and write
@ t
s Swhich you have inserted a row.
lcutable iinto
the name of the log
n e de e th
i nฺ © t2015, s and/or its affiliates. All rights reserved.
uOracle
o r
Copyright
o
u (fl nse
lc lice
devariables
You caneuse anywhere within your procedures’ code. Code examples are shown in this
i n
slide.N“DWH” is the project name. See the next slide for alternatives with Options.
lo r
F
possible in procedures.
• Example: Adding a row to a log table that has a name only
known at run time
– Using parameters:
Insert into #DWH.LOG_TABLE_NAME
ble
Values (1, 'Loading Step Started', current_date)
fe r a
ans
n - t r
– Using options: no
s a
h a
eฺ
Insert into <%=snpRef.getOption("LogTableName")%>
m )current_date)
d
Values (1, 'Loading Step Started', o
ฺc t Gu i
l e
o rac uden
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce options rather than variables whenever possible in procedures.
e d
You should
e
consider l i
using
n N
Options
i setactyour
like input parameters. Therefore, when executing your procedure in a package, you
F lorwould option values to the appropriate values.
In this example, you would write Step 1’s code as follows:
Insert into <%=snpRef.getOption("LogTableName")%>
Values (1, 'Loading Step Started', current_date)
Then, when using your procedure as a package step, you would set the value of option
LogTableName to #DWH.LOG_TABLE_NAME.
Note that when using Groovy scripting (discussed in the lesson titled “Using ODI Groovy Editor”),
you need to enclose the variable name in straight double quotation marks ("), for example
"#varname" and "#GLOBAL.varname"; otherwise, the variables are not substituted with the
ODI variable value.
for example:
• STORE_ID: Alphanumeric variable. It is passed as a
parameter to a scenario.
– Gives the ID of a store
• STORE_NAME: Alphanumeric variable
– The name of the current store is derived from the Stores a b le
e r
table filtered by the value returned by the concatenationaof
n sf
the STORE_ID and STORE_CODE variables. on-t
r
a n
– The code: s
h
) deฺ a
select STORE_NAME from
c o m u i
e ฺ G
r a cl ent
<%=odiRef.getObjectName("L","STORES","D")%>
o tud
Where id='#DWH.STORE_ID'||'#DWH.STORE_CODE'
@
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
ed el lice
It is sometimes useful to have variables depend on other variable values as shown in this slide.
N
in The “bind variable” mechanism must be used to define the refresh query for a “date” type
F lorNote:
variable that references another “date” type variable. Example:
MY_NOW date type variable has the refresh query:
select sysdate from dual
MY_TODAY date type variable must have the bind-based refresh query:
select :MY_NOW from dual
So you see that MY_TODAY has a “nested” variable inside of it; it is dependent on MY_NOW.
dynamic.
• Example: You need to load flat files into your Data
Warehouse (DWH) with a file name composed of a prefix
and a dynamic suffix such as the current date:
– ORD2014.03.26.dat
• Method of implementation: bl e
fe r a
– Create the FILE_SUFFIX variable in your DWH projectaand
t r ns
set its SQL SELECT statement to select current_date
n on- (or
any appropriate date transformation to match
s athe actual file
suffix format). )h a ฺ
Note: Variables here must have been ฺ c o m
u i declared.
previously
de
l e
c ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce where the names of your source or target datastores are dynamic.
d e l i
You may
Ain Neexample of this is when you need to load flat files into your Data Warehouse with a file
typical
face some situations
r composed of a prefix and a dynamic suffix such as the current date. For example, the order
Floname
file for March 26 would be named ORD2014.03.26.dat.
Note that you can use variables in the resource name of a datastore only in a scenario when the
variable has been previously declared. This is one of the exceptions to the implicit declare rule.
#myDemoVar is
used as a resource
ble
parameter for the
fe r a
2 datastore.
an s
n - t r
a no
Create the
h a s
integration mapping
m ) deฺ
for flat file-to-RDBMS
ฺ c o u i
transformation. e
cl ent G
r3a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l
(f nseo
c u
del projects,
In someeintegration lice a flat file needs to be exported into a relational table. In this example:
i n
1.
NThe variable myDemoVar is created and used as a dynamic name of a flat file to be
o r
Fl exported to a relational database table.
2. To reference the flat file dynamically, you edit the source datastore to point to the variable
rather than having the resource file name hard-coded: #myDemoVar.
3. You create a mapping to export a flat file to a relational table. Nowhere in the mapping is
there any indication that you are using variable file names.
ble
fe r a
t r a ns8
n- no
s a
h
) deฺ a
c o m u i
e ฺ
l deselectnt G
r a cMust e
@ o “Latest t u dValue”
e l cu his S
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e
7. Execute the l i
scenario.
i n
8.
N
ODI prompts for the actual name of the flat file (case-sensitive in Linux) to be loaded into the
r
Flo relational table that will be set as a startup parameter.
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceby using a variable in the URL of your data server’s definition:
e d
To connect
e
to your l i
stores
n N
Fl ori1. Create a StoresLocation table, such as the one shown in the slide. Only one location
should be active at a time.
2. Create three variables in your EDW project:
- STORE_ID: Takes the current store ID as an input parameter
- STORE_URL: Refreshes the current URL for the current store ID with the statement:
select StoreUrl from StoresLocation
where StoreId = #EDW.STORE_ID
- STORE_ACTIVE: Refreshes the current activity indicator for the current store ID with
the SELECT statement:
select IsActive from StoresLocation
where StoreId = #EDW.STORE_ID
Only one location should be active at a time.
3. Define one physical data server for all your datastores and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
e l cu his S
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cwhere
e
There are d e
some l
cases i using contexts for different locations is less appropriate than using
N
in (>100)in the
variables URL definition of your data servers, for example, when the number of sources is
F lorhigh or when the topology is defined externally in a separate table. In these cases, you can
refer to a variable in the URL of a server’s definition.
Suppose you want to load your warehouse from 250 source applications—hosted in Oracle
databases—used within your stores. Of course, one way to do it would be to define one context for
every store. However, doing so would lead to a complex topology that would be difficult to
maintain. Alternatively, you could define a table that references all the physical information to
connect to your stores and use a variable in the URL of your data server’s definition.
Syntax of the startscen, the 001 is the scenario version. You can use a version of -1, and that
will always use the latest version.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u cewith Log Level 6.
e
Tracking d e
requires l i
running
i n N
F lorTracking
•
variables enables you to determine:
Actual values of ODI user variables that were used during an executed session
• Current only or historical values
Variable and sequence tracking record a history of variables and sequences participating in a
session. The values of all variables are displayed in the Operator step in the section “Variable and
Sequence Values.”
With the variable tracking feature, you can also determine whether the variable was used in a
source/target operation or an internal operation such as an Evaluate step. You get a slightly
different display when looking at an incrementing counter step.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
lice at several levels:
del is configured
Variableetracking
i N
•n When defining a variable, you can select Secure Value if you do not want the variable to be
lo r
F recorded (similar to a browser’s incognito mode). This is useful when the variable contains
passwords or other sensitive data. If Secure Value is selected, the variable will never be
tracked. It will be displayed as unresolved in the source or target code, not be tracked in the
repository, and it will not be historized.
• When executing or restarting a session, select Log Level 6 in the Execution or Restart
Session dialog box to enable variable tracking. Log Level 6 has the same behavior as Log
Level 5, but with the addition of variable tracking.
When reviewing the execution results in Operator Navigator, you can:
• View tracked variables and sequences in the Variables and Sequence Values section of the
Session Step or Session Task Editor
• Review the source/target operations of an execution in the Session Task Editor
ble
fe r a
ans
n - t r
n o
s a
h a
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
l o r in to u
u (f nse
e l c l i ce
e d
n N
F lori
u (f nse
c lice in ODI Studio and ODI Console sessions.
del is available
Variableetracking
i n N
r
lo the following when tracking variables in ODI:
Note
F • Each value taken by a variable in a session can be tracked. This is not the default behavior,
you must run with log level=6, which incurs extra overhead.
• The values of all tracked variables can be displayed at step and task levels. This includes
when a variable is modified by a step or a task. The Step or Task Editor displays the name
and the new value of the variable.
• The source and target code for a step or task can be viewed with either resolved variable
and sequence values, or hidden variable values that display the variable and sequence
names. Note that if the variable values are shown, the code becomes read-only.
• Variables, such as passwords, that are defined as Secure Value are never displayed in the
resolved code or variable list. A secure variable does not persist any value in the repository,
even if it is refreshed. Note also that the refresh of a secure variable does not work across
two sessions.
• Session purging only purges variable values from memory. If you keep history, then the
values are kept in the repository (on disk) indefinitely.
name of the variable with the value before the ODI code is
executed?
a. #
b. :
c. &
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ead
el lice
i n N
lo r
Explanation: When you reference an ODI variable prefixed with the # character, ODI substitutes
F the name of the variable by the value before the code is executed by the technology. See
page 7-6.
bind substitution?
a. #
b. :
c. &
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ebd
el lice
i n N
lo r
Explanation: This may or may not be a good idea depending on the nature and distribution of
F your data. See page 7-7.
relational table. You create a variable for the name of the flat
file. The actual name of the flat file to be loaded into the
relational table will be defined as a startup parameter at run
time.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Flori
N n
e d e l c u
l
l
i
o r
ce
ฺ n
(f nse
e l
in to u
u
ed se t
@
r a
c his S
e ฺ c
o tud
o m
cl ent G
h
u
a
i
s a
) deฺ
o n n
- t r an
s
fe r a bl
e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e d e
More information: l i
n N
lori
• http://groovy.codehaus.org/ for more information about the Groovy language
F • https://java.net/projects/oracledi/downloads/download/ODI/SDK%20Samples/ODI%2012c/od
i12c_mapping_sdk.zip for sample code
• https://blogs.oracle.com/dataintegration/entry/odi_12c_mapping_sdk_the for discussions
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
Does the same thing ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
The ODIeSDKdel provideslican interface to enable developers to leverage the ODI concepts through an
SDK
i n N
instead of using a GUI such as ODI Studio or Console.
r
lo • ODI can now be embedded in other products that can drive ODI process creation and
F
execution from their own GUI via their own IDE.
• Dynamic Mappings: The structure of the source and/or target systems is very dynamic.
That structure would not be easily implemented through a GUI that leverages fixed metadata
definitions.
An enhanced SDK enables the developer to execute virtually every ODI method through a Java
program that enables developers to leverage ODI concepts through an SDK instead of using ODI
Studio.
Note: “ODI SDK” and “Public API” (Application Program Interface) are terms that are often used
interchangeably. The Public API mimics the usage of the graphical interface. For a better
understanding of the logic implemented in the SDK, ensure that you are familiar with the GUI.
Classes, methods, and parameters will be similar to the options available through the graphical
interfaces. The valid code will match valid objects in the ODI GUI.
• Master Repository:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
• Master Repository:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
APIs Methods
ODI fe r a ble
ans
n - t r
a no
Tools h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d
• Public
eAPI (or l i
SDK)
i n N- Is a library of classes and methods for the manipulation of objects in the ODI
r
Flo Repository without accessing the repository tables directly. You can SELECT (at your
own peril) directly, but never modify the tables. Instead, use the APIs to modify objects.
- Developers relying on the SDK will be protected from repository evolutions over time.
• Sunopsis APIs
- Are represented in the packages as “Tools” (OdiSendMail, and so on)
- Are used to send emails, automate the reverse-engineering of models, invoke
scenarios, detect changes, and so on
- Each tool has a corresponding API version.
- Can be leveraged by packages built through the public APIs
• Substitution Methods
- They are used by developers to build generic code in Knowledge Modules and
procedures that will dynamically retrieve the names of all tables, attributes, and
mappings during the process of building mappings. Examples: odiRef.getColList,
odiRef.getTable, and so on.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce all standard features of a code editor such as comments, syntax
e
The Groovy d eeditor l i
provides
n N
highlighting,
i supportedandandcommon code editor commands except for debugging. The following commands
F lorare accessed through the context menu or through the Source main menu:
• Show Whitespace
• Indent Block, Unindent Block
• Text Edits
- Join Line, Delete Current Line
- Trim Trailing Whitespace
- Convert Leading Tabs to Spaces, Convert Leading Spaces to Tabs
- Macro Toggle Recording, Macro Playback
- Color coding of keywords
bl e
fe r a
No
ans
Save
option
n - t r
here
a no
h a s
m ) deฺ
ฺ c o u i
c l e n t G Right-
o ra ude click
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
del onelor
You caneexecute iceseveral Groovy scripts at once and also execute one script several times
inin N
parallel.
lo r
F You can only execute a script that is opened in the Groovy editor. ODI Studio does not execute a
selection of the script (unlike SQL Developer), it executes the whole Groovy script.
To execute a Groovy script in ODI Studio, select the script that you want to execute in the Groovy
editor. Click Run on the toolbar. The script is executed.
You can now follow the execution in the Log window.
Note that each script execution launches its own Log window. The Log window is named
according to the following format: Running <script_name>.
You do not save the script to the repository (there is no diskette icon on the main toolbar), instead
you save it to your local disk using Tools > Groovy > Save Script As. (See the previous slide for a
screenshot.)
Note: You can change the default comment header with your name/department and so on.
3 1
bl e
fe r a
an s
n - t r
a no
2 h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceSDK is used to create a new ODI Project within the Work Repository that
d e l i
isin Ne within ODI Studio.
In this example,
connected
the ODI
Custom Libraries
bl e
~/.odi/oracledi/userlib
fe r a
ans
n - t r
n o
s a
additional_path.txt
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceto access external libraries; for example, if an external driver is needed.
e
The Groovyd eeditor is l i
able
n N
F lorToi use external libraries, do one of the following:
• Copy the custom libraries to the userlib folder. This folder is located:
- On Windows operating systems: %APPDATA%/odi/oracledi/userlib
- On UNIX operating systems: ~/.odi/oracledi/userlib
• Add the custom libraries to the additional_path.txt file. This file is located in the
userlib folder and has the following content:
; Additional paths file
; You can add here paths to additional libraries
; Examples:
; /opt/java/libs/myjar.jar
; /opt/java/libs/myzip.zip
; /opt/java/libs/*.jar will add all jars contained in the
/opt/java/libs/ directory
; /opt/java/libs/**/*.jar will add all jars contained in the
/opt/java/libs/ directory and subdirectories
ble
fe r a
ans
2 n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
liceexecution classpath in addition to all classpath entries available to ODI
del a Groovy
You canedefine
n N
Studio.
i
lo r
F To define an additional Groovy execution classpath, perform the following steps:
1. Before executing the Groovy script, select Tools > Preferences.
2. In the Preferences dialog box, navigate to ODI > System > Groovy Preferences page.
3. Enter the Classpath and click OK.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce an Input text field is displayed at the bottom of the Log tab. Enter a
When thise d e
feature is l i
used,
i n
stringNtext and press Enter to pass this value to the script. The script is exited after the value is
F lorpassed to it.
import oracle.odi.core.persistence.transaction.support.DefaultT
ransactionDefinition;
import oracle.odi.domain.project.OdiProject;
import oracle.odi.domain.project.OdiFolder;
def createProject(projectName, projectCode, folderName) {
txnDef = new DefaultTransactionDefinition();
tm = odiInstance.getTransactionManager()
ble
txnStatus = tm.getTransaction(txnDef)
fe r a
project = new OdiProject(projectName, projectCode)
ans
folder = new OdiFolder(project, folderName)
n - t r
odiInstance.getTransactionalEntityManager().persist Define
Definethe
for for
theparameters
Project
parameters
Project
Name,
Name,
a no
(project) Project
Project
Code,
Code,
a
andand
h s
tm.commit(txnStatus) FolderFolder
Name.
m ) deฺ
Name.
}
ฺ c o u i
e
cl ent
createProject("DATA WAREHOUSING", "EDW", "INITIALIZATION") G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce that shows how to create an ODI Project with a Groovy script. In
e
This slide d e
provides anl iexample
the
i n N
createProject method, you define parameters for Project Name, Project Code, and Folder
r
loName for your project.
F
ODI provides the variable odiInstance. It represents the ODI instance, more precisely the
connection to the repository, in which the script is executed.
(The first 40 lines not shown for clarity, some in next slide)
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce of how to create an ODI model with the necessary topology using
e
This slide d e
provides anl iexample
then N
Groovy script.
F lori
To create the topology, enter:
lschema = createLogicalSchema("<Context>", "<Technology>", "<Logical
Schema Name>", "<Data Server Name>", "<DB UserName>",
ObfuscatedString.obfuscate("<DB User Password>"), "<URL>",
"<Driver>", "<DB Schema used for ODI Physical Schema>")
In this example, the following parameters are used:
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>", "<ModelName>", "<ModelCode>")
In this example, you use the following parameters:
createModel(lschema, "GLOBAL", "ORACLE_WH", "ORACLE_WH")
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e
createLogicalSchema: l i
n N
lori
• contextCode: The ODI code for the context used to map logical schema to physical
F • 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 construct your topology objects and
models that will allow going straight to reverse engineering when the script has been run.
bl e
fe r a
s
Not shown are some initial
an
n - t r
housekeeping functions.
o
nDefine
s a source, target, and
1 h
) deฺa connections.
c o m u i
l e ฺ t G Define attribute
2 ra udec n expressions.
@ St o
l c u is
e d e t h
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u ce that shows how to create an ODI mapping with a Groovy script.
e
This slide d e
provides anl iexample
n N
F lorToi create a mapping with Groovy:
1. In the Groovy script, define the variables with the values for the ODI project, the project
folder, and the path to the text file you created.
2. Define the attributes you want to map from source to target. Optionally, do transformation.
The whole script is defined in terms of methods, then you instantiate them by having the last
line of the script call the methods with hard-coded values. It might look similar to:
m1 = basic_mapping("DEMOS", "First Folder", "Basic_Mapping")
m2 = filter_mapping("DEMOS", "First Folder", "Filter_Mapping")
3. Run the Groovy script in the bottom half of the slide to create the ODI mapping shown in the
top half of the slide.
Note: You can create more that one mapping with Groovy script if you define more than one row
in the bottom of the script (one line of parameters for each mapping), as shown by the m1 and m2.
bl e
fe r a
an s
n - t r
a no
h a s
m ) deฺ Add these lines to define a
o
ฺc t Gu i Filter component.
l e
o rac uden
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cefrom the previous slide, but with the addition of a filter. A more complete
e
This is the d e
same l i
mapping
n N
listing
i slidefound
is in the lab environment. (There are several pages of code required to do this task.
F lorThe shows only lines 158 – 170. A large amount of code is not shown.)
• Menu items
• Dialog boxes
import javax.swing.JMenuItem;
import javax.swing.Jmenu;
a b le
import oracle.ide.Ide; s f er
(JMenuItem)Ide.getMenubar().getGUI(false).getComp - t r an
onent(4)).doClick(); n on
s a
JMenu mnu = a
) h deฺ
c o m
((JMenu)Ide.getMenubar().getGUI(false).getCompo
u i
e ฺ G
nent(4));
r a cl ent
o ud
((JMenuItem)mnu.getMenuComponents()[0]).doClick()
u @ St
e l c h is
e d e t
i n ฺ n u s
l o r
Copyright ©
t o
2015, Oracle and/or its affiliates. All rights reserved.
u (f nse
c lice elements of ODI Studio user interface using Java with the Groovy
del creating
You caneautomate
n NThis slide provides an example that shows an implementation of ODI Studio GUI
editor.
i
r
loautomation using Swing.
F
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Flori
N n
e d e l c u
l
l
i
o r
ce
ฺ n
(f nse
e l
in to u
u
ed se t
@
r a
c his S
e ฺ c
o tud
o m
cl ent G
h
u
a
i
s a
) deฺ
o n n
- t r an
s
fe r a bl
e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
‒ XML
‒ JSON
• Complex Files: Configuring the Topology
• Complex Files in Integration Projects
ble
fe r a
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce Master/Header/Detail/Trailer, COBOL or RPG, and so on.
e
Examples d e
of complex l i
files:
n N
F lori
bl e
• XML files (use XML technology) fe r a
– XML driver loads the XML file into a RDBMS schema.tran
s
-
nonXML data.
– IKM XML Control Append KM is used for handling
a
• Complex (or native format) files, that areha s complex to be
too
m) uideฺ
parsed using the existing ODI Filecotechnology
c l eฺ nt G
o ra ude
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
del several
The ODIesupports licetext files types:
i N
•n Flat files (fixed or delimited): A File server corresponds to an ODI data server. In this File
r
lo server, a directory containing files corresponds to a physical schema. A group of flat files
F
within a directory corresponds to an ODI model, in which each file corresponds to a
datastore. The fields in the files correspond to the datastore columns. ODI provides the
Knowledge Modules (KM) listed in this slide for handling File data using the File driver.
- LKM File to SQL: Loads data from an ASCII or EBCDIC File to any ANSI SQL-92–
compliant database used as a Staging Area
- IKM SQL to File Append: Integrates data in a target file from any ANSI SQL-92–
compliant Staging Area in replace mode
- RKM File (from EXCEL): Retrieves metadata from Microsoft Office Excel
• XML files: An XML file corresponds to a data server in ODI. Within this data server, a single
schema maps the content of the XML file. The ODI Driver for XML (XML driver) loads the
hierarchical structure of the XML file into a relational schema. ODI provides the IKM XML
Control Append for handling XML data.
• Complex files (files with native format): For these files, you have to read or write file
structures that are too complex to be parsed using the existing ODI File technology.
ble
XML Relational fe r a
Native File ODI ns
(Internal) Schema
-tra
n o n
s a
a
) h deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d
Conceptual
e
stages: l i
n N
lori
• Native File: Could be .xml, .csv, COBOL, .txt
F • XML (internal): .xsd (data dictionary)
• Relational Schema: ODI uses this to parse (reverse engineer)
• ODI: At the end, ODI represents the complex files as datastores.
For complex files, it is possible to build a native schema description file that describes the file
structure. Using this native schema (nXSD) description and the ODI Driver for Complex Files, ODI
is able to reverse-engineer, read, and write information from complex files. ODI Driver for Complex
Files (Complex File driver) converts native format to a relational structure and exposes this
relational structure as a data model in ODI.
The Complex File driver translates internally the native file into an XML (internal) structure, as
defined in the native schema (nXSD) description and from this XML file it generates a relational
schema that is used by ODI. The overall mechanism is shown in this slide.
Most concepts and processes that are used for complex files are equivalent to those used for XML
files. The main difference is the step that transparently translates the native file into an XML
structure that is used internally by the driver but never persisted.
relational data model in ODI. If the modified data within the relational schema needs to be written
back to the complex file, the driver provides the capability to synchronize the relational schema
into the file.
Note: For simple flat files formats (fixed and delimited), File technology is recommended, and for
XML files, the XML technology.
ble
fe r a
ans
n - t r
n o
s a
h a
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
l o r in to u
u (f nse
e l c l i ce
e d
n N
F lori
94065USCA650-506-7000
001|Oracle Data Integrator EE|20000,2,+40000+
002|Application Adapter for ODI|10000,5,+50000+
003|BPEL Process Manager Enterprise Edition|20000,2,+40000+
004|BPEL Process Manager Standard Edition|10000,5,+50000+
005|BPEL Process Manager Developer Edition|1000,20,+20000+#110000
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i SELLER
ADDRESS INVOICE LINE_ITEM e
cl ent
PURCHASER G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u ce
el
it is possiblelito infer what is going on by looking at the file, the real structure is defined in
Althoughed
n N nXSD file. The first record (header) contains several nested things:
aiseparate
lo r
F • Invoice number
• Purchaser
- Address (which in turn contains the fields Street, City, State, Zip, Country)
• Seller
- Address (another one)
The remaining records (detail) contain multiple line items associated with this invoice.
In some cases, the delimiter is a tab, in other cases it is a vertical bar, and in some other cases it
is a comma or a caret. The delimiters are specified in the nXSD.
{
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
"firstName": "Duke",
"lastName": "Java",
"age": 18,
"streetAddress": "100 Internet Dr",
"city": "JavaTown",
"state": "JA",
"postalCode": "12345", ble
fe r a
ns
"phoneNumbers": [
{ "Mobile": "111-111-1111" },
- t r a
{ "Home": "222-222-2222" }
PEOPLE nPHONES no
s a
]
h
) deฺ a
}
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce (JSON) has the following syntax:
e d
JavaScript
e
Object l i
Notation
n N
lori
• Objects are enclosed in curly braces “{}”, their name-value pairs are separated by a comma
F “,”, and the name and value in a pair are separated by a colon “:”. Names in an object are
strings, whereas values may be of any of the seven value types, including another object or
an array.
• Arrays are enclosed in square brackets “[]”, and their values are separated by a comma “,”.
Each value in an array may be of a different type, including another array or an object.
• When objects and arrays contain other objects or arrays, the data has a tree-like structure.
See the following sites for more information:
• https://docs.oracle.com/javaee/7/tutorial/jsonp.htm
• http://www.json.org/
• You can use a Complex File data server as any SQL data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
server.
• Complex File data servers support several kinds of KMs.
• You can also use the IKM XML Control Append when
writing to a Complex File data server.
– This Knowledge Module implements a specific option to
synchronize the data from the relational schema to the file, rabl
e
e
which is supported by the Complex File driver. nsf a
o n -tr
a n
a s
m ) h deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce support:
Complexe d e
File data l i
servers
n N
lori
• Technology-specific KMs sourcing or targeting SQL data servers
F • Generic KMs.
This is why you can use “IKM SQL to Oracle” instead of “IKM XML to Oracle.”
For more information about using KMs, see the chapter titled “Generic SQL” in Connectivity and
Knowledge Modules Guide for Oracle Data Integrator.
fe r a
— URL of the native complex file
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cofe the native schema (nXSD) file associated with your native file; the URL
The URLe d
is
e
the l
locationi
n
need N
not be local.
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
fe r a
• Create a Complex File Technology: s
– Same standard procedure for any technology - t r an
no n
– Physical schema a
– Logical schema h a s
– Context m ) deฺ
c o ui l eฺ nt G
ra udec
@ St o
l c u is
e d e t h
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
c u e
You seteup
el topology
dthe licfor complex files by creating a data server and physical schema. Create a
data N
in servera Data
for the Complex File technology by using the standard procedure, as described in
F lor“Creating Server” of the Oracle Fusion Middleware Developer’s Guide for Oracle Data
Integrator. This slide details only the fields required or specific for defining a Complex File data
server:
On the Definition tab:
• Name: Name of the data server that will appear in ODI
• User/Password: These fields are not used for Complex File data servers.
On the JDBC tab, enter the following values:
• JDBC Driver: oracle.odi.jdbc.driver.file.complex.ComplexFileDriver
• JDBC URL:
jdbc:snps:complexfile?f=<native_file_location>&d=<native_schema>&re=
<root_element_name>&s=<schema_name>[&<property>=<value>...]
(the “root element” is also called the “document root.”)
Note: Creating a Complex File physical schema is standard procedure for any technology.
• JDBC URL:
jdbc:snps:complexfile?f=/infiles/PROD20100125_0
01.csv&d=/infiles/products.nxsd&re=root&s=PRO
DUCTS
• Connects to the PROD20100125_001.csv file described
by products.nxsd and exposes this file as a relational a b le
structure in the PRODUCTS schema s f er
n a
o n -tr
n a
a s
m ) h deฺ
ฺ c o u i
e
cl ent G
r a
o tud
.csv + .xsd @
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
l used linicthis
e d e
The convention sample business is the PROD file gets a daily suffix. The one shown
here N
in would
is 2010-JAN-25, run number 001. So many .csv files can use the same .xsd description.
F lorThis be a good use of substitution variables!
ble
fe r a
ans
n - t r
a no2
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cecreate a data server to implement Complex File technology. In ODI
e
This slide d e
shows howl i
to
n N
Studio:
F lori1. Open the Topology tab. In the Physical Architecture, expand the Complex File technology
node. Right-click Complex File and then select New Data Server.
2. Enter the name for this new data server (for example, PURCHASE_SAMPLE_CPLX_FILE),
and click the JDBC tab.
3
ble
fe r a
ans
n - t r
4 a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud 5
u @ S
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce uses a JDBC driver to read the original input file as well as the
e d
The Complex
e File l i
technology
n N
metadata
i definition of this complex file generated using the Native Format Builder, a SOA
F lorcomponent. To select the driver:
3. Click the magnifying glass icon and then select the JDBC Complex File driver:
oracle.odi.jdbc.driver.file.complex.ComplexFileDriver.
4. Edit the URL to point to the input file and to the XSD file:
jdbc:snps:complexfile?f=/home/oracle/labs/Files/Complex
Files/Purchase_sample.txt&d=/home/oracle/labs/Files/Complex
Files/Purchase_schema.xsd&re=invoice&s=PURCH
5. Test the connection (requires an agent).
Note: The native schema (nXSD) provided in the data server URL is used as the XSD file to
describe the XML structure. For more information, see Section 5.5.2 “Reverse-Engineering an
XML Model” in Oracle Fusion Middleware Connectivity and Knowledge Modules Guide for Oracle
Data Integrator.
1 2
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ 3
c o u i
c l eฺ nt G
o ra ude
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce you define physical and logical schemas the same way as you did
e
For Complexd e Files l i
technology,
n
for N
other technologies:
F lori1. Right-click the data server. Select New Physical Schema.
2. Create a new physical schema for this data server. Save physical schema.
3. Open the Logical Architecture bar. Expand Technologies > Complex File and create a new
logical schema as shown in the slide. Connect this logical schema to the physical schema (in
this example myComplexFile.PURCH) in all contexts. Save this logical schema.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
2
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cusing
e d
For setting
e
up a l
projecti the Complex File technology, you follow the standard procedure.
See N
in “Creating an Integration project” of Oracle Fusion Middleware Developer’s Guide for Oracle
F lorData Integrator.
It is recommended to import the following knowledge modules into your project for getting started:
• LKM SQL to SQL
• LKM File to SQL
• IKM XML Control Append
A Complex File model groups a set of datastores. Each datastore typically represents an element
in the intermediate XML file generated from the native file using the native schema.
1. In Designer, create a New Model.
2. Name the new model, and select Technology: Complex File. The default logical schema will
be prepopulated. Save your work. The new model should be added to the list on the left.
ble
fe r a
ans
n - t r
a no
s 4
h
) deฺ a
3 m
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u cesupports standard reverse engineering, which uses only the abilities of
Complexe d e
File l
technology i
then N
Complex File driver (the same process as for XML Files).
F lori
To perform a standard reverse engineering with a Complex File model, use the usual procedure,
as described in “Reverse-engineering a Model” in the Oracle Fusion Middleware Developer’s
Guide for Oracle Data Integrator.
3. Right-click the new model, select Reverse Engineer (you could have done this on the
previous model panel).
4. After a few moments, the new datastores will be shown below the new model. Notice
Address0 and Address1, corresponding to the seller address and the purchaser address.
You may want to change that in the schema to be a single address table.
Sources Targets
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Mapping Complex
Complex File
File
Relational
Relational Table
Table ble
fe r a
ans
n - t r
KMs
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce file as a source or a target of an integration mapping.
• Youe d e
can use a l i
complex
i•n N
Complex file data models are handled in mappings similarly to XML structures.
r
Flo • The same Knowledge Modules can be used for both complex files and XML technologies.
given file.
• An nXSD file has to be created using a text editor (difficult)
or the Native Format Builder Wizard (easier) that is part of
Oracle BPEL Process Manager.
– This format extends the XML Schema standard by adding
additional parsing instructions to each element.
a b le
– Using nXSD parsing technology, the native file is converted s f er
into an internal XML format. - t r an
n n o
• The nXSD format extends the standard XML s aSchema
h a
Definition (XSD) format through nxsd attributes.
) eฺ m id
ฺco t Gthe
– nXSD is a valid XML schema,lebecause u XSD standard
c ennamespaces.
oratheir own
allows extra attributes with d @ Stu
l c u is
e d e t h
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u cineJDeveloper) is included in the ODI Suite, but not in the stand-alone ODI
e
Note: BPEL d e(a l
plug-in i
n N
Enterprise
i Edition. Namespaces are like qualifiers; they help avoid ambiguous references and
F lorcollisions.
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
elementFormDefault="qualified"
xmlns:tns="http://xmlns.oracle.com/pcbpel/demoSchema/csv"
targetNamespace="http://xmlns.oracle.com/pcbpel/demoSchema/csv"
attributeFormDefault="unqualified"
nxsd:encoding="US-ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="Root">
<xsd:complexType><xsd:sequence>
<xsd:element name="Header"> ble
fe r a
<xsd:complexType><xsd:sequence>
ans
<xsd:element name="Branch" type="xsd:string"
n - t r
no
nxsd:style="terminated" nxsd:terminatedBy=","/>
<xsd:element name="ListDate" type="xsd:string"
s a
nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
h
) deฺ a
</xsd:sequence></xsd:complexType>
c o m u i
</xsd:element>
e ฺ G
r a
</xsd:sequence></xsd:complexType>cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce is shown in the slide and continued in the next slide. Some key
e d
An example
eof nXSD l i
schema
n N
terms:
Fl ori• <?xml version="1.0"?>: This is the “prolog,” which is optional in version 1.0, but
required in the latest version 1.1.
• <xsd:schema xmlns:xsd=>: Namespace URLs. Even though it looks like an HTTP web
address, you cannot go there with the browser.
• <xsd>: XML Schema Document.
• <xsd:complexType>: This is what makes it not plain old XML, but makes it “Complex.”
Note that it can be nested.
<xsd:complexType><xsd:sequence>
<xsd:element name="Name" type="xsd:string"
nxsd:style="terminated" nxsd:terminatedBy=","/>
<xsd:element name="Street" type="xsd:string"
nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="City" type="xsd:string"
nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</xsd:sequence></xsd:complexType>
bl e
</xsd:element>
fe r a
</xsd:sequence></xsd:complexType>
ans
</xsd:element>
n - t r
</xsd:schema>
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u e
cname="Customer"
e d e
• <xsd:element l i maxOccurs="unbounded">: You can limit the
N
in number of elements by type in an XML file. The Customer element can occur a maximum of
r
Flo unbounded (infinite) times. However, each customer may have only one name, one street,
one city, and so on. These are local business rules, not universal rules.
• <…nxsd:terminatedBy=…>: The nXSD schema annotates elements to describe their
position and delimiters within the flat text file. The schema in the slide uses almost
exclusively the nxsd:terminatedBy instruction to look for the next terminator characters.
There are various constructs in nXSD to parse fixed-length fields, look ahead in the
document for string occurrences, perform conditional logic, use variables to remember state,
and many more.
bl e
fe r a
ans
n - t r
a no
h a s
Type anything; you
m ) deฺ
only want to get to
ฺ c o u i
the Wizard.
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce Wizard as well as the nXSD language are described in the Oracle
e d
Both Native
eFormat l i
Builder
n N
Fusion Middleware User’s Guide for Technology Adapters.
F lori1. Start the Native Format Builder in BPEL by creating a new File Adapter.
2. On step 4 of 4, specify Operation Type: Read File. The steps renumber to now be 4 of 9.
3. On step 8 of 9, click the gear to start the Native Format Builder.
The nXSD schema is created by using the Native Format Builder Wizard in JDeveloper with SOA
Extensions installed. The Oracle File and FTP Adapters are automatically integrated with Oracle
BPEL PM. When you drag File Adapter for FTP Adapter from the Component Palette of the
JDeveloper BPEL Designer to the design area, the Adapter Configuration Wizard starts with a
Welcome page.
When you click the Define Schema for Native Format gear on the Messages page of the Adapter
Configuration Wizard, the Native Format Builder Wizard is displayed. The Messages page is the
last page that is displayed in the Adapter Configuration Wizard before the Finish page. For details,
refer to Oracle Fusion Middleware User’s Guide for Technology Adapters.
ble
You can create a new fe
r a
schema using thea
t r ns
Native
on- file.
Format Builder Wizard for
a n
a complex-type
a s
m ) h deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
del new nXSD
You canecreate lice schema for your complex file, or edit an existing native schema
n N using the Native Format Builder Wizard by sampling a delimited, fixed-length, or
generated
i
r
locomplex-type file. To edit an existing native schema, select the “Edit existing” option on the
F Choose Type page of the Native Format Builder Wizard, and click Browse to navigate to the
location of the existing schema file and then select the native schema file that must be edited. The
Native Format Builder Wizard guides you through the editing of the native schema file.
Note: If the format is complex, it is often a good idea to “approximate” it with a similar simple
format and then add the complex components manually. The resulting *.xsd file can be copied
and used as the format for ODI. Using this technique, it is also possible to parse the same file
format in SOA Suite and ODI; for example, using SOA for small real-time messages, and ODI for
large batches.
Browse to the
location of the
existing schema
file and then select
the native schema
file to be edited.
ble
fe r a
an s
n - t r
a noFirst x records of
h a s file displayed here
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cschema
e d
Before you
e
edit a l
nativei file, you must ensure that the sample file specified in the
N
in is generated
annotation within the schema exists. This annotation is automatically added when the native
F lorschema the first time from the sample file.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce schema for a complex file generated by the Native Format Builder
e
This slide d e
shows the l i
nXSD
n N
Wizard.
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
technology in ODI.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
technology in ODI.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Integration of ODI
in Enterprise Environment and SOA
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Deployment features:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
• WLS Integration
• Java EE Agent Template Generation
• WLS Configuration Wizard
• Automatic Data Source Creation for WLS
bl e
fe r a
WLS Domain ODI
t r a ns
• Admin Server n-
• Java EE Agent
n o
• Managed Svr • OtheraAgents
h a s
Consoles: • Managed Svr ) deฺ
• Managed Svr c o m u i
• FMWCC
e ฺ G
• EMCC r a cl ent
@ o tud
• ODI
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cbe
e d
The Runtime
e Agent l
cani deployed as a Java EE component within an application server. It
N
in in this
benefits configuration from the application server layer features such as clustering and
F lorconnection pooling for large configurations. This Java EE Agent exposes an MBeans interface,
enabling lifecycle operations (start/stop) from the application server console and metrics that can
be used by the application server console to monitor the agent activity and health.
• Oracle WebLogic Server Integration:
- ODI components integrate seamlessly with the Java EE application server.
• Java EE Agent Template Generation:
- ODI provides a wizard to automatically generate templates for deploying Java EE
Agents in WLS. Such a template includes the Java EE Agent and its configuration, and
can optionally include the JDBC data source definitions required for this agent, as well
as the drivers and library files for these data sources to work.
• By using the WLS Configuration Wizard, domain administrators can extend their domains or
create a new domain for the ODI Java EE Runtime Agents.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
o r a d Java EE Agent
u@ is S t u
l c
n e de e th
i nฺ © t2015, s and/or its affiliates. All rights reserved.
uOracle
o r
Copyright
o
u (fl nse
d e lc lice
e an extension integrated into the Fusion Middleware Control Console (Enterprise
ODI provides
N
n
Manager, or EM). The default URL for EM is:
F lori http://<hostname>:<port>/em/
Example: http://localhost:7001/em/.
The ODI components can be monitored as a domain through this console, and administrators can
have a global view of these components along with other Fusion Middleware components from a
single administration console. To implement integration with Enterprise Manager:
• ODI Java EE Agent must be deployed and configured with the existing WLS domain
• Enterprise Manager and the ODI Enterprise Manager Plug-in must be deployed in the WLS
domain that has the ODI Java EE Agent deployed and configured
Development
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
fe r a
ans
n - t r
Metadata n o ERP
Legacy
Business Lineage
s a
Users h
) deฺa
ODI c o m u i
Web Access ODI Console
l e ฺ t G
Consolea c n File / XML
@ or tude
e l cu his S
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
del provides
The ODIeConsole lice web access to ODI repositories. It enables an ODI developer to browse
ODI
i n N (such as projects, models, logs, and so on) and manage the ODI environment through
objects
r
lothe web service.
F
Business users, developers, operators, and administrators use their web browsers to access the
ODI Console. Note that with the ODI Console, you also can perform executions.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
To starte
the
l
deODI licein the browser, enter:
Console,
i n N http://<hostname>:<port>/odiconsole
o r
Fl Example:
http://localhost:8002/odiconsole
To log in, enter SUPERVISOR for user ID, and Welcome1 for password. Browse ODI objects in the
tree view, select the node, and then click the View icon (eyeglasses). The object or group of
objects will be displayed on the tab.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
to restart a session
n s f
— Built in the Java EE or Standalone Agent -tra on
a n
a s
m ) h deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce and Data Services are two different types of web services.
e d e
ODI Run-Time Web l i
Services
n N
i Run-Time Web Services:
F lorODI
• The Public Web Service connects to the repository to retrieve a list of contexts and
scenarios. This web service is deployed in a Java EE application server.
• The Agent Web Service is built in the Java EE or Standalone Agent.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
deal scenario
You canerun licfrom a web service calling in to ODI by using the ODI Public Web Service
in N
OdiInvoke. The opposite is an ODI tool OdiInvokeWebService used in a package to call out.
F lorOdiInvoke web service commands an agent to connect to a given Work Repository, and start a
specific scenario, whereas OdiInvokeWebService allows ODI to call someone else’s third-party
application. Summary: ODI can call out to you, you can call in to ODI.
Note that the agent (shown in the slide URL as oraclediagent) must be accessible from the
web services container host, and it must have access to the repositories.
The involved parameters are similar to the ones used when executing a scenario from an OS
command. The required parameters depend on the way you invoke the web service.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u cebe deployed in any web services container installed in your machine,
e
Public Webd eServices l i
can
n
such N
as Java application server. Web services can also be provided by ODI Standalone Agent or
F lorasi an archive file (like a .jar or .zip file).
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
web service.
• It can be used in the tool step of a package or in a
Knowledge Module.
• It can save the response in an XML file that can be
processed with ODI.
• The OdiInvokeWebService tool provides an Advanced a b le
s f er
editor for generating its code. With this editor, you can:
an
– Connect to the WSDL on -tr
a n
– Specify parameters for the tool a
h eฺs
– Select a specific operation and specifym ) request
ฺ c o u id parameters
– Invoke a web service a c le nt G
– View the web service or tuindethe SOAP editor
response
@
u S
lc this
e d e
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u ceservice request is written and saved in an XML file that can be used in
e d e
The response of the l i
web
n
ODI. N
F lori
1 Web service
2
Requests/invokes Port
ODI
OdiInvokeWebService Operation
package e
Response
r a bl
sfe
4
- t r an
n no
5 s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
delpackage,licscenario, or loadplan that contains an ODI tool is run.
1. AneODI
ri2.n NThe OdiInvokeWebService tool sends a client request to the web service through HTTP or
Flo HTTPS protocols.
3. OdiInvokeWebService invokes a specific operation on a port of the web service. The Web
Services Description Language (WSDL) file URL must be provided.
4. The response is written to a SOAP file. WSDL supports more than SOAP, but ODI supports
only SOAP.
5. The response is written to an XML file that can be processed with ODI.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e
To create d
an
e l i
OdiInvokeWebService tool step in a package, perform the following steps:
N
Fl ori1.n Open the package where you want to create a tool step and click the Diagram tab.
2. From the toolbox, select Internet > OdiInvokeWebService. Click the diagram—a step
corresponding to your tool appears.
3. Click “Free choice” to be able to edit the step, then click the step icon in the diagram to open
the Properties panel.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u e
del of this
The nextesection liclesson explores ways to integrate ODI within a Service-Oriented
n N
Architecture (SOA).
F lori
Web services
Business
process container Data
SOAP Access
Data Service
SOAP Third-party
OSB Public Web
Service Agent Web web service
Service
ble
SOAP Port
fe r a
SOAP Run-time
an
Operations
agent
n - t r
no
Start scenario
Restart sessions
Get sessions status s a
h a
List scenarios om
List contexts
i d eฺ
) OdiInvokeWebService Tool
l c
eฺ nt G u
ra udec Repository
@ o t
e l cu his S
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceexample with the Data Services, Run-Time Web Services (Public Web
d e l i
eand Agent Web Service) and the OdiInvokeWebService tool.
This slide shows a simple
n N
Service
F lori
The Data Services and Run-Time Web Services components are invoked by a third-party
application, whereas the OdiInvokeWebService tool invokes a third-party web service.
Data Services provides access to data in datastores (both source and target datastores), as well
as changes trapped by the Changed Data Capture framework. This web service is generated by
ODI and deployed in a Java EE application server.
The Public Web Service connects to the repository to retrieve a list of context and scenarios. This
web service is deployed in a Java EE application server.
The Agent Web Service commands the ODI Agent to start and monitor a scenario and to restart a
session. Note that this web service is built in to the Java EE or Standalone Agent.
The OdiInvokeWebService tool is used in a package and invokes a specific operation on a port
of the third-party web service, for example, to trigger a BPEL process.
Oracle Data Integrator Run-Time Web Services and Data Services are two different types of web
services. Oracle Data Integrator Run-Time Web Services enable you to access the Oracle Data
Integrator features through web services, whereas Data Services are generated by Oracle Data
Integrator to give you access to your data through web services.
Join 4 h a s
Finance data WS, XML m ) deฺ
service discounts
ฺ c o u i
(BPEL) e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cean ODI data load that is controlled by SOA processes and uses web
e d e
In this example, you l i
see
n N
services as well as databases as sources.
F lori1. In this example, a business process in the product management department is changing
data in the product table of the operational database. This data needs to be propagated to
the data warehouse with minimal delay.
2. The process calls an ODI bulk data service to initiate a load based on the changes since the
last load.
3. The ODI Agent executes a scenario based on a package that first calls a data service from
the finance department to obtain price discount information.
4. Then this service joins this information with the changed product data from the operational
database. The joined and transformed data is stored in the data warehouse.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cneed
e d e
In JDeveloper, you l
may i to create the new application and the new project for your BPEL
N
orin
process. The project type you create is BPEL Process Project. Create your BPEL process
Fl according to your business project. This slide shows an example of a business process that
prepares the result that will be consumed and processed by ODI Interface. For details on creating
BPEL processes, refer to Oracle Fusion Middleware User’s Guide for Oracle Business Process
Management.
How to create a BPEL process from a blank starting point is outside the scope of this course. It is
covered in the SOA curriculum classes.
3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
bl e
fe r a
an s
1 n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce of creating the ODI scenario for the package and the process of editing
e
This slide d e
shows the l i
result
n
the N
BPEL process for invoking the scenario.
F lori1. Right-click the ODI package. Create the scenario for the ODI package.
2. Edit the BPEL process to ensure your invocation of your package.
1
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
3cl
e n t G
r a
o tud e
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
del process
After theeBPEL liciseready, it should be deployed to the application server and tested. To
n
deploy
i Nand test your BPEL process:
r
lo 1. In JDeveloper, select your BPEL process, right-click and then select Deploy.
F
2. Follow the screens to deploy your process to the WLS application server.
3. In Enterprise Manager, expand: SOA > soa-infra (AdminServer) > default > ODIInvoke.
Select ODIInvoke and click Test Service.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cset
e
A businessd e
process l
is ia of coordinated tasks and activities, involving both human and system
N
orin
interactions, which leads to accomplishing a set of specific organizational goals. Business Process
Fl Execution Language (BPEL) is a programming abstraction that enables developers to compose
multiple discrete web services into an end-to-end process flow. BPEL enables the top-down
realization of a Service-Oriented Architecture (SOA) through composition, orchestration, and
coordination of web services.
In the BPEL process, the activities, called “Partner links” are used to integrate the business
process (BPEL) process with other applications within SOA. They link the BPEL process to
corresponding web services.
ODI can be integrated with the BPEL process by using the ODIInvokeWebservice tool. Thus, a
business process can be invoked from the ODI Package. After the execution, the BPEL process
can send a response back to ODI for subsequent data processing.
Extract Transform
Load
bl e
fe r a
ans
n - t r
a no
• Rejected h a s
m ) deฺ
• Examine
ฺ c o u i
• Fixable? e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e d e
For enterprise SOA l i
deployments, there is almost always a need for enterprise data extraction,
N
in taketransformation,
loading, and validation. By leveraging the native SOA architecture within ODI, you
F lorcan advantage of ODI to perform the ELT (Extract Load Transform). ODI provides the ability
to validate data during the load to the target by using ODI constraints or database constraints.
When this data is checked against a constraint by using Flow Control, any errors that are found
are not loaded to the target but are loaded to an errors table that is created and managed by ODI.
Each row of this table represents a record that did not pass a constraint. The row also has a
message column that explains why the record was rejected. This table can be edited within ODI
Designer or any other tool that can edit relational tables.
However, this is not always a convenient way for the end user or business user to edit the data.
Alternatively, the “ODI Error Hospital” can be created with BPEL Human Workflow. Any rows that
do not pass the constraint will be loaded to the error table on the target database. The ODI
scenario can be executed, and after the ODI ELT process is completed, the ODI scenario will then
call a BPEL web service to notify it of any errors during the load. The BPEL process will import the
errors and manage them by using BPEL human workflow tasks. A user can then use the BPEL
Worklist application to update bad records. On subsequent executions of the ODI scenario, the
updated records are recycled into the ELT process.
1 2
bl e
fe r a
ans
n - t r
4a no
h a s
m ) deฺ 3
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceconstraint are loaded into the target, and the error record is in the error
e
The recordsd ethat passl ithe
n N
table. In the slide, you see the steps to create such a process.
F lori
Because ODI manages the error table, you do not have to write any code to recycle the errors or
to delete the updated records when they are loaded successfully. Thus, you have to implement
the following steps:
1. First you need to build an ODI scenario that will validate data during the load to the target by
using ODI constraints or database constraints with a CKM. This ODI scenario will then call a
BPEL web service to notify it of any errors during the load.
2. You need to create a BPEL process that will import the errors and create BPEL human
workflow tasks (the green box in the middle). A user can then use BPEL Worklist to update
records that contain such errors.
3. You need to create an ODI package to execute the mapping and call a web service that
executes the BPEL process.
4. Finally, execute the ODI package, monitor execution of the BPEL process, and complete the
human workflow.
ble
fe r a
a
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e
1. Develop an ODIl i
transformation by using a mapping with an ODI constraint:
N
in a. Create a model and set up an ODI constraint that you need to enforce.
r
Flo b. Create a new mapping to load the source file (XML) to the target (RDBMS).
bl e
a c
fe r a
ans
n - t r
a no
b h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cprocess
e d e
2. Develop a BPELl i for invoking ODI from SOA and generating human workflow tasks.
N
in First create the BPEL process that will import data errors from the error table. The BPEL
r
Flo process will then create the human workflow tasks from the error records. You 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:
a. Create a New Project for the BPEL process.
b. Create and configure the connection to an ODI data source.
c. Invoke database adapters to read errors and write error corrections back to the error
table.
ble
fe r a
ans
n - t r
a no
e h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cprocess
e d e
2. Develop a BPELl i for invoking ODI from a SOA and generating human workflow
N
in tasks.
r
Flo d. Add Human Task (the green box) to your BPEL process.
e. Configure the Human Task parameters.
a
ble
fe r a
ans
c
n - t r
b a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cprocess;
e d
3. Deploy
ethe l
BPEL i create and execute the ODI package. Deploy the BPEL process
N
in to the application server.
r
Flo a. Deploy the BPEL process.
b. Create the ODI package to execute the interface and invoke the web service.
c. Run your ODI package.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i c
a l e t G
o rac uden
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cofe the BPEL process from the BPEL Console, and complete the human
e d e
4. Monitor l
execution i
i n N
task:
r
Flo a. Using Oracle BPM Worklist application, perform an action on the human task to correct
errors.
b. Return to the BPEL Console page and refresh the browser. The process is now
updated and you see that it has progressed past the Error Hospital Human workflow
activity.
c. Click the Invoke Corrections activity to see the data that the error table has been
updated with.
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.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ead
el lice
i n N
lo r
Explanation: Both types of agents have web service capabilities and can be used within a SOA
F environment.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce recommended RAM in your lab environment, this practice will be
e d e
Note: Because of thel i
less-than
n
slow.N
F lori
Flori
N n
e d e l c u
l
l
i
o r
ce
ฺ n
(f nse
e l
in to u
u
ed se t
@
r a
c his S
e ฺ c
o tud
o m
cl ent G
h
u
a
i
s a
) deฺ
o n n
- t r an
s
fe r a bl
e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
‒ Profiles
‒ Users
‒ Objects
• Implementing a Strongly Secured Approach
• Security Integration e
• Configuring ODI External Authentication r a bl
s fe
- t r an
no n
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
to a repository
• Authorization: Placed on a method of an object for a
given user
• User Method: A privilege granted to a user on a method of
an object type. It allows the user to perform an action.
• Profile Method: An authorization granted to a profile on a b le
r a
method of an object type sfe an
– Each granted method allows a user with this profile to - t r
perform an action (edit, delete, and so forth) on n
anoninstance
a
asand so forth).
of an object type (project, model, datastore,
) h deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
• Ae user lice Navigator module represents an ODI user and corresponds to the
deinl the Security
rin Nlogin name used for connecting to a repository. A user inherits the following rights:
Flo - All privileges granted to its various profiles
- Privileges on objects or instances given to this user
- Initially users have no privileges at all, not even Connect.
• Authorizations by the user are placed on a method of an object for a given user. It allows
the user to be given, either optionally or automatically, the right to this object through the
method.
• User Method is a privilege granted to a user on a method of an object type. Each granted
method allows the user to perform an action (edit, delete, and so forth) on instances of an
object type (project, model, datastore, and so forth). These methods are similar to the
Profiles Methods, applied to users.
Note: It is possible to grant users with privileges on instances on specific work repositories where
these instances exist. Think of it as a security hierarchy (top to bottom): repository, object, method,
instance. For example, you may grant a developer user the edit privilege on the
LOAD_DATAWAREHOUSE scenario on a DEVELOPMENT repository, and not on a PRODUCTION
repository. An authorization by object instance is granted to a user on an object instance. It allows
you to grant to this user certain methods of this object instance.
an object instance.
– It allows you to grant to this user methods of this object
instance.
– The presence of an authorization by object instance in a
user’s tree shows that the user is granted specific privileges
on the object methods for the given instance.
a b le
– If an instance is not visible in the tree of user instances, the er
User Method or Profile Method privileges for the objectatype n sf
tr
apply. on- n
• a
It is possible to grant users privileges on instances
s on
h a
specific work repositories where these eฺ exist.
m) instances
o id
– Authorizations by object instances
l e ฺc mayG u defined for one,
be
t
ac den attached to the Master
rRepositories
multiple, or all your Work
o tu
Repository. cu@ s S
el
e d e thi
r i n ฺn © 2015,uOracle
s and/or its affiliates. All rights reserved.
o Copyright
t o
u (fl nse
d e lc lice
N e
An authorization by object instance is granted to a user on an object instance. It allows you to
orin
grant to this user certain methods of this object instance.
Fl The presence of an authorization by object instance in a user’s tree for a given instance shows
that the user is granted specific privileges on the object methods for the given instance (these
privileges are specified in the Object Instance editor). If an instance is not visible in the tree of user
instances, the User Method or Profile Method privileges for the object type apply.
Because an instance may be replicated over the different Work Repositories that are attached to
the master repository, authorizations by object instances may be defined for one, multiple, or all
your work repositories attached to the master repository. For example, a LOAD_DATAWAREHOUSE
scenario instance may be replicated (using, for example, versioning) in the DEVELOPMENT, TEST,
and PRODUCTION repositories. Privileges on the instance will change depending on the
repository.
For example, it is common to replicate projects from a Development repository to a Test
repository. A developer may be granted edit privileges for his or her project on the Development
repository, but not on the Test repository. On the Test repository, the developer will be granted
only view privileges on the project.
Create New
Profile
ble
Create New
fe r a
User
an s
n - t r
a no
h a s
ODI
m ) deฺ
Objects ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
l
deSecurity
By usingethe ice tab, you can manage security in ODI. The Security Navigator
lNavigator
n
module
i N allows ODI users and profiles to be created. It is used to assign user rights for methods
o r
Fl (edit, delete, and so on) on generic objects (data server, data types, and so on), and to fine-tune
these rights on the object instances (Server 1, Server 2, and so on).
The Security Navigator stores this information in a master repository. This information can be used
by all the other modules.
New with 12c is Roles. They are similar to Profiles, but externally available (for example, to OPSS
and LDAP).
Roles in OPSS have been there all along.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceobjects available to the current user are organized by these tree views:
e d e
• Security l i
Navigator
i n N- The objects, describing each ODI elements type (datastore, model, and so on)
r
Flo - The users’ profiles, users, and their authorizations
• You can perform the following operations in each tree view:
- Insert or import root objects to the tree view by clicking the appropriate button in the
frame title.
- Expand and collapse nodes by clicking them.
- Activate the methods associated with the objects (Edit, Delete, and so on) through the
pop-up menus.
- Edit objects by double-clicking them or by dragging them on the Workbench.
• The windows for the object being edited or displayed appear in the Workbench.
Note: Each tree view appears in floatable frames that may be docked to the sides of the main
window. These frames can also be stacked up. When several frames are stacked up, tabs appear
at the bottom of the frame window to access each frame of the stack. Tree view frames can be
moved, docked, and stacked by selecting and dragging the frame title or tab. To lock the position
of views, select Lock window layout from the Windows menu. If a tree view frame does not appear
in the main window or has been closed, it can be opened by using the Windows > Show View
menu.
• Generic profiles:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceprivileges nor profiles (not even Connect) other than the one check box.
e d
Supervisor
e
has no l i
other
n N
F lori
ble
fe r a
2ans
n - t r
a no
3. Optionally, you can define a s
a password policy. h
) deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e
Password d e
policies, l
to iencourage users to use a strong password, consist of combinations of
N
in length,
minimum UPPER/lowercase, expiration dates, and so on. If the passwords are
F lorauthenticated externally, you can use stronger methods such as OAAM.
ble
4 fe r a
ans
n - t r
no
2 s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cesecured (and very granular) approach:
e d e
To implement a l i
strongly
n N
Fl ori1. Create the users as before.
2. Give the users nongeneric profiles (built-in or customized).
3. Grant the users privileges on object instances after these are created. This operation must
be repeated for every new instance. This requires being able to see both the Designer tab
and the Security tab at the same time. To do that, drag the Designer tab out of the navigation
panel into a separate area of the desktop. (You can put it back when you are done.) Drag an
instance (for example, a project) from Designer and drop it on the user.
4. A panel opens with the subobjects and methods listed. You can either Select All (shown by
the red square) or select individually.
Note: Only certain objects support the authorization by object instance. These object types are
listed under the Instances node for each user. The methods for which the user has generic
privileges are not listed in the Object Instance Editor.
1 2
ble
fe r a
an s
n - t r
a no
h a s
3 m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceslide, you have to grant users with authorizations to each object
e
As shown din
ethe l i
previous
n N
instance. To grant an authorization by object instance to a user:
Fl ori 1. In Security Navigator, expand the Users accordion. In the Designer, Operator, or Topology
Navigator, expand the accordion containing the object onto which you want to grant
privileges. Select this object and then drag it on the user in the Users accordion. Click Yes.
The Authorization by Object Instance editor appears.
2. This editor shows the list of methods available for this instance and the instances contained
in it. For example, if you grant privileges on a project instance, the folders, interfaces, and so
forth contained in this project will appear in the editor. Fine-tune the privileges granted per
object and method. You may want to implement the following simple privilege policies on
methods that you select from the list:
- To grant all these methods in all repositories, click Allow selected methods (the button
that looks like a check box) in all repositories.
- To deny all these methods in all repositories, click Deny selected methods in all
repositories.
3. To grant all these methods in certain work repositories, click Allow selected methods in
selected repositories and then select the repositories from the list. Click OK.
Authorizations
Master Repo
Objects
bl e
Work Repos fe r a
ans
n - t r
a no
h a s
m ) deฺ
Security ฺ c o u i
Clean-up e
clTool ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce instance are stored in the Master Repository.
e d e
The authorizations byl i
object
n N
F lorIfiobjects are deleted from all Work Repositories, the authorizations are not necessarily deleted. In
Oracle Database, this is called "drop ... cascade," but ODI cannot do the “cascade” part.
• You may want to retain certain unused authorizations if they refer, for example, to objects
currently stored in an exported file or in a stored solution.
The Security Clean-up Tool should be used periodically to remove these unused authorizations
from the Master Repository.
• Unused authorizations are removed if they refer to objects that do not exist in the Master
Repository or in any Work Repository.
bl e
fe r a
ans
n - t r
a no
2 h a s
m ) deฺ
ฺ c o u i
e
cl ent G 3
o r a d
c u @ Stu
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
l
deunused
To cleaneup lice
authorizations:
i n
1.
NFrom the Security Navigator toolbar menu, select Clean Up Security Settings... The Security
o r
Fl Clean-up Tool dialog box appears.
2. On the Cleanable tab, select Clean for the cleanable security settings you want to remove.
The security settings that cannot be removed are shown on the Non-cleanable tab.
3. Click OK to clean up the selected security settings.
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Implementing External:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
• Wallet
• Authentication (OPSS)
• Password Storage (JPS Integration) RCU
bl e
fe r a
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
jps-config.xml
cl ent G
r a
o tudExternal External Directory
u @
c his S Authentication Server
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u ce for login by default in ~/.odi/oracledi/cwallet.sso
lStores passwords
e d
• Wallet:e l i
i•n N
Internal Authentication: ODI stores by default all the user information as well as the users’
r
Flo privileges in the Master Repository. A user who logs in to ODI logs against the Master
Repository. This authentication method is called Internal Authentication.
• External Authentication: ODI can optionally use Oracle Platform Security Services (OPSS)
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, to
have centralized username and password definitions and Single Sign-On (SSO). In such a
configuration, the repository contains only references to these enterprise users. This
authentication method is called External Authentication. WLS or OUD can provide this.
• Internal Password Storage: ODI stores by default all security information in the Master
Repository. This password storage option is called Internal Password Storage. ODI can
optionally use Java Provisioning Service (JPS) for storing critical security information.
• External Password Storage: If you are using JPS with ODI, the data server passwords and
contexts are stored in the JPS Credential Store Framework (CSF). This password storage
option is called External Password Storage.
Note: When using External Password Storage, other security details such as usernames,
password, and privileges remain in the Master Repository.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
jps-config.xml e n t G
cl $HOME/.odi/oracledi/
r a d e
system-jazn-data.xml @o tujps-config-jse.xml
u
lc this S
e d e
ฺ n u s e
o r i n
Copyright ©
o
2015,
t Oracle and/or its affiliates. All rights reserved.
l
(f nse
l c u ce for External Authentication:
e d
Configuring
e
ODI l i
components
n N
lori
• To use the External Authentication option, you need to configure an Enterprise Identity Store
F (for example, LDAP, Embedded LDAP in WLS, Oracle Unified Directory, and others), and
have this identity store configured for each ODI component to refer by default to it. The
configuration to connect and use the identity store is contained in an OPSS configuration file
called jps-config.xml. Refer to the Oracle Fusion Middleware Security Guide for more
information. Copy this file and also system-jazn-data.xml into the
$HOME/.odi/oracledi/ directory. ODI Studio reads the identity store configuration and
authenticates it against the configured identity store. Rename the JPS file as shown.
• ODI components deployed in a container (for example, Java EE agent, ODI Console) do not
require a specific configuration. They use the configuration of their container. Refer to the
Oracle Fusion Middleware Security Guide for more information about an OPSS configuration
in a Java EE context.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u cepassword storage in two ways:
deorl modifylithe
You caneset
i N
•n Creating the Master Repository enables you to define the authentication mode.
lo r
F • Switching the Authentication Mode modifies the authentication mode for an existing Master
Repository. The latter way requires you to be disconnected from any repositories.
Note: When you perform a password storage recovery, context and data server passwords are
lost and need to be re-entered manually in the Topology Navigator. If you are using External
Authentication, usernames and passwords are externalized. ODI privileges remain within the
repository. Data servers and context passwords also remain in the Master Repository. You can
externalize data server and context passwords by using the External Password Storage feature.
ans
Installation Path:
Instance Path:
/u01/app/oracle/Middleware/Oracle_OUD1
/u01/app/oracle/Middleware/asinst_1/OUD
n - t r
Version: Oracle Unified Directory 11.1.2.2.0
a no
Java Version: <not available> (*)
h a s
) deฺ
Administration Connector: Port 4444 (LDAPS)
--- Connection Handlers ---
c o m
Default port is :389
u i
Address:Port : Protocol : State
e ฺ unless you are not root.
G
-------------:----------:---------
r a cl ent
0.0.0.0:1389 : LDAP : Enabled
@ o tud
c his S
u
: (many lines skipped)
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce can configure this product, but the way used in this course is the
e
There are d e
many waysl iyou
n N
simplest:
i VM (no completely stand-alone product using its own internal database and using a plain old
F lorJava WLS, no Oracle DB dependencies). Other more sophisticated environments and
other products could be used as well; the point is that ODI can contact some sort of LDAP. For
most purposes of ODI and this course, the LDAP is a black box.
dn: uid=SUPERVISOR,ou=People,dc=example,dc=com
Good practice to not
objectClass: person
have the password in
objectClass: inetOrgPerson the command itself.
objectClass: organizationalPerson
objectClass: top
givenName: SUPERVISOR
uid: SUPERVISOR
That says “Welcome1”
ble
cn: SUPERVISOR
after encryption.
fe r a
sn: SUPERVISOR
ans
userPassword:
{SSHA512}JSPutuxKg2sfBgAW2JtjzBRx2ZrElifIBC93ogTSJlAagDMssXb0XRE5V
n - t r
NlD++aMp/JhMsqyzyzOh3yP2BHt7h+UzxA1U7++ no
ou: People
s a
mail: [email protected] h
) deฺ a
c o m u i
e ฺ G
cl ent
[oracle@edvmr1p0 bin]$ more ~/labs/ldap/seed_odi_oud.ldif
(only if you are curious what created this a
r
o tud
entry…)
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u ce by the –j parameter) would be OS-protected.
l file (indicated
e d e
The password l i
n N
lori
[oracle@edvmr1p0 bin]$ more ~/labs/ldap/pswd.txt
F Welcome1
The LDIF seed file is shown on the next page.
dn: dc=example,dc=com
objectclass: top
objectclass: domain
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
dc: example
description: Fictional example company
dn: ou=People,dc=example,dc=com
ou: People
objectclass: top
objectclass: organizationalUnit
ble
fe r a
dn: uid=SUPERVISOR,ou=People,dc=example,dc=com
ans
objectClass: person
n - t r
objectClass: organizationalPerson
n o
objectClass: inetOrgPerson s a
objectClass: top h a
) deฺ
c o m u i
cn: SUPERVISOR
e ฺ G
givenName: SUPERVISOR
r a cl ent
mail: [email protected]
@ o tud
ou: People
e l c his S
u
sn: SUPERVISOR
ฺ n ed se t
l o r in to u
uid: SUPERVISOR
u (f nseWelcome1
c
userPassword:
lice
e del
i n N dn: uid=OdiUser1,ou=People,dc=example,dc=com
o r
Fl objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
cn: OdiUser1
givenName: OdiUser1
mail: [email protected]
--More--(44%)
<value>cou=Groups,dc=example,dc=com</value>
c o m u i
e ฺ G
</values>
r a cl ent 1
</extendedProperty>
o t u d
</serviceInstance>
l c u@ is S
n e de e th
i nฺ © t2015, s and/or its affiliates. All rights reserved.
uOracle
o r
Copyright
o
u (fl nse
d e lc liceinto $HOME/.odi/oracledi/jps-config-jse.xml.
e
Copy jps-config.xml
N
n
i that you have the following three sections in the file. View properties in these three sections:
F lorVerify
1. JPS OUD LDAP Identity Store Service Instance
2. Basic Authenticator Login Module
3. <jpsContext name="default">
Edit the values in the JPS OUD LDAP Identity Store Service Instance section in the jps-
config-jse.xml file to point to your external OUD LDAP Server.
Note: The idstore.type property points to the type of the LDAP identity store with no default
value. The following are examples of some possible values for this parameter:
• OID: Oracle Internet Directory 10g and 11g
• OVD: Oracle Virtual Directory 10g and 11g
• ACTIVE_DIRECTORY: Microsoft Active Directory
• IPLANET: Sun Java System Directory Server and OUD
• WLS_OVD: WebLogic OVD (Embedded LDAP Server)
<property name="loginModuleClassName"
value="oracle.security.jps.internal.jaas.module.idstore.IdStoreLoginModule"/>
<property name="jaas.login.controlFlag" value="REQUIRED"/>
</serviceInstance>
2
<jpsContext name="default">
<serviceInstanceRef ref="credstore"/>
ble
<!--<serviceInstanceRef ref="keystore"/>-->
<serviceInstanceRef ref="policystore.xml"/>
fe r a
This matches the first
ans
<!--<serviceInstanceRef ref="audit"/>-->
<serviceInstanceRef ref="trust"/> highlighted box from the
n - t r
<serviceInstanceRef ref="pdp.service"/> previous slide.
a no
<serviceInstanceRef ref="attribute"/>
h a s
<serviceInstanceRef ref="idstore.oud"/>
m ) deฺ
<serviceInstanceRef ref="idstore.loginmodule"/>
ฺ c o u i
</jpsContext>
e
cl ent 3 G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceinto $HOME/.odi/oracledi/jps-config-jse.xml.
e d e
Copy jps-config.xml l i
n N
i that you have the following three sections in the file. View properties in these three sections:
F lorVerify
1. JPS OUD LDAP Identity Store Service Instance
2. Basic Authenticator Login Module
3. <jpsContext name="default">
Notice that the LDAP userid and password are not in this file.
OPSS cannot be
easily shared.
ble
fe r a
t r a ns
n o user-Repository
DB n
Master
for new
s a
a
) h deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u e
cRepository
e
To createda
e
new l
Masteri referencing a user in the external LDAP Server, start
N
orin
Repository Creation Utility, and then enter the necessary database connection information. You
Fl cannot extend an existing OPSS store to support both Internal and External Authentication
simultaneously, you need to create a new OPSS. There are several ways to do that; using RCU to
make a whole new set of repositories is the easiest.
ble
fe r a
an s
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceconnection to your new Master Repository. Configure Repository
You needdto
ecreate a l i
e with necessary parameters. In the ODI section, enter SUPERVISOR, the User and
new
n N
Connections
i
F lorPassword of the authenticated user in your external LDAP store. In the Repository Connection
section, enter the name created as part of RCU.
It may seem confusing to have the same name SUPERVISOR in both the internal and external user
stores, but there is an advantage to doing it this way as far as inheriting privileges.
Click Test to verify your entries.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o 2 ui
c l e n t G
a
or tude
@
cu his S
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u c>eODI > Switch Authentication Mode.
e d
1. Select
eMain l
Menu i
i n
2.
N
Enter the same information you used in the Connection login. Click Next.
r
Flo
3 4
ble
fe r a
5 ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce depending on the current Authentication Mode in use:
e
3. The d e
next action l i
varies
i n N- If currently using Internal Authentication, you are prompted to switch to External
r
Flo Authentication.
- If currently using External Authentication, you are prompted to switch to Internal
Authentication.
4. Click the green plus to add users from LDAP into the new RCU repository.
5. If the users already existed in the previous repository, then they map over as supervisors.
If you want to prove that you are really accessing the SUPERVISOR in the LDAP and not the
one in ODI itself, then you can log out, stop LDAP, and then try to log back in again and it
will say, “Bad credentials.”
1 e
3 r a bl
s fe
- t r an
n no
s a
2 h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ceAuthentication, you can re-activate ODI users (one at a time) that have
e d e
After switching to l i
Internal
n
been Nde-activated during the switch.
F lori
To reactivate a user:
1. In Security Navigator, expand the Users accordion. Select the user that you want to re-
activate from the list of users. Right-click and select Edit. The User editor appears.
2. Deselect Allow Expiration Date, or extend it past today.
3. If you want to set a password for this user, click Change Password and enter the new
password for this user.
4. From the File main menu, select Save.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cstorage
e
To switch d e
the l
password i mode:
N
Fl ori1.n Disconnect ODI Studio from the repository. From the ODI main menu, select Password
Storage > Switch...
2. Specify the login details of your Oracle Data Integrator master repository, which are defined
when connecting to the master repository. Click Next.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce Storage (Internal/External).
e d
3. Select
eExternal l i
Password
i n
4.
N
With this mode, you have to provide the MBean Server parameters to access the credential
r
Flo store. These parameters are provided in the following. Click Finish. You can now reconnect
to the ODI repository.
- Host: MBeans Server Host (for example, abc115.oracle.com)
- Port: MBeans Server Port (for example, 7001)
- User: MBeans Server User Name (for example, weblogic)
- Password: MBeans Server Password (for example, weblogic)
Note: ODI offers a password recovery service that should be used only in case of an External
Password Storage crash. Using this procedure, password storage is forced to Internal Password
Storage because the external storage is no longer available. This operation should be performed
by a Supervisor user.
to an Internal Authentication?
a. User passwords are not copied from the identity store to
the repository.
b. All the user accounts are marked as expired.
c. All the user accounts must be re-activated by a
SUPERVISOR user that is created during the switch. a b le
s f er
d. All of the above tran
n on-
s a
a
) h deฺ
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:edd
el lice
i n N
lo r
Explanation: When switching from an External to an Internal Authentication, user passwords are
F not copied from the identity store to the repository. The passwords are nullified. All the user
accounts are marked as expired and must be reactivated by a SUPERVISOR that is created
during the switch.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cbeerunning in WLS; in your practice environment it is running stand-alone.
e d
In real life,
e
OUD l
would i
n N
F lori
1. Delete
bl e
fe r a
ans
2. Transform n - t r
and insert data a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
3. Commit r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceincoming data flow into the target datastore, possibly deleting the content
e d
This strategy
e inserts l
thei
theN
ofin target beforehand.
F lor
This integration strategy includes the following steps:
1. Delete (or truncate) all records from the target table. This step usually depends on a KM
option.
2. Transform and insert data from sources located on the same server and from loading tables
in the Staging Area. When dealing with remote source data, LKMs will have already
prepared loading tables. Sources on the same server can be read directly. The integration
operation will be a direct INSERT/SELECT statement containing all the transformations
performed on the Staging Area in the SELECT clause and on all the transformations on the
target in the INSERT clause. There is no CKM in this mode, no “control.”
3. Commit the transaction. The operations performed on the target should be done within a
transaction and committed after they are all complete. Note that committing is typically
triggered by a KM option called COMMIT.
Note: The same integration strategy can be obtained by using the Control Append strategy (next
slide) and not choosing to activate Flow Control.
bl e
fe r a
ans
n - t r
a no
h a s CKM
I$ I$ m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce by adding extra steps that will store the flow data in an integration
e d
This approach
e can bel iimproved
n
table N
(I$), and then call the CKM to isolate erroneous records in the error table (E$).
F lori
The Control Append integration strategy includes the following steps:
1. Drop (if it exists) and create the integration table in the Staging Area. (You can choose to
ignore the “error” of attempting to drop a nonexistent object.) The integration table is created
with the same columns as the target table so that it can be passed to the CKM for Flow
Control.
2. Insert data into the loading table from the sources and loading tables by using a single
INSERT/SELECT statement similar to the one loading the target in the Append strategy.
3. Call the CKM for Flow Control. The CKM will evaluate every constraint defined for the target
table on the integration table data. It will create an error table and insert the erroneous
records into this table. It will also remove erroneous records from the integration table. After
the CKM completes, the integration table will contain only valid records. Inserting them into
the target table can then be done safely. You can optionally fix the bad records (in an error
hospital?) and re-integrate them.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i I$
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cefrom the target table. This step can be made dependent on an option
e d
4. Remove
e all l i
records
i n N
value that is set by the designer of the interface.
r 5.
Flo Append the records from the integration table to the target table in a single INSERT/SELECT
statement.
6. Commit the transaction.
7. Drop the temporary integration table.
the target table by comparing the records of the flow with the
existing records in the target according to the “update key.”
1. Drop and create the integration table.
2. Transform and insert data using single INSERT/SELECT.
3. Recycle the rejected records from to the integration table?
a b le
4. Call the CKM for Flow Control. fer s
- t r an
n no
s a
I$ h
) deฺatrg
c o m u i CKM
l e ฺ t G
o rac uden E$
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u cestrategy is used to integrate data in the target table by comparing the
e d e
The Incremental l
Updatei
n N
records
i of the flow with existing records in the target according to a set of columns called the
F lor“update key.” Records that have the same update key are updated when their associated data is
not the same. Those that do not yet exist in the target are inserted. This strategy is often used for
dimension tables when there is no need to keep track of the records that have changed.
The challenge with such Integration Knowledge Modules (IKMs) is to use set-oriented SQL-based
programming to perform all operations rather than using a row-by-row approach that often leads to
performance issues. This method is described as follows:
1. Drop (if it exists) and create the integration table in the Staging Area. This is created with the
same columns as the target table (and additional columns as well) so that it can be passed
to the CKM for Flow Control. It also contains an IND_UPDATE column that is used to flag the
records that should be inserted (“I”) and those that should be updated (“U”).
2. Transform and insert data in the loading table from the sources and loading tables by using a
single INSERT/SELECT statement. The IND_UPDATE column is set by default to “I”.
3. Recycle the rejected records from the previous run to the integration table if the
RECYCLE_ERROR KM option is selected.
4. Call the CKM for Flow Control. The CKM will evaluate every constraint defined for the target
table on the integration table data. It will create an error table and insert the erroneous
records into this table. It will also remove erroneous records from the integration table.
– “U” for all the records that have the same update key
– “N” for all records to ignore
6. Update the target with records flagged as “U”
7. Insert records into the integration table that are “I”
8. Commit the transaction. e
r a bl
9. Drop the temporary integration table. s fe
- t r an
n no
s a
h
) deฺ a
c o m u i I$
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u ce table to set IND_UPDATE to “U” for all the rows that have the same
lthe integration
e d
5. Updatee l i
i n N
update key values as the target ones. Therefore, rows that already exist in the target will
r
Flo have a “U” flag. This step is usually an UPDATE/SELECT statement, but could be a MERGE.
6. Update the integration table again to set the IND_UPDATE column to “N” for all records that
are already flagged as “U” and for which the column values are exactly the same as the
target ones. As these flow records match exactly the target records, they do not need to be
used to update the target data. After this step, the integration table is ready for applying the
changes to the target as it contains records that are flagged:
- “I”: These records should be inserted into the target.
- “U”: These records should be used to update the target.
- “N”: These records already exist in the target and should be ignored.
7. Update the target with records from the integration table that are flagged as “U”. Note that the
update statement is typically executed before the INSERT statement to minimize the volume
of data manipulated.
8. Insert records into the integration table that are flagged as “I” into the target.
9. Commit the transaction.
10. Drop the temporary integration table.
• Teradata
• Oracle
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e d
This approach
e can bel ioptimized depending on the underlying database. The following examples
N
n such optimizations:
illustrate
F lori• With Teradata, it may be more efficient to use a left-outer join between the flow data and the
target table to populate the integration table with the IND_UPDATE column already set
properly.
• With Oracle, it may be more efficient in some cases to use a MERGE INTO statement on the
target table instead of an UPDATE then INSERT.
bl e
Supplier is updated for product P1. Family is updated for product P2.
fe r a
ans
n - t r
a no
h a s 1
3
m ) deฺ 2
ฺ c o u i
4 e
cl ent G
Product P5 Name is updated r a
o tud
is added. for product P3. u @
c his S
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l
(f nseo
l c u ce of the behavior of the product SCD. In the operational system, a
e
This slide d e
shows an l i
example
n N
product is defined by its ID that acts as a primary key. Every product has a name, size, supplier,
i family.
F lorand In the Data Warehouse, you need to store a new version of this product whenever the
supplier or family is updated in the operational system.
In this example, the product dimension is first initialized in the Data Warehouse on March 12,
2006. All the records are inserted and are assigned a calculated surrogate key as well as the
ending date is set to January 1, 2400. Because these records represent the current state of the
operational system, their current record flag is set to 1.
After the first load, the following changes happen in the operational system: The supplier is
updated for product P1; the family is updated for product P2; the name is updated for product P3;
Product P5 is added.
These updates have the following impact on the Data Warehouse dimension:
1. The update of the supplier of P1 is translated into the creation of a new current record
(Surrogate Key 5) and the closing of the previous record (Surrogate Key 1).
2. The update of the family of P2 is translated into the creation of a new current record
(Surrogate Key 6) and the closing of the previous record (Surrogate Key 2).
3. The update of the name of P3 updates the target record with Surrogate Key 3.
4. The new product P5 is translated into the creation of a new current record (Surrogate Key 7).
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cModule
e
To createda
e
Knowledge l i that implements this Type 2 SCD behavior, it is necessary to know
N
orin
which columns act as a surrogate key, a natural key, a start and end time stamp, and so on. ODI
Fl stores this information in the Slowly Changing Dimension Behavior field on the Description tab for
every attribute in the model.
When populating such a datastore in a mapping, the IKM has access to this metadata by using the
SCD_xx selectors on the getColList() substitution method.
bl e
Work
fe r a
ans
n - t r
• RDBMS Table to JMS a no
h a s
m ) dTarget e ฺ
Source o
ฺc t Gu (JMS) i
l e
o rac uden
Work
c u @ St
d e l t h is
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cwhen
There aree d e
some l
cases i the source is a single file that can be loaded directly into the target
N
n by using the most efficient method. By default, ODI suggests to locate the Staging Area on
table
F lorthei target server, use an LKM to stage the source file in a loading table, and then use an IKM to
integrate the loaded data to the target table.
If the source data is not transformed, the loading phase is not necessary.
In this situation, you would use an IKM that directly loads the file data to the target: this requires
setting the Staging Area on the source file logical schema. By doing this, ODI will automatically
suggest to use a “Multi-Connection” IKM that moves data between a remote Staging Area and the
target.
Such an IKM would use a loader, and include the following steps:
1. Generate the appropriate load utility script.
2. Run the loader utility.
An example of such a KM is the IKM File to Teradata (TTU).
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u e
cset
e d
A business
e
process l
is ia of coordinated tasks and activities, involving both human and system.
N
orin
Bulk data processing is the processing of a batch of discrete records between participating
Fl applications. Oracle Application Integration Architecture (AIA) uses Oracle Data Integrator to
perform bulk data integrations.
See also new SOA 12c add-on Managed File Transfer.
http://www.oracle.com/us/products/middleware/soa/oracle-managed-file-transfer-ds-2215938.pdf
step is a mapping:
• First: The user’s source table is the source in ODI and the
user’s target table is the target in ODI. The XREF data for
the source and common rows is created. Any column of
the target is populated with the COMMON identifier.
• Second: Target application identifies the datastore with the rable
mapping between the target identifier and the common n(or s fe
source) identifier. n - tra
o n
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
Source u @ o Target
S tud
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
c u ce
In ODI, e
el
dcreation
the ofliXREF data is a two-step process. Each step is a mapping.
Inin
N
o r the first mapping, the user’s source table is the source in ODI and the user’s target table is the
Fl target in ODI.
While transporting data from the source table to the target table, create the XREF data for the
source and common rows. In this process, if you want to populate any column of the target with
the COMMON identifier, the ODI KM takes care of that, too.
In the second mapping, after data is posted from the mapping table to the base table, the target
application must identify a datastore where the mapping between target identifier and common (or
source) identifier that you have sent during previous mapping processing is available.
A second mapping must be run in which this datastore is the source in ODI and the XREF table is
the target. This creates the appropriate target columns in the XREF table.
Data arrives in
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Source Table
1 XREF is
Source
updated
Target
PACKAGE 1
ble
fe r a
ans
Target application
creates data from
Target application updates a
datastore that contains the
n - t r
mapping to base table Common to Target mapping
a no
h a s
2 ) deฺ
Target and XREF
c o m u i
XREF
l e ฺ t G
PACKAGEa2c e n
r
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce names cannot be hard-coded, two variables must be defined to hold
e d e
Note: Because XREF l icolumn
the
i n N
source and target column names. Normally, these column names are derived from the AIA
F lorConfiguration file. This section does not describe how to get that from the XML but rather it
describes how to refresh this from a SQL SELECT statement.
• Batch:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Real Time
Performance
bl e
Moves with sub-second latency
fe r a
ans
Heterogeneous n - t r
Moves changed data across
Extensibility &
a no
different databases and platforms
Flexibility
h a s
m ) deฺ
ฺ c o u i
Transactional e
cl entReliability G
r a
Maintains transaction integrityo
u @ S tud
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e d e
Performance: l i
i n N
F lorLog-based capture moves thousands of transactions per second with low impact. It normally reads
logs, not actual tables, for performance reasons. This is in contrast to ODI, which normally reads
tables.
Extensibility:
Meets a variety of customer needs and data environments with open, modular architecture. OGG
supports lots of source technologies, but not nearly as many nor as diverse as ODI.
Reliability:
Resilient against interruptions and failures. OGG runs in memory, and also persists to trail files in
case of a power failure.
High Availability
Standby
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
Zero–Down
Time Upgrades
New DB/OS/HW
and Migrations
Log-based,
Real-Time Change
Data Capture Live Reporting
Reporting
OGG
Database
ble
fe r a
ETL
ans
- t r
on BI
ODS EDW
Operational
ETL
a n
a
h eฺ s
Heterogeneous
m ) EDW
OLTP Systems
ฺ c o u id
e
cl ent G
BPM
o r a d BAM Transactional
u @ S tuMessage CEP
Data Integration
d e lc this Bus
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce data replication solutions:
e d e
OGG provides the l i
following
n N
i Availability:
F lorHigh
• Live standby for an immediate failover solution that can later resynchronize with your primary
source. An option is to have heterogeneous standby: primary=Oracle, standby=DB/2.
• Active-active solutions for continuous availability and transaction load distribution between
two or more active systems. If Oracle-to-Oracle only, you also could use Data Guard and/or
RAC or other products in lieu of OGG.
Zero–down time upgrades and migrations:
• Eliminates down time for upgrades and migrations
Live reporting:
• Feeding a reporting database so that you do not burden your source production systems
Operational Business Intelligence (BI):
• Real-time data feeds to operational datastores or Data Warehouses, directly or via ETL
Transactional data integration:
• Real-time data feeds to messaging systems for business activity monitoring (BAM), business
process monitoring (BPM), and complex event processing (CEP)
• Uses event-driven architecture (EDA) and Service-Oriented Architecture (SOA)
ble
fe r a
ans
Capture Trail
Pump
Trail
- t
Delivery
n r
LAN/WAN a no
Internet
h a s
m ) deฺ
TCP/IP
ฺ c o u i
e
cl ent G
Source r a
o tud Target
Database(s) @
Bi-directional
cu his S Database(s)
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce modules that are combined to create the best possible solution for
e d
OGG consists
e of l i
decoupled
n
your N
business requirements.
F lori
On the source system(s):
• OGG’s Capture (Extract) process reads data transactions as they occur, by reading the
native transaction log, typically the redo log. OGG moves only changed, committed
transactional data, which is only a percentage of all transactions—therefore operating with
extremely high performance and very low impact on the data infrastructure.
• Filtering can be performed at the source or target: at table, column, or row level.
• Transformations can be applied at the capture or delivery (also known as Replicat) stages.
Advanced queuing (trail files):
• To move the transactional data efficiently and accurately across systems, OGG converts the
captured data into an Oracle Canonical (that is, proprietary) Format in “trail” files. With both
source and target trail files moved by pumps (not to be confused with DB import/export
datapumps), OGG’s unique architecture eliminates any single point of failure and ensures
that data integrity is maintained—even in the event of a system error or outage.
Transactional RDBMS
Source Tables Staging DB Target DB
Replicated Target Tables
Source Tables
ODI CDC
Framework
ble
fe r a
ODI an s
Extract
n - t r
Datapumps
Mappings
a no
Replicat
h a s ODI
WAN
m) uide ฺ
c o
Source Staging
c l eฺ nt G
trail trail
files@o
ra OGG u de
files t
e l cu his S
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce OGG, which provides a cross-platform data replication and changed
ODI canebedecombined liwith
data
i n N
capture (CDC).
r
lo • OGG works in a similar way to Oracle’s asynchronous CDC on ODI, but handles greater
F
volumes and works across multiple database platforms.
• OGG uses its own data logging (or “trails”) to record DML and DDL activities on a source
database, which it then replays on staging and target platforms to replicate changes in real-
time.
• Using OGG technology with ODI is beneficial, especially if you are reaching replication
performance limits.
Example: OGG captures and replicates changes from the source system, typically into a staging
schema on the target Data Warehouse platform. This staging schema contains a replicated copy
of the source table and the structures that are used by ODI’s own CDC framework. ODI then picks
up the changes in the structures of the ODI CDC framework, transforms the data, perhaps joins it
to look up other tables, and then loads it into the target schema. This technology does not require
ODI to be changed in any way, and uses OGG CDC with the regular existing ODI CDC
framework.
2 3
ble
1 fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud 4
u @ S
d e lc this
ฺ n e s e
r i n
Copyright ©
o u
2015,
t Oracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
1. IneTopology lice Architecture, create two new data servers, one for source and one for
del > Physical
in Ntarget.
r 2.
Flo On the JAgent tab, name them as appropriate, and configure the ports to match the ports
defined in the OGG mgr.prm file.
3. The source and target must have different host/port names. Test your connections.
4. When the tests are successful, both data servers will be displayed in the list.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent 2 G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce the directories for storing the trail files to be used by the data pumps.
e d e
This is where you l i
configure
n N
lori
1. Create the Physical Processes (source only, this is the Extract).
F 2. Create the Logical objects.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl 2ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce the directories for storing the trail files to be used by the data pumps.
e d e
This is where you l i
configure
n N
lori
1. Create the Physical Processes (target only, this is the Replicat).
F 2. Create the Logical objects.
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
l
deOGG
This tiesethe lice to the ODI processes. There are many more screens not shown that
processes
n N CDC with JKMs. This was covered in the previous class, and is covered in the OLL
configure
i
r
loOBE.
F
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u cewith OGG, you have to create the package, which consists of a
e d
To initialize
e
CDC l i
process
n N
perpetual loop that is triggered by the log entry of a new journal and processes new changes with
Fl ori
the CDC Load Customer interface. Execute this package to initialize ODI CDC with OGG. The
name of this package is Sync_Data, and the last thing it does is to call itself, over and over again.
This recursive technique is cleaner than a return arrow loop.
Parameters of Note:
• Global Row Count=1 says to wait for only one row to be changed before proceeding to the
next step (that is, a “micro-batch”). OGG itself may have an optimum buffer size that thwarts
this micro-size.
• Polling Interval=1000 milliseconds, that is, 1 second (basically near-real-time).
• Logical Schema=ODI_DEMO_TRG and Subscriber=ODIDEMO match previous CDC
configuration values on screen in the OLL OBE.
MANAGER RUNNING
JAGENT RUNNING
EXTRACT RUNNING CAP 00:00:00 00:00:00
EXTRACT RUNNING DELP 00:00:00 00:00:06
be maintained manually.
• Procedures do not maintain cross-references to
other ODI artifacts such as datastores, models,
and so on.
– Their maintenance is complex compared to
interfaces. bl e
fe r a
Procedures should never be used to move and
a ns
t r
transform data.
n on-
Moving data operations should be performeds aby
h a
using mappings. m) deฺ c o u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ceperform very complex actions, including SQL statements. In addition,
e
Proceduresd e
allow youl i
to
n
they N
i data you
allow to use source and target connections, and support data binding. In short, you can
F lormove by using procedures.
Developers who feel at ease with SQL may be tempted to code their transformations and data
movements within procedures instead of using interfaces.
There are several issues with using procedures in such a way:
• Procedures contain manual code that needs to be maintained manually.
• Procedures do not maintain cross-references to other ODI artifacts such as datastores,
models, and so on, making their maintenance very complex compared to mappings.
Procedures should never be used to move and transform data. These operations should be
performed by using mappings.
of data.
Enforce data quality of source data by using static checks.
Enforce quality data before it is pushed into a target by
using flow checks.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Project e del ofldata
developers ice integration sometimes do not take into account the quality of their data.
This
i n Na common mistake, because data integration itself may be to move and transform
is
r
loerroneous data, and propagate it over the applications.
F
ODI allows you to enforce data quality of source data by using static checks as well as the quality
of the data before it is pushed into a target via flow checks. By using both these checks, you can
make sure that the quality of the data is improved or enforced when the data is moved and
transformed.
bl e
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
e d e
In a package, you l
can isequence any number of steps. Every single step in a package may fail for
some N
in always
reason, even if it is not your fault (for example, target or source database is down). You
F lormust consider these different error cases when designing packages. You achieve this by
having not only “OK” path (green arrows) in the packages but also the “KO” path (red arrow).
Suppose some middle step fails, then you go down the KO path and “successfully” send an alert.
If the alert itself is sent successfully, the package as a whole ends successfully. This makes it
more difficult to spot on the Operator tab. A way to “fix” this is after the Send Alert, to call an OS
command that does not exist, for example foobar, which then errors with no KO handler, so the
package as a whole ends with an error condition (now easy to spot) and you still have sent the
email alert.
change ODI CDC. You just use GoldenGate CDC with the
regular existing ODI CDC framework.
a. True
b. False
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Answer:ead
el lice
i n N
lo r
Explanation: This technology does not require ODI to be changed in any way, and uses
F GoldenGate CDC with the regular existing ODI CDC framework. However, while not required,
there is an advantage to changing ODI to “know about” (and start/stop/monitor) the OGG
processes.
Flori
N n
e d e l c u
l
l
i
o r
ce
ฺ n
(f nse
e l
in to u
u
ed se t
@
r a
c his S
e ฺ c
o tud
o m
cl ent G
h
u
a
i
s a
) deฺ
o n n
- t r an
s
fe r a bl
e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Objectives
• Contrast terms
• Implement ODI mapping for big data to Oracle SQL
• Locate BigDataLite VM for further research
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
Contrast terms
– Apache: Hadoop, HDFS
– Oracle: Databases, Connectors
• Implement ODI mapping for big data to Oracle SQL
• Locate BigDataLite VM for further research e
r a bl
s fe
- t r an
n no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
l c u ce
denames
Some ofethe oflithe components are very whimsical! For example, Hadoop was the name
that
i n N software creator’s child called his stuffed yellow toy elephant.
the
lo r
F
• Contrast terms
Implement ODI mapping for big data to Oracle SQL
– Topology
– Designer
– KMs e
• Locate BigDataLite VM for further research r a bl
s fe
- t r an
no n
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
bl e
fe r a
ACQUIRE ORGANIZE ANALYZE DECIDE
t r a ns
on-
• HDFS • Hadoop • Data • Analytic
• Oracle NoSQL (MapReduce) Warehouse
a n
Applications
• Oracle DB • Oracle
a s
Big Data
Connectors m ) h deฺ
ฺ c o u i
• ODI e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
l
dedata
After theebig lice components (physical/logical servers, datastores, and so on) are
topology
n N in ODI, the models are used just like any other models. All of the normal components and
defined
i
r
lotransformations are available.
F
ble
fe r a
Define Topology: ans
- t r
• Server
n on
• Physical a
h
• Logicala s
m ) deฺ
ฺ c o u i “normal”
just like other
e G
acl technologies
or tude nt
@
cu his S
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
c u
Accesse
el liceis by the usual methods: JDBC or JNDI.
todthe data server
i n N
lo r
The available schemas would be retrieved from the HBase metadata and displayed in the schema
F pull-down lists (where it currently says <Undefined>.)
Standard Hierarchy:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
Sample e dedata
big KMs:li
i N
•n RKM (Reverse Engineering)
lo r
F - RKM HBase
- RKM Hive
• LKM (Loading)
- LKM HBase to Hive
• CKM (Checking)
- CKM Hive
• IKM (Integration)
- IKM File to Hive
- IKM File-Hive to Oracle
- IKM File-Hive to SQL (Sqoop)
- IKM Hive Control Append
- IKM Hive Transform
- IKM Hive to HBase Incremental Update
- IKM SQL to Hive-HBase-File (Sqoop)
• Contrast terms
• Implement ODI mapping for big data to Oracle SQL
Locate BigDataLite VM for further research
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce
e d e l i
n N
F lori
ble
fe r a
ans
n - t r
a no
h a s
m ) deฺ
ฺ c o u i
e
cl ent G
r a
o tud
@
c his S
u
e l
ฺ n ed se t
r
Copyright
o uOracle and/or its affiliates. All rights reserved.
in © t2015,
l o
(f nse
l c u ce sample code, and hands-on labs based on Oracle MoviePlex that will
e
Oracle hasd e
created l i
videos,
i n
help N
you learn how to develop big data applications using Oracle’s big data platform. Oracle
F lorMoviePlex is a fictitious online movie streaming company.
• Main site (do not let the “11g” in the URL fool you, it is current with 12c webcasts):
http://www.oracle.com/technetwork/middleware/data-integrator/odi-11g-webcast-archive-
367128.html
• Webcast – ODI 12.1.3 and Big Data:
https://oracleconferencing.webex.com/oracleconferencing/ldr.php?RCID=394c8e514957ba6
298c98d18f7ce5a09
• Webcast – ODI 12c and BigDataLite demo:
https://oracleconferencing.webex.com/oracleconferencing/ldr.php?RCID=c6de47feeccd7f2b
049d92775529c188
• Download – Oracle Big Data Lite Virtual Machine (approx 14 GB) and videos:
http://www.oracle.com/technetwork/database/bigdata-appliance/oracle-bigdatalite-
2104726.html
Which of the four big data phases does ODI participate in?
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2017, Oracle and/or its affiliatesฺ
a. ACQUIRE
b. ORGANIZE
c. ANALYZE
d. DECIDE
ble
fe r a
ans
n - t r
no
s a
h
) deฺ a
c o m u i
e ฺ G
r a cl ent
@ o tud
e l c his S
u
ฺ n ed se t
r in © t2015,
Copyright
o uOracle and/or its affiliates. All rights reserved.
l o
(f nse
c u
Answer:ebd
el lice
i n N
lo r
Explanation: See page 13-4 for a list of what the other phases do.
F