Creating a new Package Defining the Sequence of Steps

10-8 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

1. Open the Package editor and go to the Diagram tab.

2. In Designer Navigator, select the model, sub-model or datastore to check from the Models tree. 3. Drag and drop this model, sub-model or datastore into the diagram.

4. In the General tab or the properties panel, fill in the Step Name field. Select

Model, Datastore or Sub-Model Check in the step type.

5. Select Delete Error from the Checked Tables if you want this static check to

remove erroneous rows from the tables checked in this process.

6. From the File menu, click Save.

10.3.1.7 Journalizing a Model or a Datastore

To insert a journalizing step:

1. Open the Package editor and go to the Diagram tab.

2. In Designer Navigator, select the model or datastore to check from the Models

tree. 3. Drag and drop this model or datastore into the diagram.

4. In the General tab or the properties panel, fill in the Step Name field. Select

Journalizing Model or Journalizing Datastore in the step type. 5. Set the journalizing options. See Chapter 7, Working with Changed Data Capture for more information on these options.

6. From the File menu, click Save.

10.3.1.8 Reverse-Engineering a Model

To insert a reverse-engineering step:

1. Open the Package editor and go to the Diagram tab.

2. In Designer Navigator, select the model to reverse-engineer from the Models tree.

3. Drag and drop this model into the diagram.

4. In the General tab or the properties panel, fill in the Step Name field. Select

Model Reverse in the step type.

5. From the File menu, click Save.

Note: It is necessary to define the CKM in the model to perform this static check. Note: It is necessary to define the JKM in the model to perform the journalizing operations. Note: The reverse-engineering options set in the model definition are used for performing this reverse-engineering process. Working with Packages 10-9

10.3.2 Deleting a Step

To delete a step:

1. In the Package toolbar tab, select the Free Choice tool.

2. Select the step to delete in the diagram.

3. Right-click and then select Delete Step.

4. Click OK.

The step disappears from the diagram.

10.3.3 Duplicating a Step

To duplicate a step:

1. In the Package toolbar tab, select the Free Choice tool.

2. Select the step to duplicate in the diagram.

3. Right-click and then select Duplicate Step.

A copy of the step appears in the diagram.

10.3.4 Running a Step

To run a step:

1. In the Package toolbar tab, select the Free Choice tool.

2. Select the step to run in the diagram.

3. Right-click and then select Execute Step.

4. In the Execution window, select the execution parameters:

■ Select the Context into which the step must be executed. ■ Select the Logical Agent that will run the step. 5. Click OK. 6. The Session Started Window appears. 7. Click OK. You can review the step execution in the Operator Navigator.

10.3.5 Editing a Step’s Linked Object

The steps linked object is the interface, procedure, variable, and so forth from which the step is created. You can edit this object from the Package diagram. To edit a steps linked object:

1. In the Package toolbar tab, select the Free Choice tool.

2. Select the step to edit in the diagram.

3. Right-click and then select Edit Linked Object.

The Editor for the linked object opens. Note: It is not possible to undo a delete operation in the Package diagram. 10-10 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

10.3.6 Arranging the Steps Layout

The steps can be rearranged in the diagram in order to make it more readable. To arrange the steps in the diagram:

1. From the Package toolbar menu, select the Free Choice tool.

2. Select the more steps you wish to arrange:

■ Keep the CTRL key pressed and select each step ■ Drag the cursor on the diagram with the left mouse button pressed.

3. To arrange the selected steps, you may either:

■ Drag them to arrange their position into the diagram ■ Right-click, then select a Vertical Alignment or Horizontal Alignment option from the context menu. It is also possible to use the Reorganize button from the toolbar to automatically reorganize the steps.

10.4 Defining the Sequence of Steps

Once the steps are created, you must reorder them into a data processing chain. This chain has the following rules: ■ It starts with a unique step defined as the First Step. ■ Each step has two termination states: Success or Failure. ■ A step in failure or success can be followed by another step, or by the end of the Package. ■ In case of failure, it is possible to define a number of retries. A Package has one entry point, the First Step, but several possible termination steps. Failure Conditions The table below details the conditions that lead a step to a Failure state. In other situations, the steps ends in a Success state. Step Type Failure conditions Flow ■ Error in an interface command. ■ Maximum number or percentage of errors allowed reached. Procedure Error in a procedure command. Refresh Variable Error while running the refresh query. Set Variable Error when setting the variable invalid value. Evaluate Variable The condition defined in the step is not matched. Declare Variable This step has no failure condition and always succeeds. Oracle Data Integrator Tool Oracle Data Integrator Tool return code is different from zero. If this tool is an OS Command, a failure case is a command return code different from zero. Journalize Datastore, Model or Sub-Model Error in a journalizing command. Check Datastore, Model or Sub-Model Error in the check process. Working with Packages 10-11 Defining the Sequence To define the first step of the Package:

1. In the Package toolbar tab, select the Free Choice tool.

2. Select the step to set as the first one in the diagram.

3. Right-click and then select First Step.

The first step symbol appears on the steps icon. To define the next step upon success:

1. In the Package toolbar tab, select the Next Step on Success tool.

2. Select one step in the diagram. 3. Keep the mouse button pressed and move the cursor to the icon of the step that must follow in case of a success, then release the mouse button. 4. Repeat this operation to link all your steps in a success path sequence. This sequence should start from the step defined as the First Step. Green arrows representing the success path between the steps, with a ok labels on these arrows. In the case of an evaluate variable step, the label is true. To define the next step upon failure:

1. In the Package toolbar tab, select the Next Step on Failure tool.

2. Select one step in the diagram. 3. Keep the mouse button pressed and move the cursor to the icon of the step that must follow in case of a failure, then release the mouse button. 4. Repeat this operation to link steps according to your workflow logic. Red arrows representing the failure path between the steps, with a ko labels on these arrows. In the case of an evaluate variable step, the arrow is green and the label is false. To define the end of the Package upon failure: By default, a step that is linked to no other step after a success or failure condition will terminate the Package when this success or failure condition is met. You can set this behavior by editing the step’s behavior.

1. In the Package toolbar tab, select the Free Choice tool.

2. Select the step to edit.

3. In the properties panel, select the Advanced tab.

4. Select End in Processing after failure or Processing after success. The links after

the step disappear from the diagram.

5. You can optionally set a Number of attempts and an Time between attempts for

the step to retry a number of times with an interval between the retries.

10.5 Running the Package

To run a Package: Reverse Model Error in the reverse-engineering process. Step Type Failure conditions 10-12 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

1. In the Project tree in Designer Navigator, select the Package you want to execute.

2. Right-click and select Execute.

3. In the Execution window, select the execution parameters:

■ Select the Context into which the Package will be executed. ■ Select the Logical Agent that will run the step. 4. Click OK. 5. The Session Started Window appears. 6. Click OK. You can review the Package execution in the Operator Navigator. 11 Working with Integration Interfaces 11-1 11 Working with Integration Interfaces This chapter describes how to work with integration interfaces. An overview of the interface components and the Interface Editor is provided. This chapter includes the following sections: ■ Section 11.1, Introduction to Integration Interfaces ■ Section 11.2, Introduction to the Interface Editor ■ Section 11.3, Creating an Interface ■ Section 11.4, Using the Quick-Edit Editor ■ Section 11.5, Designing Integration Interfaces: E-LT- and ETL-Style Interfaces

11.1 Introduction to Integration Interfaces

An interface consists of a set of rules that define the loading of a datastore or a temporary target structure from one or more source datastores. Before creating an integration interface in Section 11.3, Creating an Interface , you must first understand the key components of an integration interface and the Interface Editor. An overview of the components that you use to design an integration interface is provided in Section 11.1.1, Components of an Integration Interface . The interface Editor is described in Section 11.2, Introduction to the Interface Editor .

11.1.1 Components of an Integration Interface

An integration interface is made up of and defined by the following components: ■ Target Datastore The target datastore is the element that will be loaded by the interface. This datastore may be permanent defined in a model or temporary created by the interface. ■ Datasets One target is loaded with data coming from several datasets. Set-based operators Union, Intersect, etc are used to merge the different datasets into the target datastore. Each Dataset corresponds to one diagram of source datastores and the mappings used to load the target datastore from these source datastores. ■ Diagram of Source Datastores 11-2 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator A diagram of sources is made of source datastores - possibly filtered - related using joins. The source diagram also includes lookups to fetch additional information for loading the target. Two types of objects can be used as a source of an interface: datastores from the models and interfaces. If an interface is used, its target datastore -temporary or not- will be taken as a source. The source datastores of an interface can be filtered during the loading process, and must be put in relation through joins. Joins and filters are either copied from the models or can be defined for the interface. Join and filters are implemented in the form of SQL expressions. ■ Mapping A mapping defines the transformations performed on one or several source columns to load one target column. These transformations are implemented in the form of SQL expressions. Each target column has one mapping per dataset. If a mapping is executed on the target, the same mapping applies for all datasets. ■ Staging Area The staging area is a logical schema into which some of the transformations joins, filters and mappings take place. It is by default the same schema as the target’s logical schema. It is possible to locate the staging area on a different location including one of the sources. It is the case if the target’s logical schema is not suitable for this role. For example, if the target is a file datastore, as the file technology has no transformation capability. Mappings can be executed either on the source, target or staging area. Filters and joins can be executed either on the source or staging area. ■ Flow The flow describes how the data flows between the sources, the staging area if it is different from the target, and the target as well as where joins and filters take place. The flow also includes the loading and integration methods used by this interface. These are selected by choosing Loading and Integration Knowledge Modules LKM, IKM. ■ Control An interface implements two points of control. Flow control checks the flow of data before it is integrated into the target, Post-Integration control performs a static check on the target table at the end of the interface. The check strategy for Flow and Post-Integration Control is defined by a Check Knowledge Module CKM. The interfaces use the following components that should be created before the interface: ■ Datastores that will be used as sources and target of the loading process must be populated into the data models. See Chapter 5, Creating and Reverse-Engineering a Model for more information. ■ The correct physical and logical schemas along with their mapping in the interface’s execution context must be defined prior to creating the interface, if the staging area is to be defined in a schema different than any of the sources or the target. See Chapter 4, Setting-up the Topology for more information. Working with Integration Interfaces 11-3 ■ Knowledge Modules IKM, LKM, CKM that will be selected in the flow must be imported into the project. See Chapter 9, Creating an Integration Project for more information. ■ Variables, Sequence and User Functions that will be used in the mapping, filter or join expressions must be created in the project. See Chapter 12, Working with Procedures, Variables, Sequences, and User Functions for more information.

11.2 Introduction to the Interface Editor

The interface Editor provides a single environment for designing integration interfaces. The interface Editor enables you to create and edit integration interfaces. Figure 11–1 Interface Editor The Interface Editor consists of the sections described in Table 11–1 : Table 11–1 Interface Editor Sections Section Location in Figure Description Designer Navigator Left side The Designer Navigator displays the tree views for projects, models, solutions, and other global components. Source Diagram Middle You drag the source datastores from the Models tree and Interfaces from the Projects tree into the Source Diagram. You can also define and edit joins and filters from this diagram. Source Diagram Toolbar Middle, above the Source Diagram. This toolbar contains the tools that can be used for the source diagram, as well as display options for the diagram. Dataset Tabs Middle, below the Source Diagram. Datasets are displayed as tabs in the Interface Editor.