Sei sulla pagina 1di 29

InfoStart 2015

Oracle Data Integrator

INTERFACES
Load TRG_CUSTOMER

Some data we need are located in two flat files

INTERFACES
Load TRG_CUSTOMER. Define the topology

Let's define the topology for the flat


files.
Under the File technology there's
already a data server named
FILE_GENERIC.
Let's create a new physical schema

INTERFACES
Load TRG_CUSTOMER. Define the topology

1 directory path
2 Save

3 Save

INTERFACES
Load TRG_CUSTOMER. Define the topology

Create a new logical schema

INTERFACES
Load TRG_CUSTOMER. Define the topology

Connect logical schema with physical schema, give a name, then save.

INTERFACES
Load TRG_CUSTOMER. Define the topology

Create a new model for the file technology.


Fill all fields under Definition tab.
Save.

INTERFACES
Load TRG_CUSTOMER. Define Models and Datastores

Let's create a datastore for


SRC_SALES_PERSON.txt
The file is fixed format and has no
header.

INTERFACES
Load TRG_CUSTOMER. Define Models and Datastores

Set the fields in the Definition tab as shown

INTERFACES
Load TRG_CUSTOMER. Define Models and Datastores

Set the fields in the Files tab as shown.


Save your work

INTERFACES
Load TRG_CUSTOMER. Define Models and Datastores

By clicking the Reverse Engineer button now, we get a popup window


showing the file content.

INTERFACES
Load TRG_CUSTOMER. Define Models and Datastores

Click at the end of


each field on the
ruler to delimit the
bounds.

INTERFACES
Load TRG_CUSTOMER. Define Models and Datastores

Click on each column then set its name and datatype.


ATTENTION: Click on the field name, not on the ruler.
Give to all fields the String datatype, for simplicity.
Click OK then Save your work.

INTERFACES
Load TRG_CUSTOMER

We're ready to design our interface now

INTERFACES
Load TRG_CUSTOMER

Drag all needed datastores in the interface editor, click Yes to perform the
automatic mapping on the columns having the same name.

INTERFACES
Load TRG_CUSTOMER

To perform the join between


SRC_CUSTOMER.SALES_PERS_ID and
SRC_SALES_PERSON.SALES_PERS_ID
simply drag one columnover the other one.

INTERFACES
Load TRG_CUSTOMER

Click on each target field and set the mapping as shown.


To set a source column as mapping in the target, simply drag
the source column into the target mapping

INTERFACES
Load TRG_CUSTOMER

Click on Flow tab.


Click here.
As we can see, a Loading
phase is required to
store the file in a
temporary table.
To perform a Loading
phase, ODI needs a
Loading Knowledge
Module (LKM).
Of course it must be
imported into the project.

INTERFACES
Load TRG_CUSTOMER

We use this LKM

INTERFACES
Load TRG_CUSTOMER

1 Click
here

INTERFACES
Load TRG_CUSTOMER

- Click here
- Set the IKM
- Save your work

INTERFACES
Update Dear in TRG_CUSTOMER

Create a new interface.


Use TRG_CUSTOMER as source and as
target datastore
Don't perform any automatic mapping

Drag CUST_ID into the target. Notice that


it will be the update key (WHERE condition
in update statement), since it's already a
primary key

INTERFACES
Update Dear in TRG_CUSTOMER

Click on DEAR column then use the editor to build the business rule

INTERFACES
Update Dear in TRG_CUSTOMER

To get the
column name in
the editor,
double click
here or drag the
column into the
right pane.
Click OK

INTERFACES
Update Dear in TRG_CUSTOMER

You can check the sintactic correctness of the statement by clicking here

INTERFACES
Update Dear in TRG_CUSTOMER

Flag only the Update


check box for the column
DEAR and UPD_DATE.

INTERFACES
Update Dear in TRG_CUSTOMER

Select the KM
IKM Oracle Incleental Update we
imported before and set the Flow
Control to False.
Save your work.

INTERFACES
Load TRG_SALES

Finally we load the fact table

INTERFACES
Load TRG_SALES

Here's the interface.


Notice that ODI automatically detects the
GROUP BY clause, there's no need to
specify it.

Potrebbero piacerti anche