Professional Documents
Culture Documents
Activity Guide
D78191GC10
Edition 1.0
February 2013
D80590
This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their
respective owners.
Author
Viktor Tchemodanov
Technical Contributors and Reviewers
Denis Gray, Alex Kotopoulis, Julien Testut, Christophe Dupupet, Rebecca Sly, Gerry Jurrens,
Sophia Chen, Vishal Parashar, Richard Green
This book was published using:
Oracle Tutor
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Disclaimer
Oracle Data Integrator 11g: Advanced Integration and Development Table of Contents
iii
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Table of Contents
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 1
Chapter 1 - Page 1
Practices Overview
In this practice, you will explore the technical environment for your practices and start the ODI
studio.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you examine the technical setup for these practices, start up, and connect to the
ODI Studio.
Assumptions
None
Tasks
1.
View the major software components installed in your system. These components are
shown in the picture. Your environment has the following major components:
Oracle Database 11gR1 (11.1.0.7.0)
Oracle Data Integrator 11gR1 (11.1.1.6)
Oracle WebLogic Server (10.3.6)
Oracle SOA Suite (11.1.1.6)
Oracle Internet Directory (11.1.1.6.0)
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
b.
SQL Developer: Starts SQL Developer, which provides access to the objects in Oracle
Database 11gR1 with GUI
c.
JDeveloper: Starts JDeveloper, which simplifies working with projects and deploying
to the application server (WebLogic)
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
Start Oracle Data Integrator and log in to ODI Studio. Start your demo source environment.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Step
Screen/Page Description
Choices or Values
a.
MS Windows
b.
c.
d.
4.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
a.
Chapter 1 - Page 6
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Chapter 1 - Page 7
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Chapter 1 - Page 8
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Chapter 1 - Page 9
Chapter 1 - Page 10
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 2
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In Practice 2-1, you duplicate an existing knowledge module and modify the duplicate
knowledge module to enhance it with substitution methods.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In some cases, you may need to create a new knowledge module (KM) to use with an
integration interface. That would provide additional functionality of your interface.
In this practice, you duplicate an existing KM, IKM SQL Incremental Update, naming the new
KM as IKM Oracle UI-Audit. You add two commands, Create Audit Table and Insert Audit
Records, to the KM by using substitution methods. To test your newly created KM, you
duplicate an existing interface, naming the new interface as INT-INT-SALES_PERSON-AUDIT.
You change the new interfaces IKM selection to use the new KM you just created in the
previous practice, IKM Oracle UI-Audit. You execute the INT-SALES_PERSON-AUDIT interface
and examine the audit table created by your KM.
You also make additional enhancements of the KM created in the previous practice. You create
an option for your new KM to enable an end user to choose when to generate audits. You link
this option to the steps in the KM, and test your modified interface.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Execute the resetRepo.bat command. Press Enter when prompted. Verify that this
command is executed successfully as shown in the following screenshot.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Create the new KM with new functionality to create an audit table and insert audit records.
a. If not started, start Oracle Data Integrator: Start > Programs > Oracle > Oracle Data
Integrator > ODI Studio. If not connected, connect to the DEV_ODI_REPO Work
Repository (username: SUPERVISOR; password: SUNOPSIS). Click the Designer tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
Open ODI Designer and click the Projects tab. Select Projects > Export Files >
Knowledge Modules > Integration (IKM). Right-click IKM SQL Incremental Update
and select Duplicate Selection. In the window that follows, click Yes.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Double-click Copy of IKM SQL Incremental Update to edit it. Rename this KM IKM
SQL Incremental Update Audit Options. Click the Details tab.
c.
On the Details screen, review the commands in the current KM. Select Insert new
icon to add the new command.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Name this command Create Audit Table. Select the Ignore Errors check box. In
the Command on Target tab, set the Technology to Oracle. Enter the following
command to create the audit table. Verify that the check boxes in the Journalizing
section are not selected. If necessary, deselect them.
Note: This command creates the Audit table with three columns: the primary key
column (SALES_PERSON_ID), AUDIT_DATE, and AUDIT_INDICATOR.
Note: For this command, refer to the C:\Labs\Files\Text\P2-1.txt file.
create table <%=odiRef.getTable("L", "TARG_NAME", "A")%>_H
(
<%=odiRef.getColList("", "[COL_NAME]\t[DEST_CRE_DT]NULL",
",\n\t", "", "PK")%>,
AUDIT_DATE
DATE,
AUDIT_INDICATOR VARCHAR2(1)
)
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Click the Details tab. If necessary, scroll down, and then select the Create Audit
Table command. Click the
icon four times to move the command up and place it
right after the Insert new rows step (150), as shown below. Verify that the Ignore
Errors check box is selected for your new Create Audit Table command.
f.
With the Create Audit Table command still selected, click the Add icon again.
Create the command that inserts audit records in the audit table, as shown below. This
command uses the following substitution methods: odiRef.getTable and
odiRef.getColList. Name this command Insert Audit Records. Select the
Ignore Errors check box. In the Command on Target tab, set the Technology to
Oracle. The command is provided below.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
Click the Details tab. Scroll down and select the Insert Audit Records command.
icon four times to move the command up and place it right after the
Create Audit Table step, as shown in the next screen. Click Save and then close
the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click the
3.
Click the Save button, and close the editor. Verify that your new KM, IKM SQL
Incremental Update Audit Options, appears in the Knowledge Modules tree.
You will create a modified copy of the INT-TRG_SALES_PERSON interface, to execute with
your newly created KM. You will need to duplicate the existing interface, rename it, and
then change the IKM entry to use your new IKM SQL Incremental Update Audit Options.
a. On the Projects tab, expand the project Export Files, expand First Folder > Interfaces,
right-click the INT-TRG_SALES_PERSON interface and select Duplicate Selection.
Click Yes on the Confirmation screen.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
On the Flow tab, click Target (ODI_STAGE) in the diagram to open the Target Area
Property Inspector below the diagram. In the IKM Selector drop box, select IKM SQL
Incremental Update Audit Options.
Note: You may have to make sure that the lower section of the editor is shown before
working with the Target Area Property Inspector pane.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Ensure that in the Options list, FLOW_CONTROL and STATIC_CONTROL options are set
to false, as shown in the screenshot. Click the Save button and then close the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
To execute your new interface, select the interface and click the Execute button
Click OK. Click OK again in the Information window to start the execution.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click the Operator tab to open ODI Operator. Click to open the All Executions node. If
necessary, click the Refresh icon
session steps.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Scroll down and double-click the Create Audit Table step (13). View the content of the
Definition and Code tabs for this step. Close the tab.
Note: You may have warning status for this Session task if the Audit table already
exists in your system. Ignore this warning.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Similarly, view the Insert Audit Records step information. Refer to the following
screens. Click Close.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
On the Desktop, double-click the shortcut to start Oracle SQL Developer. When SQL
developer is started, click to expand the ORCL connection. Connect with the username
System and password oracle1. Expand Other Users > ODI_STAGE > Tables
connection (for the password, enter ODI_STAGE). Select the Tables (Filtered) node
and if necessary, click the Refresh button
TRG_SALES_PERSON_H, click the Data tab, and verify that your Audit table was
created and populated with audit records, as shown next.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Create an option for your newly created KM to enable an end user to choose when to
generate audits.
h. In Designer, click the Projects tab, right-click IKM Oracle UI Audit Options, and
select New Option. Name this option as AUDIT, set Type to Check Box, and Default
Value to true. Click Save and close the AUDIT option tab.
Now, you need to link this option to your steps in the KM. Double-click IKM SQL
Incremental Update Audit Options, and click the Details tab. Double-click
your new step, Create Audit Table, to edit it. Scroll to the bottom and click the
Options plus sign [+] to show its contents.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
Deselect the Always Execute check box. Select AUDIT. This will condition the
execution of these steps with the value set by the end user. Click Save. Click the
Details tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
j.
Repeat the previous step for the Insert Audit Records command, as shown in
the following screens. Click Save to save your KM and close the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
k.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
l.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
m. Open ODI Operator, select All Executions, and then click the Refresh button and
view the execution results. Both Create Audit Table and Insert Audit Records steps
should be present.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
n.
In ODI Operator, click the Refresh button and view the execution results. The new KM
steps to create and populate an audit table are not executed.
p.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
o.
Chapter 3
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In Practice 3-1, you create a new knowledge module (KM) that can be used with ODI integration
interfaces for generating thousands of records with random data in any table in the Oracle
Database. In most cases, column names and mapping expressions do not belong to a KM. The
exception would be administrative columns that you add as part of the logic of your KM. For
your KM to be reusable, you need make sure that your code contains no information that
physically relates your code to any particular database table structure.
Your new KM is to generate a large number of records with some random data. To generate
data for each record that would meet particular requirements, you use simple user functions that
have been precreated for this practice.
In addition, you create options for your KM to add some flexibility to your KM. With these
options, you can set the number of records you want to generate. You can also set the option
for creating or truncating a target table.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
The Oracle Database provides an interesting feature that can be used to generate a large
number of records the group by cube method: It returns all the possible permutations for the
selected columns. For example, the following code returns 8 records (2 to the power 3):
select NULL from dual group by cube(1,1,1). How about generating a table with
just 1,000 records? For that, you can use the following code:
select NULL from dual group by cube(1,1,1,1,1,1,1,1,1,1)
where rownum<=1000
This command is hardcoded. Because from one environment to another, the database schema
names will vary, you have three options to create the staging table, from the least portable to
the most portable:
Fully dynamic table name and schema name (usually, dynamic tables are named after
the target table with some extension, for example, _SEED). In this case, the generated
code for the TRG_CUSTOMERS loading table, the SEED table name is
myschema.TRG_CUSTOMER_SEED.
Note: In this practice, you use the second option above for simplicity.
The statement above would help you to generate a table that only has 1,000 records. To create
a table with 1,000,000 records, you need to have a Cartesian product by executing the following
statement:
where S2.SEED_ID<=10
The actual number of records to be created in the table is defined by the option you create for
the KM.
To generate the random data, you create an integration interface that uses simple user
functions in mappings. These user functions have been predefined for the purpose of this
practice.
Note: You develop the KM that works for Oracle Database. Adaptations of the code for other
databases are possible.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Your Tasks
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
In Designer, click the Projects tab, expand Procedures > Knowledge Modules. Rightclick Integration (IKM) and select New Integration (IKM). In the Name field, enter IKM
Oracle Build Sample Data. Click the Details tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Click Add icon to add the first step. Name this step as Drop SEED table. Select the
Ignore Errors check box. In the Command area, enter
drop table <%=odiRef.getObjectName("L", "SEED1", "W")%>
Note: For the commands used in this practice, you can refer to the P3-1.txt file
located in the C:\Labs\Files\Text folder.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Click the Details tab. Click Add icon and then add another command to create the
SEED table:
create table <%=odiRef.getObjectName("L", "SEED1",
"W")%>(SEED_ID NUMERIC)
Name this command: Create SEED table.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
In the next step, you will populate the SEED table with records. Add the following
command:
insert into <%=odiRef.getObjectName("L", "SEED1", "W")%>
select rownum from
(select NULL from dual group by cube(1,1,1,1,1,1,1,1,1,1))
where rownum<=1000
name this command: Populate SEED table.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
To create a target table, you add the following command. Select the Ignore Error check
box. Name this command Create target table.
Note: This command is necessary only when a target table does not exist. Click the
Details tab.
create table <%=snpRef.getTable("L", "TARG_NAME", "A")%>
(
<%=snpRef.getTargetColList("", "[COL_NAME]\t[DEST_CRE_DT] "
+ snpRef.getInfo("DEST_DDL_NULL"), ",\n\t", "")%>
)
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
Add the command to truncate the target table as shown below. Name this command
Truncate target table. Click the Details tab.
truncate table <%=snpRef.getTable("L","TARG_NAME","A")%>
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
Add the command to delete records in the target table. Name this command Delete
Target table. For Log Counter, select Delete. In the Transaction field, select
Transaction1. In the Commit field, select No Commit. Click the Details tab.
delete from <%=snpRef.getTable("L","TARG_NAME","A")%>
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
Add the command to insert new rows in the target table. Set the Log Counter to Insert.
In the Transaction field, select Transaction1. In the Commit field, select No Commit.
Note the odiRef.getOption method. It is used to get the option for setting the
number of thousands of records.
insert into
<%=snpRef.getTable("L","TARG_NAME","A")%>
(
<%=snpRef.getColList("", "[COL_NAME]", ",\n\t", "", "((INS)
and REW)")%>
)
select
<%=snpRef.getColList("", "[EXPRESSION]", ",\n\t", "",
"((INS) and REW)")%>
from
<%=odiRef.getObjectName("L", "SEED1", "W")%> S1,
<%=odiRef.getObjectName("L", "SEED1", "W")%> S2
where S2.SEED_ID<= <%=odiRef.getOption("THOUSANDS_OF_RECORDS")%>
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Add the command to Commit the transaction: /* commit */. Name this step
Commit. In the Transaction field, select Transaction1. In the Commit field, select
Commit. Click the Details tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
j.
Add the final step to Drop the SEED table. Enter the following command:
drop table <%=odiRef.getObjectName("L", "SEED1", "W")%>
Name this step Drop SEED table. Click the Details tab and verify the steps, which are
shown in the following screenshots. Click the Save icon to save the KM and close the
tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
k.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
Similarly, create another option. In the Name field, enter CREATE_TARGET_TABLE. For
the Type field, select Check box. Set the Default value to False. In the Description
field, enter Create Target Table. Save this option and close the tab.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Add the options to your KM steps. Open the IKM Oracle - Build Sample Data KMs for
editing. Click the Details tab. Double-click Create Target table.
e.
Scroll down and select Options. Deselect the Always Execute check box and select the
Create Target Table option. Click the Details tab.
f.
Double-click Truncate Target Table command. In the Options section, deselect Always
Execute and select TRUNCATE. Click the Details tab. Click Save and close the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
You generate data and populate the SALES_SAMPLER datastore located in the
Oracle_RDBMS1 model. The Oracle Database comes with a package called
DBMS_RANDOM. The following functions will be used in this practice:
RandomBool(): Generate a 0 or a 1
RandomDecimal(Min, Max): Generates a random value (with decimals) between the Min
and Max values
(MinDate, MaxDate): Returns a date between MinDate and MaxDate (make sure
MinDate and MaxDate are valid dates for Oracle)
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
To import user functions in your project Procedures, right-click User Function and
select Import. Navigate to C:\Labs\Files\xml_samples\UserFunctions and
click Open. Select RandomBool and click OK. In the Import Report window, click
Close.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
a.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Expand the RandomGenerators node and verify that the RandomBool function is
added to the tree.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
b.
On the Models tab, expand the Oracle_RDBMS1 model, select the SALES_SAMPLER
datastore, and then drag it to the target section of the INT_SALES_SAMPLER interface.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Similarly, implement mapping for each column in the Target datastore. In the Execute
on field, select staging area for each column. Refer to the following table:
Column
Mapping
SAMPLER_ID
SAMPLER_NAME
RandomNumber(1,999)
RandomString('A', 1, 30)
SAMPLER_PROMOTION
SAMPLER_PRICE
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Click the Flow tab. Click the Target datastore. In the Target Properties, view and
accept the default values of the options. Click the Save icon to save the interface.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Click the Operator tab. Expand All executions as shown in the following and verify that
the interface is executed successfully.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
Click the Designer tab. On the Models tab, in the Oracle_RDBMS1 folder, right-click
Sales_Sampler datastore and select View data.
Verify that your target datastore is now populated with randomly generated data.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
Chapter 4
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In Practice 4-1, you perform the steps to build an ODI interface that will load an XML file with a
constraint to the database table. The constraint will only allow data to be loaded where client
age is >= 21. Any rows that do not pass the constraint will be loaded to the error table on the
target database E_CLIENT.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you perform the following steps:
1. Create a new model for the RDBMS table CLIENT. Define the constraint for the table.
2. Import appropriate Load Knowledge Modules (LKM), Integrate Knowledge Modules (IKM),
and Check Knowledge Modules (CKM) into the project.
3. Create an integration interface for transformation from XML to RDBMS model. You enable
the CKM and error recycling.
4. Test your interface and verify data.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Connect to ODI Studio and create a new model for the RDBMS table CLIENT:
Connect to the DEV_ODI_REPO Work Repository (User: SUPERVISOR, Password:
SUNOPSIS). Click the Designer tab.
a.
Open the Designer tab, then open the Models tab. Click New Model Folder and select
New Model. For model name, enter Oracle_TRG. Set Technology to Oracle. Use the
existing logical schema ODI_STAGE. Click the Reverse Engineer tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
For Context, choose Development. Retain the other default settings. Save
model and close the editor.
c.
Create the CLIENT datastore within the Oracle_TRG model by copying from the XML
model. Select and expand the XML_SRC model. Right-click the CLIENT table and
select Duplicate Selection. Click Yes in the Confirmation dialog box.
your
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Drag the new duplicate Copy of CLIENT from the XML_SRC model to the
Oracle_TRG model. Expand the Oracle_TRG model and double-click the Copy of
CLIENT datastore to edit. Change the name to CLIENT. Click Save and close the
editor.
Note: No physical table is created on Oracle_TRG. When the Interface is run, it
creates the CLIENT physical table.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
During the duplication of the CLIENT datastore, the constraint for the XML file was also
copied. This constraint should be deleted. Expand Oracle_TRG > CLIENT >
Constraints. Right-click the CITY_CLIENT CITY constraint and click Delete.
f.
You need to set up a new constraint for the CLIENT table in the RDBMS datastore
CLIENT. To set up the ODI constraint on the CLIENT data store in Oracle_TRG
model, right-click Constraints and select New Condition. Specify the parameters of
the new constraint as shown in the table below. Save this constraint and close the
editor.
Parameter
Value
Name
AgeConstraint
Type
Where
cast(Client.age as numeric)>=21
Message
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
3.
Before the interface is created, the Load Knowledge Modules (LKM), Integrate Knowledge
Modules (IKM), and Check Knowledge Modules (CKM) need to be imported into the project.
To import these KMs, perform the following steps:
a. Open the Projects tab and expand the Knowledge Modules node. Right-click the
Loading (LKM) node and select Import Knowledge Modules. If not open, browse to
the C:\Oracle\Middleware\Oracle_ODI1\oracledi\xml-reference folder.
Select LKM SQL to Oracle. Click OK. Close the Import Report window.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Note: On first execution of the interface, the SQL will not validate until the table is
created.
Similarly, select the Integration (IKM) node and import IKM SQL Control Append
Knowledge module. Select the Integration (IKM) node and import IKM SQL Control
Append. Knowledge module. Expand Check (CKM) node and import CKM Oracle.
Refer to the screenshots below.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Open the Models tab to drag the source and target to the interface. Drag the Client
datastore from XML_SRC model into the Sources container. Drag the Client datastore
from Oracle_TRG into the Target container. When Designer asks Do you want to
perform Automatic Mapping? click Yes.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Select the CLIENT_ID column in Target Datastore. Scroll down the Target Column
Properties section and select the Key box to set the CLIENT_ID column to be the
key. Click the Flow tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Click SRCSet0 (XML_GEO_DIM) and set the LKM option to LKM SQL to Oracle.
g.
Similarly, select Target (ODI_STAGE). Set the IKM for Target to IKM SQL Control
Append. Set Options as provided in the following table. Click the Controls tab.
Option
Value
RECYCLE_ERRORS
true
CREATE_TARG_TABLE
true
DELETE_ALL
true
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
On the Controls tab, leave the default values as shown on the screenshot. Click the
save icon to save your interface.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
Open the Operator tab, expand All Executions, and then expand your session as
shown in the screenshot. Verify that the interface executed successfully:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
View data in the target datastore CLIENT in Oracle_TRG model. There are no records
for customers younger than 21 years old. These records did not pass the constraint.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Right-click the CLIENT datastore in Oracle_TRG model, and select Control > Errors.
View recycled errors in your error table.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 5
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In Practice 5-1, you create a temporary ODI interface for data transformation. You also create
another interface, which uses your newly created temporary interface as a source for
transformation. After that, you modify your interface to enable it to process data from multiple
datasets.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you perform the following steps:
1. Create a temporary interface, INT-TEMP_AGG_ORDERS.
Use datastores SRC_ORDERS and SRC_ORDER_LINES from the HSQL_SRC
model, joined on ORDER_ID.
Use SRC_CUSTOMER as a lookup table.
2.
3.
4.
Aggregate some of its columns by using the MIN, MAX, and AVG functions.
Create the interface INT-TRG_SALES.
Use the temporary interface INT-TEMP_AGG_ORDERS as a source.
Use the datastore TRG_SALES as the target.
Execute INT-TRG_SALES and examine the rows inserted into TRG_SALES.
Create and test the new interface that loads data into the TRG_BULK_SALES table from
multiple datasets using the UNION operator.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
On the Projects tab, expand: Loads > HandsOn. Right-click Interfaces, and then
select New Interface. Name the new interface INT-TEMP_AGG_ORDERS. In the
Optimization Context field, select Development. For Staging Area, select Hypersonic
SQL: HSQL_DEMO_SRC. Click the Mapping tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
Open the Models tab. Expand the HSQL_SRC model, and drag SRC_ORDERS and
SRC_ORDER_LINES datastores from the model to the Source area.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Drag the ORDER_ID column from the SRC_ORDERS datastore to the ORDER_ID
column in the SRC_ORDER_LINES datastore to create a Join. Select the Join icon.
Close the Messages - Log tab and view the Join properties.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Select the CUST_ID column in the Source table and the CUSTID column in the Lookup
table, as shown in the following screen, and then click Join. Click Finish.
g.
Now, you need to create a temporary target datastore. Drag the column CUST_ID from
the SRC_ORDERS table to the Target area. Click <Temporary Target DataStore>. In
the Temporary Target Properties, enter Name: TEMP_AGG_ORDERS, as shown in the
following screenshots:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Drag the column ORDER_ID from SRC_ORDERS to the Target area. Then click this
SRC_ORDERS.ORDER_ID column in the target datastore. Select this column, and in the
Mapping Properties panel at the bottom of the window, edit the Implementation tab to
read: MIN(SRC_ORDERS.ORDER_ID). Scroll down to the Target Column Properties
section and rename this column to FIRST_ORDER_ID. Scroll back up the Property
Inspector, click the ORDER_ID column in Target Datastore and examine your results
thus far.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Again, drag the column Order_ID from SRC_ORDERS to the Target area. In the
Mapping Properties panel at the bottom of the window, edit the Implementation tab to
read: MAX(SRC_ORDERS.ORDER_ID). Scroll down and rename this column
LAST_ORDER_ID.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
Drag the column ORDER_DATE from SRC_ORDERS to the Target area. In the Mapping
Properties panel at the bottom of the window, edit the Implementation tab to read:
MIN(SRC_ORDERS.ORDER_DATE). Scroll down and rename this column
FIRST_ORDER_DATE.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
j.
Similarly, drag the column ORDER_DATE again from SRC_ORDERS to the Target area.
Edit the mapping properties to read MAX(SRC_ORDERS.ORDER_DATE). Scroll down
and rename this column LAST_ORDER_DATE.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
k.
In the Source area, expand the lookup datastore by clicking the plus sign in the upperleft corner of the lookup datastore, and then stretching the datastore longer until you
see all of its columns. Drag the FIRST_NAME column from the lookup table to the
Target area. In the Target area, click the FIRST_NAME column. Start the Expression
editor
, and then drag the LAST_NAME column from the left panel of the Expression
Editor to the expression area.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
l.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Scroll down, and in the Target Column Properties, rename this column CUST_NAME.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
n.
Drag the column QTY from the SRC_ORDER_LINES source datastore to the Target
area. Edit the mapping expression to read SUM(SRC_ORDER_LINES.QTY).
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
o.
Drag the column AMOUNT from the SRC_ORDER_LINES source datastore to the
Target area. Edit the mapping expression to read AVG(SRC_ORDER_LINES.AMOUNT).
In the Target Column Properties, rename this column AVG_AMOUNT.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
p.
Drag the column AMOUNT again from the SRC_ORDER_LINES source datastore to the
Target area. Edit the mapping expression to read SUM(SRC_ORDER_LINES.AMOUNT).
Rename this column SUM_AMOUNT.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
q.
Drag the column PRODUCT_ID from the SRC_ORDER_LINES source datastore to the
Target area.
s.
In the Target datastore, click the SUM_AMOUNT column. In the Execute on section,
select Staging Area. Repeat this step for the six other target columns in which you
defined a function in the mapping expression. Refer to the following table to verify the
execution location. Your Target datastore should now look as shown in the screen.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
r.
Execution Location
SUM_AMOUNT
Staging Area
AVG_AMOUNT
Staging Area
CUST_ID
Source
CUST_NAME
Source
FIRST_ORDER_DATE
Staging Area
FIRST_ORDER_ID
Staging Area
LAST_ORDER_DATE
Staging Area
LAST_ORDER_ID
Staging Area
PRODUCT_ID
Source
QTY
Staging Area
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Column
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click the Flow tab. Verify the flow, and then click the Save button to save your
temporary interface. Verify that your temporary interface appeared in the tree view.
Close your interface tab.
Note the yellow color of your newly created temporary interface in the Designer
Navigators Projects tree view.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
t.
Create a new interface, which uses the newly created temporary interface as a source.
a. In the Loads project, create a new ODI interface, INT-TRG_SALES, as shown next. In
the Optimization Context field, select Development. Open the Mapping tab.
b.
Drag the temporary interface, INT-TEMP_AGG_ORDERS, from the Projects tab to the
Source area.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
On the Models tab, expand Oracle Sales Application model, and drag the datastore
TRG_SALES from the Oracle Sales Application model to the Target Datastore area.
Click Yes to perform automatic mapping. Note that only three of the nine columns were
automatically mapped.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
In the Target Datastore, select the FIRST_ORD_DATE column, and then drag the
FIRST_ORDER_DATE column from the temporary interface in the source area to the
Implementation tab in the Mapping Properties area as shown below.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Repeat the previous two-step process to map the remaining target columns to their
corresponding columns in the temporary interface in the Source area. Use the following
table and results screen as your guide:
First click this column in the Target
Datastore TRG_SALES:
FIRST_ORD_ID
FIRST_ORDER_ID
LAST_ORD_ID
LAST_ORDER_ID
LAST_ORD_DATE
LAST_ORDER_DATE
AMOUNT
SUM_AMOUNT
PROD_AVG_PRICE
AVG_AMOUNT
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
g.
To view data derived from the temporary interface, right-click the temporary interface
and select Data. Close the Data Editor window.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click the Flow tab, click Target Datastore, and verify the flow of your interface. In the
Target Properties, set the DELETE_ALL option to true. Save the interface, and then
close the interface tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
Open ODI Operator Navigator and verify that the interface INT-TRG_SALES executed
successfully. Scroll down and open the task Integration - INT-TRG_SALES - Insert new
rows (step 35). Verify the number of inserts.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
In the Models tab in the Oracle Sales Application model, right-click the TRG_SALES
datastore, and select View Data. View the rows inserted in the target datastore.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Create a new interface that loads data into the TRG_BULK_SALES table from multiple
datasets using UNION operator.
a. In Designer navigator, right-click Interfaces to create a new interface. Name this
interface INT-TRG_BULK_SALES. Open the Mapping tab.
Note: This interface will load TRG_BULK_SALES datastore with data from two
datasets the default dataset from the temporary interface INTTEMP_AGG_ORDERS and another dataset from the TRG_BULK_SALES datastore.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
Drag the temporary interface, INT-TEMP_AGG_ORDERS, from the Projects tab to the
Source area.
c.
From the Models tab, drag the datastore TRG_BULK_SALES from the Oracle Sales
Application model to the Target Datastore area. Click Yes to perform automatic
mapping. Note that only three of the nine columns were automatically mapped. Map
other columns as described in steps 3 d and 3 e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Enter the new dataset name: BULK_SALES. Select Operator: UNION. Close the
Datasets Configuration window.
g.
On the Mapping tab, select the BULK_SALES dataset tab. In the Design navigator
Models tab, drag the SRC_BULK_SALES datastore from the Oracle Sales
Application to the Source area of the interface. Click Yes to perform automatic
mapping.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Open the Flow tab and verify the flow of your interface. Click the target datastore.
Ensure that the FLOW_CONTROL option is set to false and the DELETE_ALL option
is set to true, as shown in the following screenshot.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
Open the Mapping tab again, click the BULK_SALES tab, and then save the interface.
j.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
Execute interface INT-TRG_BULK_SALES (do not select the Simulation check box) and
verify the execution results.
a. Execute the interface.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
6.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 6
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In Practice 6-1, you create an ODI procedure and a package with variables to control execution
of the workflow with integration interfaces. The interfaces have been predefined for the purpose
of this practice.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you create a package for executing the number of interfaces and the procedure
for deleting records from the target tables. You define ODI variables that are used to control the
flow in the package.
You create the procedure PRD_CLEAR_TRG to delete records in the datastores TRG_SALES
and TRG_PRODUCT before running the interfaces INT_TRG_PROD_FAMILY and
INT_TRG_PRODUCT, which load the target tables TRG_PROD_FAMILY and TRG_PRODUCT
located in the Oracle Sales Application model. To organize the appropriate workflow, you create
the package PKG_LOAD_PRODUCT. The procedure PRD_CLEAR_TRG should be executed in the
package before running the interfaces to ensure that referential integrity is not violated.
You create numeric variable FLAG to count the number of records in the TRG_PRODUCT
datastore. Only when the value of this variable is greater than 0, then the procedure
PRD_CLEAR_TRG is executed in the workflow.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Create the PRD_CLEAR_TRG procedure that deletes data in the TRG_SALES and
TRG_PRODUCT tables in the Oracle sales Application model.
a.
If not open, log in to DEV_ODI_REPO and enter SUPERVISOR for the username and
SUNOPSIS for the password.
b.
On the Designer tab, click the Projects tab, and then select the Procedures node from
the Loads > HandsOn folder. Right-click the Procedures node and select the New
Procedure option.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
c.
Enter PRD_CLEAR_TRG in the Name field, and select Oracle as the Target
.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Technology. Click the Details tab, and then click the Add icon
In the Name Field, enter DELETE TRG_SALES. You edit fields in the Command on
Target tab. In the Schema field, select ORACLE_ORCL_LOCAL_SALES. In the
Context field, select Development. In the Command field, enter the following
statement:
DELETE FROM <%=odiRef.getObjectName("L", "TRG_SALES",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>
Note: For this and other commands used in this practice, refer to the file:
C:\Labs\Files\Text\P6-1.txt
You use the substitution method odiRef.getObjectName, which returns the
table name with run-time-dependent information, such as the Oracle schema
name that may vary depending on the context and topology. Select the Ignore
Errors check box. Click the Details tab.
e.
Click the Add icon. In the Name Field, enter DELETE TRG_PRODUCT. In the Schema
field, select ORACLE_ORCL_LOCAL_SALES. In the Context field, select
Development.
In the Command field, enter the following code:
DELETE FROM <%=odiRef.getObjectName("L", "TRG_PRODUCT",
"ORACLE_ORCL_LOCAL_SALES", "", "D") %>
Select the Ignore Errors check box. Click the Details tab, save the procedure and
close the editor.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
Enter PKG_LOAD_PRODUCT in the Name field, and then click the Diagram tab. In the
Designer navigator tree view, expand the Interfaces node and Procedures node. Select
the PRD_CLEAR_TRG procedure from the tree view, and then drag it to the diagram
workbench. The step appears in the package.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
d.
Rename your steps with the names of the tables loaded by the step. In the Diagram
window, click the step for the PRD_CLEAR_TRG procedure. Edit the Step name: CLEAR
TARGET TABLES, as shown in the following screenshot. In the diagram, click the step
again. The step is now renamed CLEAR TARGET TABLES.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Similarly edit the names of the other steps in the diagram, as follows:
Rename INT_TRG_PROD_FAMILY step as LOAD PRODUCT FAMILY and the
INT_TRG_PRODUCT step as LOAD PRODUCT.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
4.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
a.
5.
In the Operator Navigator, click the Refresh icon. In the session list, expand the All
Executions node. The session called PKG_LOAD_PRODUCT should appear as
complete. You can expand the nodes in the session to see the steps and tasks
corresponding to your procedure commands and the interfaces that have been
executed.
Create a numeric variable called FLAG that counts the number of lines in TRG_PRODUCT.
This variable will control the execution of the procedure CLEAR TARGET TABLES. Only
when the table TRG_PRODUCT has some records, the procedure will be executed and
records in the tables TRG_SALES and TRG_PRODUCT will be deleted.
a. In the Designer, open the Projects tab, and select the Variables node in the
HandsOnLoads project. Right-click this node and then select New Variable.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Enter FLAG in the Name field, select Numeric as the Datatype, and enter 0 in the
Default Value field. In the Keep History field, select All Values to enable viewing the
history of all values for this variable.
c.
6.
Modify a package to have the CLEAR TARGET TABLES step running only if FLAG is
greater than 0.
a. Click the Diagram tab. In the project tree, expand the Variables node. Drag the FLAG
variable from the tree view to the diagram. Click the FLAG step in the diagram. In the
Properties > General tab beneath the diagram, rename this step Refresh Customer
Count. Ensure that the Type field is set to the Refresh variable.
Note: You need to click the step in the diagram to view the new step name.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Chapter 6 - Page 14
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Drag the FLAG variable from the tree view to the diagram again. Rename this step Flag
> 0?, change the Type to Evaluate Variable. In the Operator field, select > as the
operator, and enter 0 in the Value field.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
c.
Right-click the Refresh Count product step and select First Step. Click the Next step
on the Package toolbar, and link the step Refresh Customer
Count to the step Flag >0? Using the same tool, link the step Flag > 0? to the step
CLEAR TARGET TABLES. Click the Next step on failure tool
on the Package
toolbar, and link the step Flag > 0? to the LOAD PRODUCT FAMILY step, as shown
below. Click Save to save the package. Close the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
on success tool
Run the new package and check if the Clear Target Tables step was executed.
a. Right-click the package PKG_LOAD_PRODUCT, and then select Execute. Click OK in
the Execution window, and then click OK when the Session started message
appears.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
7.
In the Operator, verify that the latest session called PKG_14-2 appears as complete,
with a Delete Target Tables step executed.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
In the Operator, verify that the latest session called CLEAR TARGET TABLES appears
as complete, with the CLEAR TARGET TABLES step executed.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Now, with records from the target tables having been deleted, execute the entire
package PKG_LOAD_PRODUCT again. Click OK in the Execution window, and then click
OK when the Session started message appears.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Open the Operator and expand the latest session called PKG_LOAD_PRODUCT. Verify
that the Delete Target Tables step is no longer executed. Because the Product table
was emptied by the execution of the CLEAR TARGET TABLES step, the value of
variable FLAG >0? changes when refreshed, to false, and the CLEAR TARGET
TABLES step is no longer executed. Close the PKG_LOAD_PRODUCT tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
Overview
In some integration projects, a flat file needs to be exported into a relational table. In this
practice, you create the global variable FileName. Its value is used as a dynamic name of a flat
file, which is to be exported to a relational database table. To reference the flat file dynamically,
you edit the source datastore to point to the variable rather than having the resource file name
hardcoded. You create an interface to export a flat file to a relational table, and then create a
package with the variable and the interface. From the package, you generate a scenario. The
actual name of the flat file to be loaded into the relational table will be defined as a startup
parameter when your scenario is executed.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Open the file SRC_SALES_PERSON1 with WordPad. Edit the file by deleting the last
record. Save and close the file.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
Default value is recommended for the variable. Its value depends on how the location
of the resource file is defined in the physical schema. Open Topology > Physical
Architecture > Technologies > File > FILE_GENERIC. Double-click the default physical
schema FILE_GENERIC.C:\Labs\Files\Flat_files. Verify that a path to the folder
containing your flat files is defined in the Directory fields as shown below. Because this
path to the folder is specified in the schema, you do not have to include it in the Default
Value field for the variable; you just need to specify the file name. Close the
FILE_GENERIC.C\Labs\Files\Flat_files tab.
c.
Return to the FileName variable tab. In the Default Value field, enter
SRC_SALES_PERSON.txt. Save and close the FileName variable tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Edit the source datastore to point to your variable FileName as a resource name.
a. Open the Models tab. Expand Flat_File_1 model. Double-click
SRC_SALES_PERSON(SRC_SALES_PERSON.txt) datastore to edit it.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
Create an interface to load the flat file into a relational database table.
a. Open the Projects tab. Expand Export Files > First Folder > Interfaces. Right-click
Interfaces and then select New Interface. In the Name field, enter INTTRG_SALES_PERSON_1. Click the Mapping tab.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Select the DATE_UPDATED column in the Target Datastore. In the Implementation tab,
enter SYSDATE. In the Execute On section, select the Staging Area option. Click the
Flow tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
In the Flow tab, select the source datastore SrcSet0(FILE_GENERIC). Verify and
accept the default settings. Click Target (ODI_STAGE). In IKM Selector, select IKM
SQL Incremental Update. In the Options section:
For FLOW_CONTROL select false
For DELETE_ALL select true
Save the INT-TRG_SALES_PERSON_1 interface and close the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
Chapter 6 - Page 32
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Select the global variable FileName and then drag it to the diagram as shown below.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Click the variable step FileName to select it. In the Type field, select Declare Variable.
Save and close the PKG-TRG_SALES_PERSON_1 tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Open the Operator tab and verify that your package executed successfully.
Generate the scenario with the NameFile global variable as a startup parameter.
a. In the Projects tab, right-click the package PKG-TRG_SALES_PERSON_1. Select
Generate Scenario. Click OK. In the Scenario Variables window, accept the default
settings and click OK.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
6.
To execute the scenario, expand Load Plans and Scenarios accordion. Right-click your
scenario and select Execute. Click OK. The Variable values window is displayed with
the default value of your variable.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
In the Variable values window, deselect the Last value check box. In the Value field,
enter the name of the file you edited: SRC_SALES_PERSON1.txt. Click OK. Click OK
again.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Now, you can check the data inserted in the target datastore. Open the Models tab. In
the model Oracle_RDBMS_1, right-click the TRG_SALES_PERSON datastore and
select View Data. View and verify your data.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Chapter 7
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
One of the great features in Oracle Data Integrator 11.1.1.6 is the integration of the scripting
language Groovy within the ODI user interface. In this practice, you explore how to create an
ODI project, topology, model, and an interface with Groovy.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you perform the following steps:
1. Create ODI project with Groovy script.
2. Create a topology and a new model with Groovy script.
3. Create ODI integration interface with Groovy.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Groovy can be executed by executing a script. You can create a new one or open an
existing Groovy script. To create a new Groovy script, select Tools > Groovy > New
Script.
c.
You should see a new Groovy window appear in the IDE. Also, note that the green
Execute button
is enabled on the toolbar.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
Navigate to the following folder: C:\Labs\Files\Text, and open the text file
Create_Project_sample.txt:
import
oracle.odi.core.persistence.transaction.support.DefaultTransactionD
efinition;
import oracle.odi.domain.project.OdiProject;
import oracle.odi.domain.project.OdiFolder;
def createProject(projectName, projectCode, folderName)
{
txnDef = new DefaultTransactionDefinition();
tm = odiInstance.getTransactionManager()
txnStatus = tm.getTransaction(txnDef)
project = new OdiProject(projectName, projectCode)
folder = new OdiFolder(project, folderName)
odiInstance.getTransactionalEntityManager().persist(project)
tm.commit(txnStatus)
}
createProject("<Project Name>", "<Code>", "<Folder Name>")
e.
In the script, enter the values for parameters of Project Name, Project Code ,
and Folder Name parameters, as shown below:
Parameter
Value
Project Name
DATA WAREHOUSING
Code
EDW
Folder Name
INITIALIZATION
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
g.
Open the Designer, and view your newly created Project. Expand
DATAWAREHOUSING > INITIALIZATION nodes and explore other nodes created in
this project tree.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
Click the Save ALL button to save your Groovy script. Navigate to the c:\Labs folder,
and create and open a new folder named Groovy. Name your Groovy script:
Create_Project_Warehousing. Close the Groovy editor.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
Create a new model and topology for using the Groovy script.
a.
Note the following methods and their parameters that you will use to create the model
and the topology:
createLogicalSchema:
contextCode: The ODI code for the context used to map the logical schema to the
physical
technologyCode: The ODI code for the technology
nameForLogicalSchema: The name for the logical schema to create
NameForDataserver: The name for the data server to create
userNameForAuthentication: The username for the connection to the data server
passwordForAuthentication: The password for the connection to the data server
urlForAuthentication: The URL for the connection to the data server
driverForAuthentication: The JDBC driver for the connection to the data server
schemaForAuthentication: The schema to use for the ODI physical schema
createModel:
logicalSchemaObject: The ODI logical schema object (instance of
ODILogicalSchema)
contextCode: The ODI context code for reverse engineering
nameForModel: The name for the model to create
codeForModel: The code for the model to create
Note: With these two methods or variations of them, you can easily construct your topology
objects and models. You will create a new model named ORACLE_WH and all of the
topology objects that will allow going straight to reverse engineering when the script has
been run.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
b.
Navigate to the C:\Labs\Files\Text folder and open the text file Create_ModelTopology_sample.txt. Edit the last two statements of file by inserting the
appropriate parameters. Refer to the table below.
Note: If you do not have enough time, you can also use a preconfigured file
Create_Model-Topology from the same folder: C:\Labs\Files\Text.
Topology
Parameter
Value
Context
GLOBAL
Technology ORACLE
Logical
Schema
Name
ORACLE_EBS
Data
Server
Name
ORACLE_HQ_DEV
Database
User Name
ODI
Database
User
Password
ODI
URL
jdbc:oracle:thin:@localhost:1521:orcl
Driver
oracle.jdbc.OracleDriver
Schema
used for
ODI
Physical
Schema
ODI
Model
Parameter
Value
Context
GLOBAL
Model
Name
ORACLE_WH
Model
Code
ORACLE_WH
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Copy the configured file into the Groovy editor and execute the script. Verify that the
script executed successfully.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Open the model tab and verify that your ORACLE_WH model has been created.
Right-click the ORACLE_WH model and select Reverse Engineer. View the datastore.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
f.
4.
Open the Topology tab. In Physical Architecture, expand Oracle Technology and find
your newly created Data server and Physical Schema.
.
Click the Save button and save your new Groovy script in the C:\Labs\Groovy
folder. Name your Groovy script Create_Model_Topology_Warehousing. Close
your Groovy editor.
Create a new ODI interface using Groovy script. The following Groovy script creates a
simple interface, which performs data transformation from the source datastore to the target
datastore.
Note: You will create this interface with the default knowledge modules and the context
(Global).
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Open the Global Objects tab and expand the Global Knowledge Modules node.
Import the following Knowledge Modules. Refer to the screenshots provided below.
LKM SQL to Oracle
CKM Oracle
IKM Oracle Incremental Update
Note: When the Import Report window is displayed, close it.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
a.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click the Topology tab and select Contexts. Double-click the Global context. Select the
Default check box to make this context default. Save Global and close the editor.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
You create the new interface in the project and use the model and topology you have
created in steps 1 and 2. Open the Groovy editor. Copy the script from the text file and
paste it into the Groovy editor.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Edit the script by entering the following values from the table below:
Variable
Value
project
EDW
folder
INITIALIZATION
File
C:/Labs/Files/Text/Interfaces.txt
Note: If you do not have time, you can use the following preconfigured file:
C:\Labs\Files\Text\Create_Interface.txt
f.
Open the file that contains information about the interface (or interfaces) you are going
to create: C:\Labs\Files\Text\Interfaces. In the file, you should have the
following parameters, separated by comma.
<Interface Name>,<Source Model>,<Source Datastore>,<Target
Model>,<Target Datastore>
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Parameter
Value
Interface
Name
INT_BLK_SALES
Source
Model
ORACLE_WH
Source
Datastore
SRC_BULK_SALES
Target
Model
ORACLE_SALES_APPLICATION
Target
Datastore
TRG_BULK_SALES
Note: You can create multiple interfaces with one Groovy script by entering more lines in
this file.
g. Run Groovy script and verify that your interface INT_BLK_SALES is successfully
created in the project DATA WAREHOUSING.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Open the interface with editor. Click Mapping to view the mapping. Click the Flow tab
to verify the flow.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
Execute the interface INT_BLK_SALES. In the Context field select Global. Open the
Operator tab and verify the execution results as shown below:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
Save your Groovy script in the c:\Labs\Groovy folder. Name this script
Create_Interface. Click Save. Close the Groovy editor.
k.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
j.
Chapter 8
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In this practice, you explore the Complex File technology in ODI. The Complex File adapter
allows ODI to read flat files with various formats like complex Cobol copybooks, multirecord
format files, and so on. Usually, those files often require some preprocessing. This can be
avoided in ODI with this Complex files technology. Complex files are accessed through the
Oracle Data Integrator Driver for Complex File. This JDBC driver is installed with Oracle Data
Integrator and requires no other installed component or configuration.
To enable the Complex files technology, you have to have the following connection information:
The location of the native schema (nXSD) file associated with your native file
The location of the native complex file
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you perform the following steps:
1. View the input complex file and the native schema (nXSD).
2. Define the topology to enable connection to this complex file.
3. Create and reverse-engineer a new model for the complex file.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practice 8-1: Configuring ODI Topology and ODI Model with Complex
Files
View the complex input file and the native schema (nXSD) file, which you will use with
Complex Files technology.
a. If not open, log in to ODI Studio as user SUPERVISOR with password SUNOPSIS.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
b.
Click the JDBC tab. The Complex File technology uses a JDBC driver to read the
original input file as well as the metadata definition of this complex file (generated by
using the Native Format Builder, a SOA component). To select driver, click the
magnifying glass and then select JDBC driver:
oracle.odi.jdbc.driver.file.complex.ComplexFileDriver.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
Here, you can see the path, which is automatically inserted in the JDBC URL.
However, you still need to edit it to point to your input file as well as the path to its
nXSD definition.
Note: Handling Complex File in ODI is similar to using the XML technology.
d.
You input the path for the Purchase_sample.txt file and metadata definition file
Purchase_schema.xsd, which are located in the
C:\Labs\Files\Complex_Files folder. Edit the URL to point to the input file and to
the xsd file as shown below.
Note: Highlighted are the sections, which you enter in the URL. You enter invoice as
the root element of the Purchase_schema.xsd file.
jdbc:snps:complexfile?f=C:\Labs\Files\Complex_Files\Purchase_sam
ple.txt&d=C:\Labs\Files\Complex_Files\Purchase_schema.xsd&re=inv
oice
Note: You can also find this preconfigured URL in the P8-1.txt text file located in
C:\Labs\Files\Text.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Test connection:
f.
Create a new Physical schema for this Dataserver as shown in the following
screenshot. For Schema and Work Schema, you select PURCH. Save the physical
schema. Click OK.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
Open the Logical Architecture tab. Expand Technologies > Complex File and create
new Logic Schema named Purchase_Sample_CPLX_FILE as shown in the following
screenshot. Connect this Logical schema to the Physical schema
PURCHASE_SAMPLE_CPLX_FILE. PURCH in all contexts. Save this logical schema.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
After you have defined the connectivity to your complex file, open the Designer tab and
define the metadata for this file. Open the Models tab and create New Model. Name
this model as Complex Files. Select Complex File technology. In the Logic Schema
field, select the Purchase_Sample_CPLX_File logical schema. Save your model.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
b.
c.
Expand this complex file model and you can see that five datastores have been
created:
INVOICE represents the file itself
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
Expand LINE_ITEM datastore to view the columns. Right-click LINE_ITEM and select
View Data. Close editor windows.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 9
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
In these practices, you configure the ODI Java EE Agent with an existing WLS domain and
monitor your ODI environment using Enterprise Manager 11g, and ODI Console.
You learn how to:
Expose an ODI scenario as a Public web service
Modify and invoke the web service to execute the scenario with Java EE Agent
Integrate ODI within a SOA and invoke the ODI scenario from the BPEL process
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you perform the steps needed to configure the ODI Java EE Agent with an
existing WLS domain and monitor your ODI environment using Enterprise Manager 11g and
ODI Console.
Your Tasks
1.
2.
Create and configure the ODI Java EE Agent to run on the existing WebLogic domain,
SOA_ODI_domain.
Note: This domain was precreated for this practice.
a. In Topology Navigator, open Physical Architecture, and then create a new ODI
Agent. Name this agent OracleDIAgent. Set the port to 8002 and Host to localhost.
Verify that the web application context is set to oraclediagent, as shown in the
following screenshot. Save your new physical agent.
Note: The agent name is case-sensitive. Use the exact name OracleDIAgent, as
shown in the following screenshot. Port 8002 is one that is used with WebLogicmanaged server odi_server1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Open Logical Architecture and create a new logical agent with the same name as your
new physical agent, OracleDIAgent. Link this logical agent to the physical agent
OracleDIAgent in all three contexts, as follows. Click Save to save your agent
definition. Close the logical agent OracleDIAgent editing tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
b.
Verify that SOA_ODI_domain started in RUNNING mode. Minimize (but do not close)
this Admin server command window.
Note: It may take 1 or 2 minutes to start WebLogic Server.
c.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
Return to ODI Topology Navigator in ODI Studio. If necessary, open the Physical
Architecture tab and the OracleDIAgent definition tab. Click Test to test the
connectivity of your configured ODI Java EE Agent. When you see the success
message in the ODI Information dialog box, click OK.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
With Enterprise Manager, you can monitor and manage processes and resources. You
can explore the deployed application by clicking each link. You can see running
processes, workload, log file information, and more. Verify that both managed servers
soa_server1 and odi_server1 are up and running.
c.
Drill down into ODI objects by expanding ODI in the left panel. Expand the ODI node.
Then expand MASTER REPOSITORY. Click Master Repository to view the details on
your agents.
Note: Your information may differ from the information provided on these screens.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Under MASTER REPOSITORY node, click localagent to view the details on your
standalone agent.
e.
Click the OracleDIAgent node in the left panel to see the Java EE Agent information.
f.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
In the left panel, click the Design Time tab. Expand Projects, Models, and Topology
as shown below:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Select the Loads project, and then click the View icon:
d.
Scroll down and click the HandsOn folder link. Click the Interfaces tab. Explore the
interfaces created in your Loads project.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
Similarly, explore models in your Work Repository. To explore the datastores, scroll
down and select the Global submodel name. Scroll down and view the datastores.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
When you have finished exploring, log out of ODI Console and close the browser.
Overview
In this practice, you create a new ODI scenario, modify a web service, and invoke the Web
service to execute the scenario.
1. Create and execute a new scenario, INT_TRG_SALES_PERSON.
2. Create a new package, OdiInvokeWebService.
3. Use the OdiInvokeWebService tool from the toolbox to create the corresponding step in
the package.
4. Define parameters of the web service by using the Advanced dialog box and the SOAP
Editor.
5. Invoke your web service from the SOAP Editor to execute the scenario
INT_TRG_SALES_PERSON.
6. View the response and verify the execution results.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Important Note: Your version of the generated scenario can be different from the one
shown in the screenshot. Memorize your version. It will be used in future steps.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
2.
View the results of the execution in Operator Navigator. Click Refresh. Expand Agent
> OracleDIAgent node. The INT_TRG_SALES_PERSON session should appear as
complete.
.
Create a new package by using the OdiInvokeWebService tool.
a. On the Projects tab, expand the Export Files project > First Folder. Right-click
Packages and select New Package. Enter TRG_SALES_PERSON_PKG in the Name
field, and then click the Diagram tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
In the Toolbox panel, click the Internet tab, scroll down to the OdiInvokeWebService
tool. Click the OdiInvokeWebService tool and then click the empty panel on the right.
An OdiInvokeWebService tool step appears in the package.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Click the Free choice tool on top of the client and then select the step just added
(OdiInvokeWebService 1). View the properties panel at the bottom of the studio client.
If the properties panel does not appear, expand the size of the client window
(downwardly) to reveal it.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
e.
In the Properties panel, retain the default name OdiInvokeWebService 1 for the Step
name field. Scroll down and define parameters in the Properties panel as follows:
Parameter
Value
WSDL URL
- Leave blank -
Port Type
- Leave blank -
Operation
- Leave blank -
XML Request
- Leave blank -
Request File
- Leave blank -
FILE APPEND
ISO8859_1
ISO-8859-1
Response File
C:/TEMP/WebServiceToolStep
SOAP
HTTP User
- Leave blank -
HTTP Password
- Leave blank -
- Leave blank -
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
.
Click the Advanced button. A new window opens. Enter
http://localhost:8002/oraclediagent/OdiInvoke?wsdl in the Web
Service Description File (WSDL) URL field. Click the Connect to WSDL button .
The appropriate port OdiInvokePortType is automatically detected and the available
operations are displayed on the left.
Note: You can find this URL in the following text file: C:\Labs\Files\Text\
P9-1.txt.
Select the invokeStartScen operation from the panel on the left. Click the Editor tab at
the bottom of the middle panel. Widen the middle panel, if necessary, to see the Name
and Value columns. Enter the parameters in the request parameter fields as provided
in the following table. Your SOAP Editor panel should appear as follows
Note: Press Enter each time to confirm your entries.
Parameter
Value
<OdiUser>
SUPERVISOR
<OdiPassword>
SUNOPSIS
<WorkRepository>
WORKREP
<ScenarioName>
INT_TRG_SALES_PERSON
<ScenarioVersion>
<Context>
DEVELOPMENT
<Synchronous>
true
LogLevel
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click the Source tab to view the scenario request. Click the Remove Blank Optional
Elements icon
to remove all blank optional elements from the query. This is
necessary to construct a valid query. The request should be as follows.
Note: You can also select the Clean up before execution check box
. This option
automatically deletes the empty optional elements in the SOAP request.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
b.
Click OK to close the Advanced Editor window. Click the Save button to save your
package and close the tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Overview
This practice teaches you how to integrate ODI with a BPEL process within SOA.
1. Create and test a new scenario to execute a package previously created in Practice 5-1.
2. Configure and deploy the BPEL process to invoke ODI web service, which will execute the
scenario.
3. Execute, test, and monitor execution of the web service and ODI scenario.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Generate a new scenario for the package PKG_LOAD_PRODUCT, which you created in
Practice, 6-1.
a. If necessary connect to your ODI Studio. In Designer, open the Projects tab, expand
the Loads project > HandsOn folder > Packages. Right-click PKG_LOAD_PRODUCT
and select Generate Scenario. Enter name PKG_LOAD_PRODUCT in the Name field,
and then click OK
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
Important Note: You version of the generated scenario can be different from the one
shown in the screenshot. Memorize your version. It will be used in future steps.
In the Scenario Variables window, accept Use Selected and click OK. Open the
Load Plans and Scenarios tab and verify that the scenario was generated.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
View the results of the execution in Operator Navigator. Click Refresh. Expand Agent
> OracleDIAgent node. The session PKG_LOAD_PRODUCT should appear as
complete.
.
3.
Create the BPEL process that will call your ODI scenario.
a. Open JDeveloper by double-clicking the Shortcut to jdeveloper on the desktop.
Ensure that you have only double-clicked once to prevent additional copies from
loading (the interface may take a minute to load).
Note: When you start JDeveloper for the first time, it may take longer to open the GUI.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
You should see the partially preconfigured BPEL process ODIInvokeBPEL.bpel. This
BPEL process is located in the ODI_SOA_HOL application under ODI_Invoke > SOA
node. Note the steps in the BPEL process. The odiinvokebple_client partner link
should be present in your diagram.
Note: If not open, click View > Application Navigator to view Applications, Projects, and
other resources.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
In this step, you will be adding the ODI scenario created in Step 3 to the BPEL
process. In the Partner Links lane, right-click and select Create Partner Link.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
When prompted with the Create Partner Link dialog box, rename Partner Link as
ODIAgentWS and enter the following WSDL URL:
http://localhost:8002/oraclediagent/OdiInvoke?wsdl
Note: You can find this URL in the following text file: C:\Labs\Files\Text\P9-3.txt.
Click the down arrow to Partner Link Type and select Yes to the Partner Link Type
dialog box.
Change the Partner Link Type to requestPortType_PL. Change Partner Link Role to
requestPortType_Role.
The Create Partner Link dialog box should look like this. Click OK.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
From the Component Palette on the right, choose BPEL Constructs > Web Service >
Invoke and drag the construct to the design area after the PrepareODIParam step.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Drag the right arrow of the Invoke step to the ODIAgentWS partner link.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
In the Edit Invoke dialog box, enter a new Name CallInvoke. Select
invokeStartScen as the Operation. Next to the Input variable, click the lookup icon. In
the Variable Chooser dialog box, select CallInvoke_invokeStartScen_InputVariable.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
g.
Next to the Output variable, click the lookup icon. In the Variable Chooser dialog box,
select CallInvoke_invokeStartScen_OutputVariable.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
h.
Click OK.
Copyright 2013, Oracle and/or its affiliates. All rights reserved.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
The Edit Invoke dialog box should look like the following:
The input variable for the CallInvoke step has already been initialized in
PrepareODIParam.
However, you need to edit some of these parameters. Double-click the
PrepareODIParam step to edit it. To edit the values for input parameters, right-click the
parameter and select Edit From expression as shown below.
Important Note: You have to use your version of the generated scenario.
Parameter
Value
<OdiUser>
SUPERVISOR
<OdiPassword>
SUNOPSIS
<WorkRepository>
WORKREP
<ScenarioName>
PKG_LOAD_PRODUCT
<ScenarioVersion>
<Your Scenario
Version>
<Context>
DEVELOPMENT
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
i.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
j.
Click OK.
l.
Drag the right arrow of the Invoke onto the previously defined ODIAgentWS partner
link.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
k.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
n.
The input variable for the CallInvoke step has already been initialized in
thePrepareODIGetStatus step. Double-click this step to review and verify data
entered for the variables. You dont need to edit this step. Click OK.
Note: The session ID in the output of the StartScenario call is used for input here.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
The Edit Invoke dialog box should look like this. Click OK.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
o.
4.
Deploy your BPEL process project to the application server and test your web service.
a. Right-click the ODIInvoke project, and then select Deploy > ODIInvoke. In the Deploy
ODIInvoke dialog box, select Deploy to Application Server. Click Next.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In the Deploy Configuration section, select the Overwrite any existing composites
with the same revision ID check box. Click Next.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
In the Select Server section, select the server SOA, and click Next.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Expand Farm_SOA_ODI_domain > SOA > soa-infra (soa_server1) > default. Click
ODIInvoke [1.0]. Click the Test button as shown below. In the next screen, click Test
Web Service.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
In ODI Studio, open the Operator. Expand Agent > OracleDIAgent node, and then
verify that your ODI scenario was successfully executed by the Java EE Agent:
e.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
6.
d.
To stop WebLogic Server, from the same directory execute the command:
stopWebLogic
For username, enter weblogic. For password, enter welcome1.
Verify that WebLogic Server is stopped.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 10
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices Overview
Oracle Data Integrator can use Oracle Platform Security Services (OPSS), a standards-based
and portable security framework for Java applications, to authenticate its users against an
external Identity Store, which contains enterprise users and passwords. Such an identity store is
used at the enterprise level by all applications, in order to have centralized user and password
definitions and Single Sign-On (SSO). In such a configuration, the ODI master repository only
contains references to these enterprise users. This authentication method is called External
Authentication.
Practice 10-1 provides a step-by-step walkthrough of the process of implementing ODI external
authentication with OID LDAP Server.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you perform the following steps:
1. Use SQL Developer to create an RDBMS (11g) Schema/User for a new ODI Master
Repository.
2. Create a new OID user with Directory Services Manager.
3. Edit the ODI jps-config.xml file to point to your external OID LDAP server.
4. Run the script to set up the credentials for idstore.oid LDAP in the identity store.
4. Create a new ODI master repository referencing a user in the external OID LDAP server.
5. Switch the Master Repository authentication mode between external and internal
authentications.
Your Tasks
1.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
You have to create the RDBMS schema or user (Oracle 11g) for the new Master repository.
The schemas can be created by executing the following SQL commands:
a. If not open, start SQL Developer and connect to the ORCL connection with the
password as oracle1.
b. The schemas can be created by executing the following SQL command:
create user oiduser identified by oiduser
default tablespace users temporary tablespace temp;
Note: In this command, the password to connect to the oiduser user is oiduser.
Note: You can find this and other commands in the P10-1.txt text file located in the
C:\Labs\Files\Text folder.
c.
Verify that the OIDUSER schema is created under the Other Users node.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2.
3.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
a.
To start managed WebLogic server, open the new command window and change to
the same directory:
C:\Oracle\Middleware\user_projects\domains\IDMDomain\bin
Execute the startManagedWeblogic wls_ods1 command.
For User and Password, enter weblogic and welcome1, respectively.
Verify that the managed server is started in the RUNNING mode. Minimize (but do not
close) the command window.
Note: It may take 1 or 2 minutes to start managed WebLogic server.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
b.
Click Connect to Directory and then select the OID-oid1 connection. For password,
enter welcome1. Click Connect.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
4.
Click the Data Browser tab. In the Data Tree, expand Root >
dc=Myrealm>cn=Users. Right-click cn=orcladmin and then select Create Like.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Select the person tab and click Next. In Mandatory Properties, enter the new
administrative username as supervisor1 in first two fields (cn and sn) as shown in
the following screenshot. In the Relative Distinguished Name field, select cn. Click
Next.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
For the Optional Properties, enter the values provided in the following table. Click Next.
Click Finish.
Note: You may need to scroll down to view all properties.
Field:
Value:
givenName
supervisor1
supervisor1@oracle.com
orclActiveStartDate
orclSAMAccountName
supervisor1
uid
supervisor1
userPassword
SUNOPSIS1
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
e.
5.
Verify that the new LDAP user supervisor1 was created and shown in the Data tree:
The configuration to connect to and use the identity store is contained in an OPSS
Configuration file called the jps-config.xml file. This file is already preconfigured to
point to your external OID LDAP Server.
a. Copy the jps-config.xml file from the C:\Labs\Files\LDAP folder and paste it
into the following folder:
C:\Oracle\Middleware\Oracle_ODI1\oracledi\client\odi\bin
b.
In the same folder. Open the jps-config.xml file with WordPad and verify that you
have the following four sections in the file and view their properties. Close the jpsconfig.xml file.
Note: This file is preconfigured for the purpose of this practice. Do not edit this file.
1) <!-- ldap provider -->
2)
3)
4)
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
f.
Property
Value
"subscriber.name"
"dc=myrealm"
"idstore.type"
"OID"
"cleartext.ldap.credentials
"
"cn=orcladmin:welcome1"
"ldap.url"
"ldap://edvmr1p0.us.oracle.com:3060
"
<extendedProperty>
user.search.bases
cn=users,dc=myrealm
</extendedProperty>
group.search.bases
cn=groups,dc=myrealm
</extendedProperty>
"username.attr"
"uid"
</extendedProperty>
"groupname.attr"
"cn"
Note: Your machine name in ldapurl property is edvmr1p0. The port number of your
LDAP server in this configuration is 3060.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
To ensure proper configuration, verify that the parameters in OID LDAP Identity
Store Service Instance section are based on the values provided in the following
table.
Note: You do not need to edit these parameters.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Also, verify that you have the following three sections in your file.
Note: You do not need to edit them.
Create the new ODI master repository referencing a user in the external OID LDAP server.
a. If not started, start ODI Studio, and then open New Gallery by choosing File > New. In
the New Gallery, in the Categories tree, select ODI. Select from the Items list the
Master Repository Creation Wizard. Click OK. The Master Repository Creation Wizard
appears.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
6.
In the Master Repository Creation Wizard, select the browse icon of the JDBC Driver
and then select Oracle JDBC Driver. Click OK. Edit the JDBC URL to read
jdbc:oracle:thin: localhost:1521:orcl.
Note: Do not copy and paste this URLthat may cause some errors!
Enter the User as oiduser and the Password as oiduser. For the DBA user, enter
system, for DBA Password, enter oracle1. Click the Test Connection button and
verify successful connection. Click OK. Click Next on the Master Repository Creation
Wizard screen.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
In the Authentication window, select Use External Authentication. (If you had
selected Use ODI Authentication, you would have been using ODI's internal
authentication.) For Supervisor User, enter supervisor1 and for Supervisor
Password, enter SUNOPSIS1, as they exist in your external datastore. Click Next.
Note: Usernames and passwords are case-sensitive in ODI.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
In the Password Storage window, select Internal Password Storage, and then click
Finish. It takes 2 or 3 minutes to create the Master repository. When the Master
Repository is successfully created, you will see the Oracle Data Integrator Information
message. Click OK. The ODI Master repository is now created.
Note: It may take a few minutes to create ODI Master Repository.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
7.
Configure Repository Connections with the parameters from the following table. In the
Oracle Data Integrator Connection section, enter the User and Password of the
authenticated user in your external store. In this example, you specify SUPERVISOR1
as the User and SUNOPSIS1 as the Password from the OID LDAP Server. In the
Database Connection (Master Repository) section, enter the User and Password of
the schema user you created for the master repository. In this example, you specify
oiduser as the User and oiduser as the Password. To enter the JDBC URL, click
the button next to the JDBC URL field and select
jdbc:oracle:thin:@<host>:<port>:<sid> as shown in the screenshot, and then
edit the URL. Select the Master Repository Only button. Click the Test button. Verify
successful connection and click OK. Click OK to save the connection.
ODI Connection section field
Value
Login Name
LDAP LOGIN
User
supervisor1
Password
SUNOPSIS1
Value
User
oiduser
Password
oiduser
Driver List
Driver Name:
Oracle.jdbc.OracleDriver
Url:
Jdbc:oracle:thin:@localhost:1521:orcl
Note: Do not copy and paste in the JDBC URL field. This may cause problems with
entering a valid URL string. Instead, open the drop-down menu and select the correct URL
from the list. Edit the URL in the URL field.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Click Connect to Repository. Log in to connection LDAP Test Login created above by
using the supervisor1/SUNOPSIS1 credentials.
Note: For the purpose of this practice, you are not connected to your development
work repository used for other exercises.
If not open, open ODI Security Navigator. Expand the Users accordion. Doubleclick User supervisor1 to open it. You can now see that the SUPERVISOR user has
External GUID, which comes from the OID LDAP server. Close the supervisor1 tab.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Switch the Master repository authentication mode between external and internal
authentications.
a. Disconnect Oracle Data Integrator Studio from the repository. From the ODI main
menu, select Switch Authentication Mode.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
8.
Select LDAP LOGIN. Specify the JDBC connectivity details of your Oracle Data
Integrator master repository as defined when you connect to the Master Repository.
For User and Password, enter oiduser and oiduser, respectively.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
9.
In this screen, you are prompted to switch to internal authentication. You must
provide and confirm a password for the new SUPERVISOR user that the wizard will
automatically create in the repository. For Password, enter twice: SUPERVISOR. Click
Finish. The Authentication mode is changed.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Note that in the Security tab, the user supervisor1 is shown as deactivated. Rightclick user supervisor1 to edit it.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
Deselect Expiration Date. Click the Change Password button and enter the new
password for this user: SUNOPSIS1. Click the Save icon.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
Click the Refresh icon. Verify that your user supervisor1 is now shown as active.
Close the supervisor1 tab. Disconnect LDAP LOGIN.
10. Now, you may want to experiment with switching back to external authentication mode.
Remember that ODI users with the same name as users in external LDAP server (for
example, user supervisor1) will be mapped automatically. Users that cannot be mapped
will be inactivated in ODI. In this step, you will switch your actual ODI work repository
environment to external authentication mode.
a. To connect to your practice environment, select the Login Name as DEV_ODI_REPO.
For User, you enter SUPERVISOR and for Password, enter SUNOPSIS.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
Select the Security tab, and then select New User, as shown below.
c.
The new user name should match the user name in LDAP server. You enter
supervisor1. For password, enter supervisor1. Select the Supervisor Access
Privileges check box. Click the Save button.
Note: The password supervisor1 is still the internal user password and it will be
dropped during switch.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
d.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In the Switch Authentication Mode window, select the Login: DEV_ODI_REPO. For
User and Password, enter dev_odi_repo and oracle1, respectively. Click Next and
then click Finish. In the Information window, click OK.
Verify that you have an access to your work environment. In the Security tab, select
Users accordion. Note that user supervisor1 is now active, but user SUPERVISOR
has been deactivated during the switch to the External Authentication mode.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
To verify that you have successfully switched your work repository environment to
External Authentication mode, log in DEV_ODI_REPO with your LDAP user credentials.
For User and Password, enter supervisor1 and SUNOPSIS1, respectively.
b.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
To stop the WebLogic server, from the same directory, execute the stopWebLogic
command.
For User and Password, enter weblogic and welcome1, respectively.
Verify that WebLogic server is stopped.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
c.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.