Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

13

Interface Design:
One-to-one Interfaces

Source, Target, Mappings

Copyright © 2007, Oracle. All rights reserved.


Course Objectives

After completing this


course, you will:
• Have a basic
understanding of
interfaces
• Know how to create a
one-to-one interface
• Be able to implement
business rules as
mappings

13 - 2 Copyright © 2007, Oracle. All rights reserved.


Interfaces: An Overview

Definition and Procedures

13 - 3 Copyright © 2007, Oracle. All rights reserved.


What Is an Interface?

Interface: A Oracle Data Integrator object that loads one


target datastore with data from one or more source
datastores, based on business rules implemented as
mappings.

13 - 4 Copyright © 2007, Oracle. All rights reserved.


Creating a One-to-One Interface

1. Create and name the new


interface.
2. Define the target datastore.
3. Define the source datastore.
4. Define the mappings.
5. Save the interface.

13 - 5 Copyright © 2007, Oracle. All rights reserved.


1. Create and Name the New Interface

13 - 6 Copyright © 2007, Oracle. All rights reserved.


Creating and Naming a New Interface

1. Go to the project and folder where you want to create


your interface.
2. Right-click the Interfaces node.
3. Select Insert Interface.
4. Fill in the Name.
5. (Optional) Fill in the Description.

13 - 7 Copyright © 2007, Oracle. All rights reserved.


Important Note

Make sure that the appropriate Knowledge Modules have


been imported into the project !
(See the Project Manager)

13 - 8 Copyright © 2007, Oracle. All rights reserved.


2. Define the Target Datastore

13 - 9 Copyright © 2007, Oracle. All rights reserved.


Defining the Target Datastore

1. Select the Models view.


2. Expand the model containing the target datastore.
3. Select the interface’s Diagram Tab.
4. Drag and drop the datastore from the Models view to
the Target Datastore area.

13 - 10 Copyright © 2007, Oracle. All rights reserved.


Important Note

• An interface only populates a single target datastore.


• To populate several targets, you need several
interfaces.

13 - 11 Copyright © 2007, Oracle. All rights reserved.


3. Define the Source Datastore

13 - 12 Copyright © 2007, Oracle. All rights reserved.


Defining the Source Datastore

1. Expand the model containing the source datastore.


2. Drag and drop the datastore from the Models view to
the Diagram zone in the interface.
Automatic Mapping creates mappings by matching
column names automatically. You may disable the
information window.

13 - 13 Copyright © 2007, Oracle. All rights reserved.


Important Note

• An interface may have more than one source.


• For this lesson, we will only use one source.

13 - 14 Copyright © 2007, Oracle. All rights reserved.


4. Define the Mappings

13 - 15 Copyright © 2007, Oracle. All rights reserved.


What Is a Mapping?

Mapping: A business rule implemented as a SQL clause. It


is a transformation rule that maps columns in source
datastores onto one of the target datastore columns. It is
executed by a relational database server at run time.

13 - 16 Copyright © 2007, Oracle. All rights reserved.


Defining the Mappings

1. Select the column of the target datastore that you want


to map.
2. Select the Implementation tab in the Mapping pane,
then drag and drop columns from the source table
directly into the mapping area. You may also use the
Expression Editor.
3. If possible, check the code.

13 - 17 Copyright © 2007, Oracle. All rights reserved.


Valid Mapping Types

The following type of clauses may be used in the


mappings:
Value String values should be enclosed in single quotes:
‘SQL', but not for numeric values: 5, 10.3

Source Column Drag and drop the column or use the Expression
Editor. It is prefixed by the datastore’s alias. E.g.:
SRC_SALES.PROD_ID

DBMS Function Use the Expression Editor for the list of supported
functions and operators, or type them directly.

DBMS Aggregate MAX(), MIN(), etc. Oracle Data Integrator


automatically generates the GROUP BY clause.

Combination Any combination of clauses is allowed:


SRC_SALES_PERSON.FIRST_NAME || ' ' ||
UCASE(SRC_SALES_PERSON.LAST_NAME)

13 - 18 Copyright © 2007, Oracle. All rights reserved.


Important Note

• This is just the start of what you can do with mappings.


• The rest is covered in the advanced interface design
lessons.

13 - 19 Copyright © 2007, Oracle. All rights reserved.


5. Save the Interface

13 - 20 Copyright © 2007, Oracle. All rights reserved.


Saving the Interface

• Click the Apply button to save the interface.


• You can press the OK button to save and close the
interface.
• The Cancel button closes the interface without saving
it.
Interfaces are saved in the work repository.

13 - 21 Copyright © 2007, Oracle. All rights reserved.


Important Note

Save your work regularly by clicking the Apply button.

13 - 22 Copyright © 2007, Oracle. All rights reserved.


Summary

• Create an interface
• Define the target datastore
• Define the source datastore
• Define a mapping manually or with the Expression
Editor
• Save the interface

13 - 23 Copyright © 2007, Oracle. All rights reserved.

You might also like