Академический Документы
Профессиональный Документы
Культура Документы
By Ram Reddy
1/1/2014
Version 1.0
Confidential
Contents
1.
2.
20
3.
ODI Installation
23
4.
31
5.
35
35
40
6.
48
48
48
7.
49
49
53
54
8.
Creating Model
56
9.
Creating Project
60
10.
Components
64
64
64
11.
65
12.
69
13.
74
14.
77
15.
81
16.
84
17.
87
18.
89
19.
92
20.
User Functions
95
21.
Variables
101
22.
Sequences
105
23.
Procedures
112
24.
Packages
120
25.
Scenarios
122
26.
Version Control
123
27.
124
28.
136
29.
146
30.
Load Plan
Analytical Data
1. is useful to ANALYSE the business
2. is Historical and summarized
3. Is stored in OLAP(On Line Analytical Processing) or DW(Data Warehouse )
4. Source of Analytical data is OLTP
DW Architecture
DW Tools
1. DW tools are divided into two types. some of those tools are
ETL
Informatica
Reporting
OBIEE
BI Publisher
Data Stage
Abintio
Cognos
SSIS
SAP-BO
ODI ( ELT )
DOMO
OWB
Qlick View
BODI
MSTR
OBIA
1. OBIA stands for Oracle Business Intelligence Applications.
2. OBIA is a predefined work of ETL and Reporting.
3. OBIA some of the important plug-ins are
1. SDE(Source Dependent Extraction) OLTP TO STAGING AREA
2. SIL(Source Independent Loading)Staging Area to DW
3. DAC(Data Warehouse Administration Console) Scheduling tool of ETLs(SDE
&SIL)
OLAP
Detail
4. OLTP Supports CRUD(Create ,
summarized
4. OLAP supports only read
5. It is subject oriented DB
6. It is volatile
6. It is nonvolatile
)
10. In OLTP we will use normalizes
schema
10
11
12
Columns:
13
Schemas
1. A group of tables are called as schema
1. Star
2. Snow Flake
3. Constellation or mixed
1. Star Schema
1.
Organizes data into a central fact table with surrounding dimension tables
2.
3.
14
7.
15
16
17
18
Mixed Schema
1. It contains more than one fact with some common dimensions (Conformed Dimensions)
2. It is combination of some stars or some snows or both
19
Conformed Dimensions
1. A dimension table is shared by two or more facts then it is called as conformed
dimension
2. OBIA data model created using conformed dimensions
2. Introduction to Oracle Data Integrator
1. A widely used data integration software product, Oracle Data Integrator provides a new
declarative design approach to defining data transformation and integration processes,
resulting in faster and simpler development and maintenance.
2. Based on a unique E-LT architecture (Extract - Load Transform), Oracle Data
Integrator not only guarantees the highest level of performance possible for the
execution of data transformation and validation processes but is also the most costeffective solution available today.
3. Oracle Data Integrator provides a unified infrastructure to streamline data and
application integration projects.
20
A Unique Solution
1. Oracle Data Integrator employs a powerful declarative design approach to data
integration,which separates the declarative rules from the implementation details.
2. Oracle Data Integrator is also based on a unique E-LT (Extract - Load Transform)
architecture which eliminates the need for a standalone ETL server and proprietary
engine, and instead leverages the inherent power of your RDBMS engines. This
combination provides the greatest productivity for both development and maintenance,
and the highest performance for the execution of data transformation and validation
processes.
3. Here are the key reasons why companies choose Oracle Data Integrator for their data
integration needs:
1. Faster and simpler development and maintenance: The declarative rules driven
approach to data integration greatly reduces the learning curve of the product and
increases developer productivity while facilitating ongoing maintenance. This
approach separates the definition of the processes from their actual implementation,
and separates the declarative rules (the "what") from the data flows (the "how").
2. Data quality firewall: Oracle Data Integrator ensures that faulty data is
automatically detected and recycled before insertion in the target application. This is
performed without the need for programming, following the data integrity rules and
constraints defined both on the target application and in Oracle Data Integrator.
21
engines and SQL, you are capable of executing data transformations on the target
server at a set-based level, giving you much higer performance
4. Simpler and more efficient architecture: The E-LT architecture removes the need
for an ETL Server sitting between the sources and the target server. It utilizes the
source and target servers to perform complex transformations, most of when
happen in batch mode when the server is not busy processing end-user queries
7. Cost-savings: The elimination of the ETL Server and ETL engine reduces both the
initial hardware and software acquisition and maintenance costs. The reduced
learning curve and increased developer productivity significantly reduce the overall
labor costs of the project, as well as the cost of ongoing enhancements.
22
3. ODI Installation
23
24
25
26
27
28
29
30
Repositories:
1. Oracle Data Integrator Repository is composed of one Master Repository and several
Work Repositories.
2. ODI objects developed or configured through the user interfaces (ODI Studio) are stored
in one of these repository types.
3. Master repository stores the following information
1. Security information including users, profiles and rights for the ODI platform
2. Topology information including technologies, server definitions, schemas,
contexts,languages and so forth.
3. Versioned and archived objects.
4. Work repository stores the following information
1. The work repository is the one that contains actual developed objects. Several
work repositories may coexist in the same ODI installation (example Dev work
repository ,prod work repository etc )
31
32
33
contain, the contexts, the languages and the agents, as well as the repositories.
The site, machine, and data server descriptions will enable Oracle Data
Integrator to execute the same mappings in different physical environments.
4. Security Navigator: is the tool for managing the security information in Oracle
Data Integrator. Through Security Navigator you can create users and profiles
and assign user rights for methods (edit, delete, etc) on generic objects (data
server, datatypes, etc), and fine tune these rights on the object instances (Server
1, Server 2, etc).
34
Repository
35
36
37
38
39
10. Go back to sql plus and execute select count(*) from tab and notice that 67
tables are created
5.2
40
41
42
43
44
Exercise: please complete \02 ODI\04 ORACLE REFERENCE\ Creating Master and
Work Repository by RCU.docx (Please do not run drop RCU Section)
6. Creating master and work repositories using RCU
1. Download the RCU software and extract it
2. Navigate to location E:\05-ODI12C\ODI12C_rcuHome\BIN
3. Double click on rcu.bat file Click on RUN
4. In welcome screen click on next
5. Select create click on next
45
46
47
7.2
Step 1: Creating user TDBU and load tables into TDBU schema
1. Open SQL PLUS Type / as sysdba press enter
2. Create a user by executing below commands
a. Create user TDBU identified by RRitec123;
b. Grant DBA to TDBU;
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
48
c. Conn TDBU@ORCL
d. Password RRitec123
e. Select count (*) from tab;
3. Go to RRITEC labcopy labdata folder and take full path of driver and execute as for
below
8. Creating and Managing Topology
The Oracle Data Integrator Topology is the physical and logical representation of
the Oracle Data Integrator architecture and components.
8.1
1. The physical architecture defines the different elements of the information system, as
well as their characteristics taken into account by Oracle Data Integrator.
2. Each type of database (Oracle, DB2, etc.) or file format (XML, Flat File), or
application software is represented in Oracle Data Integrator by a technology.
3. The physical components that store and expose structured data are defined as
dataservers.
4. A data server is always linked to a single technology. A data server stores
information according to a specific technical logic which is declared into physical
schemas attached to this data server.
Process:
1. Open ODI Studio
2. Go to ODI menu Click on connect Select login name as RRITEC Click on
edit Under work repository section select work repository
RRITEC_DEV_WORKREP Click on test Click on ok Click on okClick on
ok
49
3. Go to
50
51
52
8.2
1. The logical architecture allows a user to identify as a single Logical Schema a group
of similar physical schemas - that is containing data stores that are structurally
identical - but located in different physical locations.
2. Logical Schemas, like their physical counterpart, are attached to a technology.
3. All the components developed in Oracle Data Integrator are designed on top of
the logical architecture. For example, a data model is always attached to logical
Schema
Process:
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
53
4. Similarly create one more new logical schema with the name of TARGET_TDBU
8.3
Creating Contexts
54
Process (optional):
1. By default one context created with installation of ODI with the name of Global
2. We already mapped logical and physical schemas while we were creating logical
schemas For just conformation right click on global context open observe mapping
55
Agents:
1. Oracle Data Integrator run-time Agents orchestrate the execution of jobs. The agent
executes jobs on demand and to start the execution of scenarios according to a
schedule defined in Oracle Data Integrator.
Languages:
1. Languages defines the languages and language elements available when editing
expressions at design-time.
9. Creating Model
1. Models are the objects that will store the metadata in ODI.
2. They contain a description of a relational data model. It is a group of DataStores
(Known as Tables) stored in a given schema on a given technology.
3. A model typically contains metadata reverse-engineered from the real data model
(Database, flat file, XML file, Cobol Copybook, LDAP structure ...etc)
4. Database models can be designed in ODI. The appropriate DDLs can then be generated
by ODI for all necessary environments (development, QA, production)
5. Reverse engineering is an automated process to retrieve metadata to create or update
a model in ODI.
6. Reverse- Engineering also known as RKM(Reverse engineering Knowledge Module)
7. Reverse engineering two types
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
56
1. Standard reverse-engineering
i. Uses JDBC connectivity features to retrieve metadata, then writes it to the
ODI repository.
ii. Requires a suitable driver
2. Customized reverse-engineering
i. Read metadata from the application/database system repository, then
writes these metadata in the ODI repository
ii. Uses a technology-specific strategy, implemented in a Reverseengineering Knowledge Module (RKM)
57
58
59
2. A folder is a hierarchical grouping beneath a project and can contain other folders and
objects.
3. Every package, Mapping, Reusable Mapping and procedures must belong to a folder.
4. Objects cannot be shared between projects. except (Global variables, sequences, and
user functions)
5. Objects within a project can be used in all folders.
6. A knowledge module is a code template containing the sequence of commands
necessary to carry out a data integration task.
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
60
7. There are different knowledge modules for loading, integration, checking, reverse
engineering, and journalizing.
8. All knowledge modules code will be executed at run time.
MAPPINGS
61
62
1. Review priorities.
2. Review completion progress.
3. Add memos to provide details on what has been done or has to be done.
4. This can be particularly helpful for geographically dispersed teams.
5. Project markers:
1. Are created in the Markers folder under a project
2. Can be attached only to objects in the same project
6. Global markers:
1. Are created in the Global Markers folder in the Others view
2. Can be attached to models and global objects
Process:
1. Under Designer Navigator Click on new Project name it as RRITEC_PROJECT
2. Click on save Right click on First Folder open rename as RRITEC save
63
11. Components
1. In the logical view of the mapping editor, you design a mapping by combining datastores
with other components. You can use the mapping diagram to arrange and connect
components such as datasets, filters, sorts, and so on. You can form connections
between data stores and components by dragging lines between the connector ports
displayed on these objects.
2. Mapping components can be divided into two categories which describe how they are
used in a mapping: projector components and selector components.
i. Projector Components
ii. Selector Components
11.1
Projector Components
1. Projectors are components that influence the attributes present in the data that flows
through a mapping. Projector components define their own attributes: attributes from
preceding components are mapped through expressions to the projector's attributes. A
projector hides attributes originating from preceding components; all succeeding
components can only use the attributes from the projector.
2. Built-in projector components:
1. Dataset Component
2. Datastore Component
3. Set Component
4. Reusable Mapping Component
5. Aggregate Component
6. Distinct Component
11.2
Selector Components
64
1. Selector components reuse attributes from preceding components. Join and Lookup
selectors combine attributes from the preceding components. For example, a Filter
component following a datastore component reuses all attributes from the datastore
component. As a consequence, selector components don't display their own attributes in the
diagram and as part of the properties; they are displayed as a round shape. (The
Expression component is an exception to this rule.)
2. When mapping attributes from a selector component to another component in the mapping,
you can select and then drag an attribute from the source, across a chain of connected
selector components, to a target datastore or next projector component. ODI will
automatically create the necessary queries to bring that attribute across the intermediary
selector components.
3. Built-in selector components:
1. Expression Component
2. Filter Component
3. Join Component
4. Lookup Component
5. Sort Component
6. Split Component
65
2. In Logical tab of the mapping drag and drop e mployee table from
RRITEC_SOURCE_MODEL
3. Drag and drop ods_employee table from RRITEC_TARGET_MODEL
Step2: Create a Expression Transformation
Expression transformation is useful to do all calculations except aggregate calculations(ex sum ,avg ..etc)
Transformation
2. Drag and drop all columns from employee source to expression Transformation
3. Select Expression transformation In expression properties pane expand Attributes
4. Select last attribute click on new attribute name it as FULL_NAME data type as
varchar
5. Click on expression
66
67
68
2. Create a table similar to EMP table but replace scott name with tiger and populate data
69
70
71
72
7. Select Filte object In filter Properties pane develop filter condition to get 10 and 20
73
Exercise: please complete \02 ODI\04 ORACLE REFERENCE\ Flat File to a Table.docx
74
ODS_EMPLOYEE
ODS_EMPLOYEE_SALES
ODS_EMPLOYEE_NON_SALES
ODS_EMPLOYEE_ROOKIE
should
contain
records
for
employees
where
the
75
7. Drag and Drop all the columns one by one from ODS_EMPLOYEE table to
ODS_EMPLOYEE_SALES
8. Drag and Drop all the columns one by one from ODS_EMPLOYEE table to
ODS_EMPLOYEE_NON_SALES
9. Drag and Drop all the columns one by one from ODS_EMPLOYEE table to
ODS_EMPLOYEE_ROOKIE
10.
11. Click on Validate Save Run
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
76
Exercise: From emp table load deptno 10 ,20 and 30 data into different tables .Please do
as shown below
77
VARCHAR2(20),
SAL
NUMBER,
DEPTNO NUMBER,
DNAME VARCHAR2(20)
);
78
79
8. Click on Join Component Select required type of join by default it is Inner Join
80
81
VARCHAR2(20),
SAL
NUMBER,
DEPTNO NUMBER,
DNAME VARCHAR2(20),
LOC VARCHAR2(30)
);
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
82
83
84
85
86
NUMBER
);
87
88
89
90
COUNTRY_ID NUMBER,
COUNTRY_NAME
VARCHAR2(50)
);
91
92
93
94
95
3. Click on Imple mentations Click on Add Implementation Provide below syntax and
select technology Click on ok Save
DECODE($(DNAME),'ACCOUNTING','ACC','RESEARCH','R and
D','OPERATIONS','OPT','SALES')
96
97
5. Click on physical tab select target table under integration knowledge module
select create table property as true
6. Click on validate save run and observe output
98
Step2: Creating Target table and reverse engineer into Target Model
1. Develop a target table as shown below
create table RR_PHONE_FORMAT(ENAME VARCHAR2(20),PHONE VARCHAR2(20))
technology
'(' || SUBSTR($(PHONE),1,3)||') - ' ||SUBSTR($(PHONE),4,3) || '-' ||
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
99
SUBSTR($(PHONE),7,6)
100
22. Variables
1. Variable An ODI object which stores a typed value, such as a number, string or date.
2. Variables are used to customize transformations as well as to implement control
structures, such as if-then statements and loops, into packages.
3. Variables are two types
a. Global
b. Project Level
4. To refer to a variable, prefix its name according to its scope:
a. Global variables: GLOBAL.<variable_name>
b. Project variables: <project_code>.<variable_name>
5. Variables are used either by string substitution or by parameter binding.
a. Substitution: #<project_code>.<variable_name>
b. Binding: :<project_code>.<variable_name>
6. Variables are four types
a. Declare
b. Set
c. Evaluate
d. Refresh
7. Variables can be used in packages in several different ways, as follows:
a. Declaration: When a variable is used in a package (or in certain elements of the
topology which are used in the package), it is strongly recommended that you
insert a Declare Variable step in the package. This step explicitly declares the
variable in the package.
b. Refreshing: A Refresh Variable step allows you to re-execute the command or
query that computes the variable value.
c. Assigning: A Set Variable step of type Assign sets the current value of a
variable.
d. Incrementing: A Set Variable step of type Increment increases or decreases a
numeric value by the specified amount.
101
102
3. Save close
Step 2: Using variable as filter
103
104
23. Sequences
1. A Sequence is a variable that increments itself automatically each time it is used.
2. It is mainly useful to generate surrogate Keys
3. It is equivalent to Sequence generator transformation of informatica
4. A sequence can be created as a global sequence or in a project. Global sequences are
Common to all projects, whereas project sequences are only available in the project
Where they are defined.
5. Oracle Data Integrator supports three types of sequences:
1. Standard sequences: whose current values are stored in the Repository.
2. Specific sequences: whose current values are stored in an RDBMS table cell.
Oracle Data Integrator reads the value, locks the row (for concurrent updates)
and updates the row after the last increment.
3. Native sequence: that maps a RDBMS-managed sequence.
6. Even we can use directly database Sequence without using ODI sequence types
105
start with 1
increment by 1
106
107
4. Click on save
Step2: Using Native Sequence
1. In above mapping m_ DAT ABASE_SEQ select row_wid column
2. Change expression as shown below
108
109
4. Click on save
Step2: Using Standard Sequence
1. In above mapping m_ DAT ABASE_SEQ select row_wid column
2. Change expression as shown below
110
4.
Click on save
111
Procedure Examples:
112
113
i. OdiFileAppend,OdiFileCopy,OdiFileDelete,OdiFileMove,OdiFileWait,Odi
MkDir,OdiOutFile,OdiSqlUnload,OdiUnZip,OdiZip
2. Internet Related
i. OdiSendMail,OdiFtpGet,OdiFtpPut,OdiReadMail,OdiScpGet,OdiScpPut,
OdiSftpGet,OdiSftpPut
3. .. etc (For more ODI TOOLS see package screen)
114
3. Copy all *.csv files from the directory /etc to the directory /home while changing their
extension to .txt:
a. OdiFileCopy -FILE=/etc/*.csv -TOFILE=/home/*.txt -OVERWRITE=yes
4. Copy the directory C:\odi and its sub-directories into the directory C:\Program Files\odi
a. OdiFileCopy -DIR=C:\odi "-TODIR=C:\Program Files\odi" RECURSE=yes
: Delete EMP10
2. LogCounter :Delete
3. Technology :Oracle
4. Context
: Global
5. Schema
: Target_TDBU
6. Command
4. Similarly Create two more tasks to delete from EMP20 and EMP30
115
EMPNO NUMBER(10,0),
ENAME VARCHAR2(30),
SAL NUMBER(10,0) )
116
END;
/
: INSERT RECORD
b. LogCounter :Insert
c. Technology :Oracle
d. Context
: Global
e. Schema
: Target_TDBU
f.
Command
117
6. Click on save Run observe that the record is inserted in table EMP_PROC
Exercise : Create a target table with the name emp_totalsal_tax with columns empno
ename sal comm. ,totalsal,tax and populate totalsal and tax columns using stored
procedure
Totalsal =sal +nvl(comm.,0)
Tax=totalsal*0.1
Exercise 3: Copy files from one folder to another folder using OdiFileCopy
Step1: Understanding Procedure Options and Disable PL/SQL procedure
1. Open above procedure INSER_RECORD_USING_PROCEDURE
2. Click on options Click on add options provide name as shown below
118
119
120
5. Select OdiFileMove and change Filename and Target Directory as shown below
121
26. Scenarios
1. A scenario is designed to put a source component (mapping, package, procedure,
variable) into production.
2. When a component development is finished and tested, you can generate the scenario
corresponding its actual state. This operation takes place in Designer Navigator.
3. The scenario code (the language generated) is frozen, and all subsequent modifications
of the components which contributed to creating it will not change it in any way.
4. It is possible to generate scenarios for packages, procedures, mappings, or variables.
5. Scenarios generated for procedures, mappings, or variables are single step scenarios
that execute the procedure, mapping, or refresh the variable.
6. Once generated, the scenario is stored inside the work repository. The scenario can be
Exported then imported to another repository (remote or not) and used in different
contexts. A scenario can only be created from a development work repository, but can
be imported into both development and execution work repositories.
122
123
3. Save close
4. Right click on package pkg_MAPPINGS_ARCHIVE_FILES Click on version click on
Create version click on ok
5. Now if you want to restore the initial version (1.0.0.0) Right click on package
pkg_MAPPINGS_ARCHIVE_FILES Click on Restore Select 1.0.0.0 version click
on ok
6. Open package observe the initial code
28. Modifying Knowledge Modules
1. Knowledge Modules are templates of code that define integration patterns and their
implementation
2. They are usually written to follow Data Integration best practices, but can be modified for
project specific requirements
3. These are 6 types
124
IKM (Integration Knowledge Modules) are used to integrate (load) data to the target
tables. These KMs are used in Mappings.
8. CKM (Check Knowledge Modules) are used to check that constraints on the sources
and targets are not violated. These KMs are used in data models static check and
interfaces flow checks.
9. SKM (Service Knowledge Modules) are used to generate the code required for creating
data services. These KMs are used in data models.
Mainly used KMs?
1. When processing happens between two data servers, a data transfer KM is required.
a. Before integration (Source Staging Area)
Requires an LKM, which is always multi-technology
b. At integration (Staging Area Target)
Requires a multi-technology IKM
2. When processing happens within a data server, it is entirely performed by the server.
a. A single-technology IKM is required.
3. LKM and IKMs can use in four possible ways
125
4. Normally we ever create new KMs .But sometimes we may need to modify the existing
KMs
5. While modifying KMs , Duplicate existing steps and modify them. This prevents typos in
the syntax of the odiRef methods.
Exercise 1: Incremental Loading
1. Inexistent rows are inserted; already existing rows are updated.
2. If we deleted a record in source then it wont be deleted in the target
3. For incremental update mandatorily we should have a unique/primerkey column on
target
Step1: Create target table
1. Open SQL Developer create EMP_INCR_MKT table in TDBU schema
CREATE TABLE EMP_INCR_MKT
(
EMPNO NUMBER PRIMARY KEY ,
126
ENAME VARCHAR2(30),
SAL NUMBER
)
127
3. Click on ok
Step3: Create a mapping for incremental loading
1. Create a mapping with the name of m_ EMP_INCR_LOADING
2. Drag and drop EMP from RRITEC_SOURCE_MODEL
3. Drag and drop EMP_INCR_MKT from RRITEC_TARGET_MODEL
4. Connect corresponding columns
5. In logical tab Select target table select incremental type as incremental update
128
129
a. Create an audit table (and only generate a warning if the table already exists).
Name the table after the target table; simply add _audit at the end of the table
name.
b. In the audit table, insert three columns, the primary key of the record being
processed by the mapping, a time stamp, and an indicator that will tell us what
operation was done on the record (I= Insert ,U = Update).
5. Click on tasks Click on add name it as Create Audit table select ignore errors
6. Select target technology as oracle provide target command as shown below ok
130
7. Similarly create one more task to Insert records Click on add name it as Insert into
Audit table select ignore errors
8. Select target technology as oracle provide target command as shown below ok
131
IND_UPDATE
from <%=odiRef.getTable("L","INT_NAME","W")%>
Note: To reduce typing, you can copy the code from a similar step and modify as
needed.
Note: These substitution methods use the following parameters:
GetTable:
getColList:
132
1. Notice the PK parameter. If it is used, only the columns that are part of the
primary key are included.
9. Save it Verify that your new knowledge module IKM Oracle Incremental Update
Audit appears in the Knowledge Modules tree.
10. Select Create Audit Table task and move to on top of commit transactions task
11. Select Insert into Audit Table task and move to on top of commit transactions task
133
134
135
2. Save and close the IKM. The execution of these steps can now be set by the end-user.
3.
136
2. Logs based for some technologies, ODI can retrieve changes from the
database logs. (Oracle, AS/400)
3. Timestamp based If the data is time stamped, processes written with ODI can
filter the data comparing the time stamp value with the last load time. This
approach is limited as it cannot process deletes. The data model must have been
designed properly.
4. Sequence number if the records are numbered in sequence, ODI can filter the
data based on the last value loaded. This approach is limited as it cannot
process updates and deletes. The data model must have been designed
properly.
6. CDC in ODI is implemented through a family of KMs: the Journalization KMs
7. These KMs are chosen and set in the model
8. Once the journals are in place, the developer can choose from the interface whether he
will use the full data set or only the changed data
9. Changed Data Capture (CDC), also referred to as Journalizing
Journalizing Components
137
138
consistency of the captured changes. The set of available changes for which
consistency is guaranteed is called the Consistency Window. Changes in this window
should be processed in the correct sequence (ORDER followed by ORDER_LINE) by
designing and sequencing integration interfaces into packages.
Although consistent set journalizing is more powerful, it is also more difficult to set up. It
should be used when referential integrity constraints need to be ensured when capturing
the data changes. For performance reasons, consistent set journalizing is also
recommended when a large number of subscribers are required.
It is not possible to journalize a model (or datastores within a model) using both
consistent set and simple journalizing.
6. For consistent CDC, arrange the datastores in the appropriate order (parent/child
relationship) : in the model definition, select the Journalized tables tab and click the
Reorganize button
7. Add the subscriber (The default subscriber is SUNOPSIS) Right-click on a table and
select Changed Data Capture / Add subscribers
8. Start the journals: Right-click on a table and select Changed Data Capture / Start
Journal
139
4. Click on OK
Step 2: Assigning KM to Model
1. Right click on RRITEC_MODEL_SCOTT click on open select Journal select
Journalizing mode as simple
2. Select KM as JKM oracle Simple
140
2. Make sure Emp table is appearing under journalized tables of the model
141
142
4. By observing this you come to notice below objects are creating as part of CDC
1. One J$<TABLE> created
2. One Subscriber table created SNP_SUBSCRIBERS
3. Two Views created JV$<TABLE>,JV$D<TABLE>
4. One trigger created T$<TABLE>
Step 4: To understand CDC Create target table in TDBU schema
1. Crate table using below syntax
CREATE TABLE CDC_EMP
(
EMPNO NUMBER (10) PRIMARY KEY ,
ENAME VARCHAR2(30),
JOB
VARCHAR2(30),
SAL
NUMBER(10),
Deptno NUMBER(2)
)
2. Import into target model
Step 5: Create a mapping
1. Right click on mapping folder create mapping name it as m_Simple_CDC
2. Drag and drop EMP source table and CDC_EMP target table into work area
3. Connect all corresponding columns
4. in logical tab Select target table CDC_EMP select integration type as incremental
update
143
5. Click on Physical tab select target table select IKM as IKM oracle incremental
update
144
\
3. Make sure proper subscriber name in journalized condition
4. Save run
145
2. Smart export
i. We can click on connect navigator and export required objects by using
simple drag and drop method
ii. We can export in two formats XML and ZIP file
iii. Even dependencies also exported
iv. It is recommended method
146
4. Import:
1. Duplication
i. This mode creates a new object (with a new GUID and internal ID) in the
target Repository, and inserts all the elements of the export file.
ii. Note that this mode is designed to insert only 'new' elements.
2. Synonym
i. Synonym Mode INSERT
1. Tries to insert the same object (with the same GUID) into the
target repository. The original object GUID is preserved.
2. If an object of the same type with the same internal ID already
exists then nothing is inserted.
ii. Synonym Mode UPDATE
1. Tries to modify the same object (with the same GUID) in the
repository.
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
147
2. This import type updates the objects already existing in the target
Repository with the content of the export file.
3. If the object does not exist, the object is not imported.
iii. Synonym Mode INSERT_UPDATE
1. If no ODI object exists in the target Repository with an identical
GUID, this import type will create a new object with the content of
the export file. Already existing objects (with an identical GUID)
will be updated; the new ones, inserted.
2. Existing child objects will be updated, non-existing child objects
will be inserted, and child objects existing in the repository but not
in the export file will be deleted.
3. This import type is not recommended when the export was done
Without the child components. This will delete all sub-components
of the existing object.
4. If export file contains dependencies then this method is
recommended
3. Smart
i. This method is always given first priority
148
149
150
Step5: Creating a testing context and mapping the source and target schemas
151
152
Step 3: Creating user TDBU_PROD and load tables into TDBU _PROD schema
4. Open SQL PLUS Type / as sysdba press enter
5. Create a user by executing below commands
a. Create user TDBU_ PROD identified by RRitec123;
b. Grant DBA to TDBU_ PROD;
RR ITEC #209,Nilagiri Block,Adithya Enclave,Ameerpet @8801408841,8790998182
Confidential
153
Step5: Creating a Production context and mapping the source and target schemas
154
32. Agents
33. CKM
34. Target Load Plan
155