Skip Headers
Oracle® Fusion Middleware Connectivity and Knowledge Modules Guide for Oracle Data Integrator
11g Release 1 (11.1.1)

Part Number E12644-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

27 Oracle Enterprise Service Bus

This chapter describes how to work with Oracle Enterprise Service Bus in Oracle Data Integrator.

This chapter includes the following sections:

27.1 Introduction

Oracle Data Integrator features are designed to work best with Enterprise Service Bus (ESB), including integration interfaces that load a target table from several source tables and handle cross-references.

27.1.1 Concepts

Cross-referencing is the Oracle Fusion Middleware Function, available through its Enterprise Service Bus (ESB) component, and leveraged typically by any loosely coupled integration, which is truly built on the Service Oriented Architecture. It is used to manage the runtime correlation between the various participating applications of the integration.

The cross-referencing feature of Oracle SOA Suite enables you to associate identifiers for equivalent entities created in different applications. For example, you can use cross-references to associate a customer entity created in one application (with native id Cust_100) with an entity for the same customer in another application (with native id CT_001).

Cross-reference (XRef) facilitates mapping of native keys for entities across applications. For example, correlate the same order across different ERP systems.

The implementation of cross-referencing uses an Oracle database schema to store a cross-reference table (called XREF_DATA) that stores information to reference records across systems and data stores.

The optional ability to update or delete source table data after the data is loaded into the target table is also a need in integration. This requires that the bulk integration provides support for either updating some attributes like a status field or purging the source records once they have been successfully processed to the target system.

27.1.2 Knowledge Modules

Oracle Data Integrator provides the Knowledge Modules (KM) listed in Table 27-1 for handling ESB cross-references. The KMs use ESB specific features.

Table 27-1 ESB Knowledge Modules

Knowledge Module Description

LKM SQL to SQL (ESB XREF)

This KM supports cross-references while loading data from a standard ISO source. It supports both Oracle and DB2. The LKM SQL to SQL (ESB XREF) has to be used in conjunction with the IKM SQL Control Append (ESB XREF) in the same interface.

LKM MSSQL to SQL (ESB XREF)

This KM is a version of the LKM SQL to SQL (ESB XREF) optimized for Microsoft SQL Server.

IKM SQL Control Append (ESB XREF)

This KM provides support for cross-references while integrating data to an Oracle, DB2 or Microsoft SQL Server target. It integrates data to the target table in truncate/insert (append) mode, and supports data checks.


27.1.3 Overview of the XREF KM Process

The overall process can be divided into the following three main phases:

Loading Phase (LKM)

During the loading phase, a Source Primary Key is created using columns from the source table. This Source Primary Key is computed using a user-defined SQL expression that should return a VARCHAR value. This expression is specified in the SRC_PK_EXPRESSION KM option.

For example, for a source Order Line Table (aliased OLINE in the interface) you can use the following expression:

TO_CHAR(OLINE.ORDER_ID) || '-' || TO_CHAR(OLINE.LINE_ID)

This value will be finally used to populate the cross-reference table.

Integration and Cross-Referencing Phase (IKM)

During the integration phase, a Common ID is created for the target table. The value for the Common ID is computed from the expression in the XREF_SYS_GUID KM option. This expression can be for example:

  • A database sequence (<SEQUENCE_NAME>. NEXTVAL)

  • A function returning a global unique Id (SYS_GUID() for Oracle, NewID() for SQL Server)

This Common ID is pushed to the target columns of the target table that are marked with the UD1 flag.

Both the Common ID and the Source Primary Key are pushed to the cross-reference table (XREF_DATA). In addition, the IKM pushes to the cross-reference table a unique Row Number value that creates the cross-reference between the Source Primary Key and Common ID. This Row Number value is computed from the XREF_ROWNUMBER_EXPRESSION KM option, which takes typically expressions similar to the Common ID to generate a unique identifier.

The same Common ID is reused (and not re-computed) if the same source row is used to load several target tables across several interfaces with the Cross-References KMs. This allows the creation of cross-references between a unique source row and different targets rows.

Updating/Deleting Processed Records (LKM)

This optional phase (parameterized by the SRC_UPDATE_DELETE_ACTION KM option) deletes or updates source records based on the successfully processed source records:

  • If SRC_UPDATE_DELETE_ACTION takes the DELETE value, the source records processed by the interface are deleted.

  • If SRC_UPDATE_DELETE_ACTION takes the UPDATE value, the source column of the source records processed by the interface is updated with the SQL expression given in the SRC_UPD_EXPRESSION KM option. The name of this source column must be specified in the SRC_UPD_COL KM option.

27.2 Installation and Configuration

Make sure you have read the information in this section before you start using the ESB Knowledge Modules:

27.2.1 System Requirements and Certifications

Before performing any installation you should read the system requirements and certification documentation to ensure that your environment meets the minimum installation requirements for the products you are installing.

The list of supported platforms and versions is available on Oracle Technical Network (OTN):

http://www.oracle.com/technology/products/oracle-data-integrator/index.html.

27.2.2 Technology Specific Requirements

There are no connectivity requirements for using ESB in Oracle Data Integrator. The requirements for the Oracle Database apply also to ESB. See Chapter 2, "Oracle Database" for more information.

27.2.3 Connectivity Requirements

There are no connectivity requirements for using ESB in Oracle Data Integrator. The requirements for the Oracle Database apply also to ESB. See Chapter 2, "Oracle Database" for more information.

27.3 Working with XREF using the ESB Cross-References KMs

This section consists of the following topics:

27.3.1 Defining the Topology

The steps to create the topology in Oracle Data Integrator, which are specific to projects using ESB Cross-References KMs, are the following:

  1. Create the data servers, physical and logical schemas corresponding to the sources and targets.

  2. Create a data server for the Oracle technology as described in Section 2.3.1, "Creating an Oracle Data Server".

  3. Under this Oracle data server, create a physical and a logical schema called ESB_XREF for the schema containing the cross-reference table named XREF_DATA. If this table is stored in a data server already declared, you only need to create the schemas.

    See "Creating a Physical Schema" and "Creating a Logical Schema" in the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator for more information.

27.3.2 Setting up the Project

Import the following KMs into your project, if they are not already in your project:

  • IKM SQL Control Append (ESB XREF)

  • LKM SQL to SQL (ESB XREF) or LKM MSSQL to SQL (ESB XREF) if using Microsoft SQL Server.

27.3.3 Designing an Interface with the ESB Cross-References KMs

To create an integration interface, which both loads a target table from several source tables and handles cross-references between one of the sources and the target, run the following steps:

  1. Create an interface with the source and target datastores which will have the cross-references.

  2. Create joins, filters and mappings as usual. Make sure to check the UD1 flag for the column of the target datastore that will be the placeholder for the Common ID. Note that you do not need to map this column.

  3. In the Flow tab of the interface, select the source set containing the source table to cross-reference, and select the LKM SQL to SQL (ESB XREF) or LKM MSSQL to SQL (ESB XREF) if the source data store is in Microsoft SQL Server.

  4. Specify the KM options as follows:

    • SRC_PK_EXPRESSION

      Specify the expression representing the Source Primary Key value that you want to store in the XREF table. If the source table has just one column defined as a key, enter the column name (for example SEQ_NO). If the source key has multiple columns, specify the expression to use for deriving the key value. For example, if there are two key columns in the table and you want to store the concatenated value of those columns as your source value in the XREF table enter SEQ_NO|DOC_DATE. This option is mandatory.

    • SRC_UPDATE_DELETE_ACTION

      Indicates what action to take on the source records after integrating data into the target. See Table 27-2 for a list of possible values.

      Table 27-2 Values of the SRC_UPDATE_DELETE_ACTION

      Value Description

      NONE

      Specify NONE for no action on the source records.

      UPDATE

      Enter UPDATE to update the source records flag according to SRC_UPD_COL and SRC_UPD_EXPRESSION.

      If you select the UPDATE option you also need to specify the following options: SRC_PK_LOGICAL_SCHEMA, SRC_PK_TABLE_NAME, SRC_PK_TABLE_ALIAS, SRC_UPD_COL, and SRC_UPD_EXPRESSION.

      DELETE

      Enter DELETE to delete the source records after the integration.

      If you select the DELETE option, you also need to specify the following options: SRC_PK_LOGICAL_SCHEMA, SRC_PK_TABLE_NAME, and SRC_PK_TABLE_ALIAS.


  5. Select your staging area in the Flow tab of the interface and select the IKM SQL Control Append (ESB XREF).

  6. Specify the KM options as follows:

    • XREF_TABLE_NAME - Enter the name of the source table that will be stored in the reference table.

    • XREF_COLUMN_NAME - This is the name of the source primary key that will be stored in the XREF table.

    • XREF_SYS_GUID_EXPRESSION - Expression to be used to computing the Common ID. This expression can be for example:

    • a database sequence (<SEQUENCE_NAME>.NEXTVAL)

    • a function returning a global unique Id (SYS_GUID() for Oracle and NewID() for SQL Server)

    • XREF_ROWNUMBER_EXPRESSION - This is the value that is pushed into the Row Number column of the XREF_DATA table. Use the default value of GUID unless you have the need to change it to a sequence.

    • FLOW_CONTROL - Set to YES in order to be able to use the CKM Oracle.

    Note:

    If the target table doesn't have any placeholder for the Common ID and you are for example planning to populate the source identifier in one of the target columns, you must use the standard mapping rules of ODI to indicate which source identifier to populate in which column.

    If the target column that you want to load with the Common ID is a unique key of the target table, it needs to be mapped. You must put a dummy mapping on that column. At runtime, this dummy mapping will be overwritten with the generated common identifier by the integration knowledge module. Make sure to flag this target column with UD1.

27.4 Knowledge Module Options Reference

This section lists the KM options for the following Knowledge Modules:

Table 27-3 LKM SQL to SQL (ESB XREF)

Option Values Mandatory Description

SRC_UPDATE_DELETE_ACTION

NONE|UPDATE|DELETE

Yes

Indicates what action to take on source records after integrating data into the target. See Table 27-2 for a list of valid values for this option.

SRC_PK_EXPRESSION

Concatenating expression

Yes

Expression that concatenates values from the PK to have them fit in a single large varchar column. For example: for the source Orderline Table (aliased OLINE in the interface) you can use expression:

TO_CHAR(OLINE.ORDER_ID) || '-' || TO_CHAR(OLINE.LINE_ID)

SRC_PK_LOGICAL_SCHEMA

Name of source table's logical schema

No

Indicates the source table's logical schema. The source table is the one from which we want to delete or update records after processing them. This logical schema is used to resolve the actual physical schema at runtime depending on the Context. For example: ORDER_BOOKING. This option is required only when SRC_UPDATE_DELETE_ACTION is set to UPDATE or DELETE.

SRC_PK_TABLE_NAME

Source table name, default is MY_TABLE

No

Indicate the source table name of which we want to delete records after processing them. For example: ORDERS This option is required only when SRC_UPDATE_DELETE_ACTION is set to UPDATE or DELETE.

SRC_PK_TABLE_ALIAS

Source table alias, default is

MY_ALIAS

No

Indicate the source table's alias within this interface. The source table is the one from which we want to delete or update records after processing them. For example: ORD. This option is required only when SRC_UPDATE_DELETE_ACTION is set to UPDATE or DELETE.

SRC_UPD_COL

Aliased source column name

No

Aliased source column name that holds the update flag indicator. The value of this column will be updated after integration when SRC_UPDATE_DELETE_ACTION is set to UPDATE with the expression literal SRC_UPD_EXPRESSION. The alias used for the column should match the one defined for the source table. For example: ORD.LOADED_FLAG. This option is required only when SRC_UPDATE_DELETE_ACTION is set to UPDATE.

SRC_UPD_EXPRESSION

Literal or expression

No

Literal or expression used to update the SRC_UPD_COL. This value will be used to update this column after integration when SRC_UPDATE_DELETE_ACTION is set to UPDATE. For example: RECORDS PROCESSED. This option is required only when SRC_UPDATE_DELETE_ACTION is set to UPDATE.

DELETE_TEMPORARY_OBJECTS

Yes|No

Yes

Set this option to NO if you wish to retain temporary objects (files and scripts) after integration. Useful for debugging.


LKM MSSQL to SQL (ESB XREF)

See Table 27-3 for details on the LKM MSSQL to SQL (ESB XREF) options.

Table 27-4 IKM SQL Control Append (ESB XREF)

Option Values Mandatory Description

INSERT

Yes|No

Yes

Automatically attempts to insert data into the Target Datastore of the Interface.

COMMIT

Yes|No

Yes

Commit all data inserted in the target datastore.

FLOW_CONTROL

Yes|No

Yes

Check this option if you wish to perform flow control.

RECYCLE_ERRORS

Yes|No

Yes

Check this option to recycle data rejected from a previous control.

STATIC_CONTROL

Yes|No

Yes

Check this option to control the target table after having inserted or updated target data.

TRUNCATE

Yes|No

Yes

Check this option if you wish to truncate the target datastore.

DELETE_ALL

Yes|No

Yes

Check this option if you wish to delete all the rows of the target datastore.

CREATE_TARG_TABLE

Yes|No

Yes

Check this option if you wish to create the target table.

DELETE_TEMPORARY_OBJECTS

Yes|No

Yes

Set this option to NO if you wish to retain temporary objects (tables, files and scripts) after integration. Useful for debugging.

XREF_TABLE_NAME

XREF table name

Yes

Table Name to use in the XREF table. Example: ORDERS

XREF_COLUMN_NAME

Column name

Yes

Primary key column name to use as a literal in the XREF table

XREF_SYS_GUID_EXPRESSION

SYS_GUID()

Yes

Enter the expression used to populate the common ID for the XREF table (column name "VALUE"). Valid examples are: SYS_GUID(), MY_SEQUENCE.NEXTVAL, and so forth.

XREF_ROWNUMBER_EXPRESSION

SYS_GUID()

Yes

Enter the expression used to populate the row_number for the XREF table. For example for Oracle: SYS_GUID(), MY_SEQUENCE.NEXTVAL and so forth.