Sie sind auf Seite 1von 62

ODI11g: Creating and Connecting to ODI Master and Work Repositories

Note: Instructions and any text that you need to modify are enclosed in <>.

Purpose
This tutorial walks you through the steps that are needed to create and connect to the ODI Master Repository and the
ODI Work Repository.

Time to Complete
Approximately 20 minutes

Overview
The first steps to setting up Oracle Data Integrator are to create the Master repository, connect to the Master
repository, create the Work repository, and then connect to the Work repository. This OBE provides a step-by-step
walkthrough of the process of creating and connecting to the ODI Master Repository and the ODI Work Repository.
Note: The steps to create and connect to the master and work repositories are also outlined in the ODI 11g
Installation Guide.

Scenario
Linda works as a database administrator for Global Enterprise. In Global Enterprise, Linda is responsible for
performing database management and integration tasks on the various resources within the organization. In
particular, Linda is responsible for data loading, transformation, and validation. To begin working on her projects (such
as exporting a relational table to a flat file), she needs to create the new Master repository and Work repository.

Software and Hardware Requirements


The following is a list of software requirements:

The system should include the following installed products:


o

Oracle Database 11g

Oracle Data Integrator 11gR1


If not done before, start the services and components for Oracle Database 11g

Prerequisites
Before you start the tasks, make sure that your system environment meets the following requirements:

1. Have installed Oracle Database 11g. If not done before, start the services and components for Oracle Database 11g

2. Have installed Oracle Data Integrator 11gR1

Creating and Connecting to ODI Master Repository


1. Start the SQL Developer by selecting Start > Programs > Oracle-OraDb11g_home1 > Application Development >
SQL Developer. When SQL Developer started, close the Logging Page Log tab.

2 . In SQL Developer, create a new connection.

3. Name this new connection: Administrator. Enter SYSTEM for Username. Enter oracle1 for Password. For SID,
enter: ORCL. Clisk Test, and then click Connect. Click + to expand connection Administrator.

4. You have to create the RDBMS schema/user (Oracle 11g) for the Master repository. The schemas can be created by
executing the following SQL commands:
create user <MY_SCHEMA> identified by <MY_PASS>
default tablespace <MY_TBS> temporary tablespace <MY_TEMP>;
grant connect, resource to <MY_SCHEMA>;

Where:
<MY_SCHEMA> corresponds to the name of the schema that you want to create
<MY_PASS> corresponds to the password that you gave
<MY_TBS> corresponds to the Oracle tablespace where the data will be stored
<MY_TEMP> corresponds to the temporary default tablespace
To create the user snpm1 for master repository, enter the following command. Click Execute statement icon .

create user snpm1 identified by oracle1


default tablespace users temporary tablespace temp;

Note: In this command, oracle1 is the value of password to connect to user snpm1.

5. Grant connect privileges to the newly created user by executing the SQL command provided below. Expand Other

Users node to verify that the user snpm1 was successfully created.

grant connect, resource to snpm1;

6. In the next few steps you create the ODI Master repository. Start Oracle Data Integrator: Start > Programs > Oracle
ODI 11g-Home> Oracle Data Integrator > ODI Studio

7. Open the 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.

8 . Open the 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.

9 . 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
Enter the User as snpm1 and the Password as oracle1 . Click the Test Connection button and verify successful
connection. Click OK. Click Next on the Master Repository Creation Wizard screen.

10 . In the Authentication window, enter Supervisor Password as SUNOPSIS. Enter SUNOPSIS again to confirm the
password. Click Next.
Note: User names and passwords are case-sensitive in ODI.

11 . In the Password Storage window, select Internal password Storage, and then click Finish. When Master Repository is
successfully created, you will see the Oracle Data Integrator Information message. Click OK. The ODI Master
repository is now created.

12 . You connect to the ODI Master repository by creating a new ODI Master Login. Open the New Gallery by choosing
File > New. In the New Gallery, in the Categories tree, select ODI. From the Items list select Create a New ODI
Repository login.

13 . Configure Repository Connections with the parameters from the tables provided below. To enter the JDBC URL, click
the button next to JDBC URL field and select jdbc:oracle:thin:@<host>:<port>:<sid> as shown in the screenshot,
then edit the URL. Select Master Repository only button. Click Test button. Verify successful connection and click OK.
Click OK to save the connection.

Oracle Data Integrator Connection


Parameter

Value

Login Name

Master Repository

User

SUPERVISOR

Password

SUNOPSIS

Database Connection (Master Repository)


Parameter

Value

User

snpm1

Password

oracle1

Driver List

Oracle JDBC Driver

Driver Name

oracle.jdbc.OracleDriver

Url

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

Note: Do not copy and paste in the JDBC URL field. This may cause problems with entering a valid URL string.
Instead, open the drop-down menu and select the correct driver from the list. Type the correct URL in the URL field.

14 . Click Connect to Repository. Select the newly created repository connection Master Repository from the drop-down
list. ClickOK. The ODI Topology Manager starts. You are now successfully logged in to the ODI Topology Manager.

Creating and Connecting to ODI Work Repository


1. tIf not opened, open SQL Developer. Create the schema/user snpw1 for Work repository by executing the following
SQL command:

create user snpw1 identified by oracle1


default tablespace users temporary tablespace temp;

Grant connect privileges to the newly created user by executing the SQL command
provided below. Verify that user snpw1 was successfully created.
2.
Note: You may need to select Other users node and click Refresh icon.

grant connect, resource to snpw1;

3. Now that you created the RDBMS schema/user, use ODI Topology Navigator to create the ODI Work repository. In
ODI, click the Topology Navigator tab and then click to the Repositories panel. Right-click the Work Repositories
node and select New Work Repository. The Create Work Repository Wizard opens.

4. In the screen that follows, enter the parameters shown in the following table. Click the Test button. Verify successful
connection and click OK. Click Next.

Parameter

Value

Technology

Oracle

Driver Name

oracle.jdbc.driver.OracleDriver

JDBC Url

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

User

snpw1

Password

oracle1

1 . In the Specify Work Repository properties set the ID to 1. Set the Name to WORKREP1. Enter Password as
SUNOPSIS. For Work Repository Type, leave Development. Click Finish.

1 . In the Create Work Repository Login window, click Yes. Enter the Login name: WORKREP1 as shown on the
screenshot. Click OK. Verify that the newly created Work repository is now in the work repositories tree view.

1 . Now you disconnect from the Master repository and connect to the Work repository. Click ODI menu and select
Disconnect "Master Repository".

1 . Click Connct to Repository. Select WORKREP1 from the LoginName drop-down list. Enter Password: SUNOPSIS.
Click OK. Click the Designer tab. The following ODI Designer screen appears.
You have now successfully created and connected to the ODI Work repository.

Summary
In this tutorial, you have learned how to:

Verify the Prerequisites

Connect to the RDBMS (Oracle 11g )

Create the RDBMS Schema/User (11g) for the Master Repository

Create the ODI Master Repository

Connect to the ODI Master Repository

Create the RDBMS Schema/User (Oracle 11g) for the Work Repository

Create the ODI Work Repository

Connect to the ODI Work Repository

Resources

Oracle Data Intergator 11g Documentation

To learn more about , refer to additional OBEs in the Learning Library.

ODI11g: Creating an ODI Project and Interface: Exporting a Flat File to a


Flat File
Note: Instructions and any text that you need to modify are enclosed in <>.

Purpose
This tutorial walks you through the steps that are needed to create a project and an interface in Oracle Data
Integrator (ODI) to export a flat file to another flat file.

Time to Complete
Approximately 40 minutes

Overview
A common task that is performed using ODI is to export data from a flat file and load this data into another flat file.
This tutorial walks you through the steps that are needed to create a project and an interface that will import a file to a
staging area, perform some minor transformations, and then write the data to a file. You also execute the interface
and verify the execution using ODI Operator.

Scenario
Linda works as a database administrator for Global Enterprise. In Global Enterprise, Linda is responsible for
performing database management and integration tasks on various resources within the organization. In particular,
Linda is responsible for data loading, transformation, and validation. To begin working on her projects, Linda created
the new Master repository and Work repository. Now Linda needs to create a project and an interface to export data
from a flat file, perform transformations, and load this data into another flat file.

Software and Hardware Requirements (Optional)


The following is a list of software requirements:

The system should include the following installed products:

Oracle Database 11g

Oracle Data Integrator 11gR1


If not done before, start the services and components for Oracle Database 11g

Prerequisites
Before you start the tasks, make sure that your system environment meets the following requirements:

1 . Have installed Oracle Database 11g. If not done before, start the services and components for Oracle Database 11g

2 . Have installed Oracle Data Integrator 11gR1

3 . Before attempting this OBE, you should have successfully completed the following OBE: ODI11g: Creating and
Connecting to ODI Master and Work Repositories. To access this OBE, click HERE.

Creating a New Project with Oracle Data Integrator


To create a new project within Oracle Data Integrator, perform the following steps:

1. Start ODI Designer: Start > Programs > Oracle > Oracle Data Integrator > ODI Studio . Select WORKREP1 from
the Login Name drop-down list if not already selected. Enter SUPERVISOR in the User field and SUNOPSIS in the
Password field. Click OK to login.

2.

In the designer tab, click the Projects tab, click New Project icon

, and then click New Project.

3. On the screen that appears, set the Name of the project to ODI_exp_FT_FT in the Name field. The Code field is
filled automatically. Click Save icon
. The newly created ODI_exp_FT_FT project now appears in the Projects
tree view. You have now successfully added a new ODI project.

4 . For this interface, Linda has to import a flat file into the SQL staging area, and then export the file to a different flat
file. The Knowledge Modules (KMs) that are required for this are LKM File to SQL and IKM SQL to File Append.
To import the KMs, click the Project tab in the left panel and expand the Knowledge Modules folder. RightclickLoading (LKM) and select Import Knowledge Modules.

Note: In this example, the generic SQL KMs are used. However, specific KMs for the RDBMS technology can be
used as well.

5 . On the screen that follows,in the File Name, navigate to xml-reference directory as shown in the following
screenshot. Click Open.The files to import should appear in the Import Knowledge Modules window. Press and
hold the CTRL key to select IKM SQL to File Append and LKM File to SQL. Click OK.

6. On Import Report window, click Close. Expand the Loading (LKM) and Integration (IKM) folders, and view each
imported KM in the tree view as shown below.

Creating a New Physical Schema for the Flat File Model


To create a Physical schema for a new flat file model, perform the following steps:
1 . Click Topology tab. In Topology navigator, click the Physical Architecture tab, select Technologies > File. Right-click
FILE_GENERIC, and then select New Physical Schema.

2 . For the Directory (Schema) and Directory (Work Schema) fields, enter the path to the directory, where your input flat
files are located ( C:\Oracle\Middleware\Oracle_ODI1\oracledi\demo\file ). Select Default check box, and then click
Save button. Close editing window for your new physical schema. On the Information window that follows, click OK.
Verify that your new Physical schema was added under the FILE_GENERIC data server in the Technologies tree
view.

3 . .Open Logical Architecture, navigate to Technologies > File, right-click File and select New Logical Schema. Enter the
Logical Schema name: FLAT_FILES_SRC, select the your nely created physical schema in Global context as shown
below. Click Save and close the editing windows.

Creating a New ODI Model for the Flat File Source


To create a new model for the flat file target datastore, perform the following steps: .

1. Click the Models tab in the left panel of ODI Designer. Click the Insert Model Folder icon, and then select New
Model Folder. On the screen that appears, set the Name to Files. Click Save icon.

2. Right-click the Files model folder and select New Model. On the screen that appears, enter the values provided in
the following table. Select Reverse Engineer tab.
Parameter

Value

Name

Flat_File_1

Technology

File

Logical Schema

FILE_DEMO_SRC

3. On the screen that appears, verify settings and click Save icon to save your model . very that your newly created
model appeared in the tree view under Files node.

Creating a New ODI Source Datastore for use with ODI Interface
To create a new ODI source datastore, perform the following steps:

1. Expand the Flat Files folder, right-click the newly created Flat_File_1 model, and then select New Datastore. On the
screen that appears, set Name to SRC_SALES_PERSON. Click the button
Select the SRC_SALES_PERSON.txt file and click Open.

next to the Resource Namefield.

Note: In this OBE, you use the sample files that are delivered with the ODI installation.

2. Click the Files tab. Set the File Format to Fixed, and then click the Columns tab.

3 . On the Columns tab, click the Reverse Engineer button. The following screen appears. Click Yes.. The Column
Setup Wizard appears.

4 . Point the cursor, and then click the ruler at the beginning of each column as shown below. The wizard marks each
column.

5 . After the columns are marked, click each column data and set the Name and Datatype for each column. For the
names and data types of each column, refer to the following table. Click OK when you have finished.
Column

Name

Data Type

C1

SALES_PERSON_ID

numeric

C2

FIRST_NAME

string

C3

LAST_NAME

string

C4

DATE_HIRED

string

6 . The columns should now look as follows. Click OK to save the model.
Expand Files >Flat_ File1 >SRC_SALES_PERSON (SRC_SALES_PERSON.txt) > Columns to view your source
model. Verify that the columns were successfully created as shown in the screenshot.

Note: If the columns have not been created, edit the newly created datastore: right-click
theSRC_SALES_PERSON datastore, select Edit, and repeat steps 3, 4, 5, and 6.

7 . In the Flat_File_1 model, right-click SRC_SALES_PERSON datastore, and then select View Data option. Close all
tabs.

Creating a New ODI Target Datastore for use with ODI Interface
To create a new ODI target datastore, perform the following steps:
In this OBE, you use the sample files that are delivered with the ODI installation. Browse to
1. theODI_HOME\demo\file directory (C:\Oracle\Middleware\Oracle_ODI1\oracledi\demo\file). Make a copy of
theSRC_SALES_PERSON.txt file and name the copy TRG_SALES_PERSON.txt as shown in the example in the
following screenshots.

2. In ODI Designer, right-click the newly created source datastore SRC_SALES_PERSON and select Duplicate. On
the screen that follows, click Yes. The new Copy of SRC_SALES_PERSON.txt appears in the tree view.

3 . Right-click the newly created duplicate Copy of SRC_SALES_PERSON.txt and select Edit. On the screen that
appears, set the Name to TRG_SALES_PERSON. Click the button

next to the Resource Name field.

Note: The Files tab and Columns tab do not need to be changed because they are duplicated from the source file

4 . Select the TRG_SALES_PERSON.txt file and click Open. Click Save icon. The datastores for the source and target
files have now been successfully created in the same model and can be used in an ODI interface. Close editing
tabs.

Creating a New ODI Interface for Flat File to Flat File Transformations
To create a new interface, perform the following steps:

1. In ODI Designer, click the Projects tab. Expand your project ODI_exp_FT_FT, and then expand First Folder. Rightclick Interfaces and select Insert Interface.

2. On the screen that follows, enter the interface name as INT_exp_FT_FT. Select In-Memory Engine:
SUNOPSIS_MEMORY_ENGINE from drop-down list. Click the Mapping tab. If the Help screen appears, click OK.

Note: For this OBE, we will use the Sunopsis Memory Engine as our staging area because we want to perform some
transformations on the imported data.

3 . Click the Models tab to drag the source and target to Designer. Expand Files > Flat_File_1 and drag
theSRC_SALES_PERSON datastore from the Files folder into the Sources container. Drag
theTRG_SALES_PERSON.txt datastore from Files into the Target Datastore container. When Designer asks "Do
you want to perform an Automatic Mapping?" click Yes. The Diagram tab should look as follows. Click
the Flow tab.
Note: For the purposes of this tutorial, default mappings are used, although a number transformation can be
performed in the mapping. The mapping should be performed in the staging area.

4 . Click the SS_0 (1 - FILE_GENERIC) source datastore. This makes the properties for the source appear below. In
the LKM Selector section, select LKM File to SQL from the LKM drop-down list if not already selected.

5 . Click Target (FILE_GENERIC). This makes the properties for the target appear below. For IKM, select IKM SQL to
File Append from the IKM drop-down list if not already selected. Set the IKM
options TRUNCATE to True andGENERATE_HEADER to False as shown below. Click Save icon to save your
interface .

6.

To test your interface, click Execute icon


the screen that follows, click OK.

. The following screen appears. Retain the defaults and click OK. On

7 . To verify that your interface was executed successfully, you need to open ODI Operator. Click the ODI Operator tab.
In ODI Operator, click Hierarchial Sessions. Expand Date > Today > INT_exp_FF_FF > Steps > INT_exp_FF_FF,
and view the execution results for each step. Double-click any step and click the Description and Execution tabs to
see the execution results. Double-click step 6. View the number of rows that are inserted into the target flat file.
Click OK. Close the tabs.

Summary
In this tutorial, you have learned how to:

Verify the Prerequisites

Create a New Project with Oracle Data Integrator

Create a New ODI Model for the Flat File Source

Create a New ODI Source Datastore for Use with ODI Interface

Create a New ODI Target Datastore for Use with ODI Interface

Create a New Interface with Oracle Data Integrator for a flat file to a flat file data transformation

Resources

Oracle Data Intergator 11g Documentation

To learn more about , refer to additional OBEs in the Learning Library.

ODI11g: Creating an ODI Project and Interface: Exporting a Flat File to a


RDBMS Table
Purpose
This tutorial walks you through the steps that are needed to create a project and an interface in Oracle Data
Integrator (ODI) to export a flat file to another flat file.

Time to Complete
Approximately 40 minutes

Overview
A common task that is performed using ODI is to export data from a flat file and load this data into RDBMS table. This
tutorial walks you through the steps that are needed to create a project and an interface that will import a file to a
staging area, perform some minor transformations, and then write the data to a table. You also execute the interface
and verify the execution using ODI Operator.

Scenario
Linda works as a database administrator for Global Enterprise. In Global Enterprise, Linda is responsible for
performing database management and integration tasks on various resources within the organization. In particular,
Linda is responsible for data loading, transformation, and validation. To begin working on her projects, Linda created
the new Master repository and Work repository. Now Linda needs to create a project and an interface to export data
from a source flat file, perform transformations, and load this data into RDMBS table.

Software and Hardware Requirements


The following is a list of software requirements:

The system should include the following installed products:


o

Oracle Database 11g

Oracle Data Integrator 11gR1


If not done before, start the services and components for Oracle Database 11g

Prerequisites
Before you start the tasks, make sure that your system environment meets the following requirements:

1 . Have installed Oracle Database 11g. If not done before, start the services and components for Oracle Database 11g

2 . Have installed Oracle Data Integrator 11gR1

3 . Before attempting this OBE, you should have successfully completed the following OBEs:
ODI11g: Creating and Connecting to ODI Master and Work Repositories.
ODI11g: Creating an ODI Project and Interface : Exporting a Flat File to a Flat File
To access these OBEs, click HERE.

Creating a New Project with Oracle Data Integrator


To create a new project within Oracle Data Integrator, perform the following steps:

1. Start ODI Designer: Start > Programs > Oracle > Oracle Data Integrator > ODI Studio . Select WORKREP1 from
the Login Name drop-down list if not already selected. Enter SUPERVISOR in the User field and SUNOPSIS in the
Password field. Click OK to login.

2. In the designer tab, click the Projects tab, click New Project icon

, and then click New Project.

3. On the screen that appears, set the Name of the project to ODIexp_FT_RT in the Name field. The Code field is filled
automatically. Click Save icon
. The newly created ODIexp_FT_RT project now appears in the Projects tree

view. You have now successfully added a new ODI project.

4 . You export a flat file directly to a relational table target. The knowledge modules required for this are LKM File to
SQL and IKM SQL Incremental Update. To import the KMs, expand the Project tab in the left panel, right-click the
Knowledge Modules folder and select Import Knowledge Modules.

Note: In this example, the generic SQL KMs are used. However, specific KMs for the RDBMS technology can be
used as well.

5 . On the screen that follows,in the File Name, navigate to xml-reference directory as shown in the following
screenshot. Click Open.The files to import should appear in the Import Knowledge Modules window. Press and
hold the CTRL key to select IKM SQL to Incremental Update and LKM File to SQL. Click OK.

6. On Import Report window, click Close. Expand the Loading (LKM) and Integration (IKM) folders, and view each
imported KM in the tree view as shown below.

Creating RDBMS Schema for ODI Target Datastore


You need to create a schema to host the ODI RDBMS target datastore.
Note: You created schemas for the flat file source model in the OBE: "Creating an ODI Project and Interface:
Exporting a Flat File to a Flat File".
Note: If you completed the OBE " Creating an ODI Project and Interface: Exporting an RDBMS Table to a Flat File"
earlier, you should already have ODI_STAGE schema created. In this case, you can skip Step1 and Step 2.
To create a new RDBMS schema for the ODI datastore, perform the following steps:
Start SQL Developer. You will create the new schema/user by executing the following SQL commands:
1.

create user ODI_STAGE identified by ODI_STAGE


default tablespace users temporary tablespace temp;

grant connect, resource, create trigger, create view to ODI_STAGE;

2. In SQL Developer create new connection called ODI_STAGE. Enter User name as ODI_STAGE with password
ODI_STAGE. For SID enter ORCL. Click Test to verify connection, and then click Connect.

3 . Create your target table by executing the SQL commands provided below. Expand connection ODI_STAGE > Tables
> TRG_SALES_PERSON and verify that the table is created successfully.
Note: You may find these commands in the text file frovided with this OBE. To access this file, click HERE.

CREATE table "TRG_SALES_PERSON"(

"SALES_PERSON_ID" NUMBER(8,0) NOT NULL,


"FIRST_NAME" VARCHAR2(80),
"LAST_NAME" VARCHAR2(80),
"DATE_HIRED" VARCHAR2(80),
"DATE_UPDATED" DATE NOT NULL,
constraint "TRG_SALES_PERSON_PK" primary key("SALES_PERSON_ID")
)

Creating a New ODI Target Dataserver and the Physical Schema


Note: Skip this section, if you completed the OBE " Creating an ODI Project and Interface: Exporting RDBMS Table
to a Flat File" earlier.
After you created the new database target datastore, you need to create a new ODI target data server and the
Physical schema. To create the ODI target data server and physical schema, perform the following steps:

1. In ODI, Open ODI Topology Navigator and then select the Physical Architecture tab. Expand Technologies, right-click
Oracle and select New Data Server.

2. In the Data Server: New window, enter the values provided in the table below. Click the JDBC tab.

Parameter

Value

Name

ODI_STAGE

Instance/dblink (Data Server)

ORCL

User

ODI_STAGE

Password

ODI_STAGE

3 . Click

for JDBC Driver. Select Oracle JDBC Driver. Click OK. Click

for JDBC Url, select

jdbc:oracle:thin:@<host>:<port>:<sid>, and then click OK. Edit the Url to read:


jdbc:oracle:thin:@localhost:1521:ORCL for Oracle Database.
Note: Do not copy and paste in the JDBC Url field. This may cause problems with entering a valid URL string.

4 . Click Test Connection. In the window that opens, click Yes to save your data. In the Information window, click OK.
Click Test to verify successful connection. Click OK.

5 . Click Expand Oracle technology node, right-click ODI_STAGE dataserver, and then select New Physical Schema.

6 . In Schema (Schema) and Schema (Work Schema) field enter your ODI_STAGE schema. Click Save button. Close
ODI_STAGE.ODI_STAGE physical schema window. In the Information window, click OK.

7 . Open Logical Architecture tab, expand Technologies > Oracle. Right-click Oracle technology and then select New
Logical Schema.

1 . Name logical schema ODI_STAGE. In the Global context, connect this logical schema to ODI_STAGE physical
schema as shown below. Click Save button and then close the tabs.

Creating a New ODI Target Model

Create a new ODI target model that will be used within your ODI Interface. To create a new ODI target model,
perform the following steps:

1 . Open ODI Designer. Click Models tab and select New Model. On the screen that appears, enter the values provided
in the following table. Click the Reverse Engineer tab.

Parameter

Value

Name

Oracle_RDBMS1

Technology

Oracle

Logical Schema

ODI_STAGE

2 . On the Reverse Engineer tab, set the Context to Global . Click Save button and then close Oracle_RDBMS1 tab.

3 . In the Models tab, right-click the Oracle_RDBMS1 model. Select Reverse Engineer. To verify that the
TRG_SALES_PERSON datastore is successfully reversed expand the model as shown below.

Creating a New ODI Interface to Perform Flat File to RDBMS Table Transformation
To create a new ODI Interface to perform flat file to RDBMS table transformation, pefrom the following steps:

1 . In ODI Designer, click the Projects tab. Expand your project Export-FF-RT, and then expand First Folder. Right-click
Interfaces and select New Interface. In Optimization Context field, select Development.

2 . On the screen that follows, enter the interface name as INT-EXP-FF-RT . If selected, deselect the Staging Area
Different From Target check box. Click the Mapping tab.

3 . Click the Models tab to drag the source and target to the diagram. Drag the SRC_SALES_PERSON.txt datastore
from the Flat_File1 model into the Sources container. Drag the TRG_SALES_PERSON datastore from the
Oracle_RDBMS1 model into the Target Datastore container. When Designer asks Do you want to perform an
Automatic Mapping? click Yes.

4 . Set the value for the DATE_UPDATED column in Target Datastore to System date. In Target Datastore, select
DATE_UPDATED. In the Implementation tab, enter SYSDATE. Select Staging Area in the Execute on section. Make
sure that Active Mapping checkbox is selected.

5 . Select the FIRST NAME column in Target Datastore and edit the mapping to read: ltrim(SRC.FIRST_NAME) . This
function removes left spaces in the FIRST_NAME column. In the Execute on section, select Staging Area. Click OK.
Repeat this step for columns LAST NAME and DATE HIRED. Refer to the mapping implementation provided in the
table below:

Column

Mapping implementation

FIRST NAME

Ltrim(SRC.FIRST_NAME)

LAST NAME

Ltrim(SRC.LAST_NAME)

DATE HIRED

Ltrim(SRC.DATE_HIRED)

6 . Click the Flow tab. Click the SrcSet_0 (FILE GENERIC) datastore . The properties for the source appear below. For
LKM, select LKM File to SQL from the LKM drop-down list if not selected. Now you need to ensure that the temporary
objects created during transformation are deleted. Set the LKM option DELETE_TEMPORARY_OBJECTS to
<Default>: true as shown below.

7 . Click the Target datastore. Select IKM SQL Incremental Update. Set the IKM option Flow_Control to False. Set the
IKM option DELETE_ALL to True. Click Save
.

8 . To test your interface, click Execute button

. The following screen appears. Retain the defaults and click OK.

On the next screen, click OK.

9 . Open ODIOperator and verify that your interface was executed successfully. In Operator, click Session List tab, select
All Executions, and the then click refresh button
. View execution results for interface INT-EXP-FF-RT.

10 . Double-click Step 12 and click the Execution tab. View the number of rows inserted into the target table (16).

11 . Open the Interface tab. Select Mapping tab, right-click Target Datastore - TRG_SALES_PERSON, and then select
Data.. View Data inserted in the target table. Cloae Data Editor. Close tabs.

Summary

In this tutorial, you have learned how to:

Verify the Prerequisites

Create a New Project with Oracle Data Integrator

Create a New ODI Model for the Flat File Source

Create a New ODI Source Datastore for Use with ODI Interface

Create a New ODI Model for the RDBMS Target

Create a New ODI Target Datastore for Use with ODI Interface

Create a New Interface with Oracle Data Integrator for a flat file to RDBMS table data transformations

Resources

Oracle Data Intergator 11g Documentation

To learn more about , refer to additional OBEs in the Learning Library.

Das könnte Ihnen auch gefallen