14 Packages

Learn about packages in Oracle Data Integrator and how to create them.

What is a Package

Find out what are packages in Oracle Data Integrator.

An Oracle Data Integrator (ODI) package defines a complete data integration job. A job is made up of many smaller steps. Normally, you design these steps first, such as the ODI procedures and mappings. Other steps are created in the package.

See Introduction to Packages in Developing Integration Projects with Oracle Data Integrator.

Create and Run a Package

Learn how to create and run a package in Oracle Data Integrator.

Other ways can be used to create a package in ODI, but here we focus on just two ways: mappings and tools. The basic process for creating a package is shown in the following three tasks:
  • Create a blank package

    You create a blank package and name it.

  • Add steps to the diagram

    You can now load your package with the steps that it later executes. You can drag mappings from the Project view onto the package’s Diagram tab. This creates a link rather than a copy to the mapping. Thus, you can keep working on your mapping, and your changes update the package. You can also add ODI tools into the package. Tools do useful things, such as sending email, copying files, or waiting for the data to arrive.

    The most useful package steps for most situations are either mappings or ODI tools. Mappings, as you know by now, transfer data from one or more source datastores into a target datastore. ODI tools perform a much wider variety of tasks, including sending email or waiting for data.

    Steps are created by dragging objects onto the package diagram, which is found on the Diagram tab. They are then sequenced by creating links from one step to the next.

    Mappings are reusable. When you create a mapping, you can use it several times in the same package. You can even copy it into several different packages simultaneously. Although you can use mappings from other projects in your package. It's best practice to avoid doing this, because it makes it difficult to keep your project organized.

  • Arrange the package steps

    Finally, you arrange the package steps in a meaningful order. You begin by defining the first step to be executed. Then, you tell ODI what to do next when the first step succeeds. You can also tell ODI what to do if any particular step in the package fails. Thus, you can link complex sequences of operations with error handling or error recovery.

    Every package must have a first step. This is where the execution of a package always begins. After that, the sequence of steps splits in two directions: If the step executes successfully, the execution follows the green “ok” link. If the step fails, it follows the red “ko” link. Success is defined by the step returning a code 0. Any return code other than 0 is treated as a failure.

    The first step you drag into the package diagram is always (initially) the First Step. You can of course designate a step you subsequently drag as the first one to execute. If you delete the step marked First Step, be sure to designate another step as the first one to execute. ODI displays an error message if no step is labeled First Step.

    All the steps in the diagram must be either on the success path or connected by a failure path to it. If there are unlinked steps, the yellow triangle is highlighted. You can click the yellow triangle to check for the problem.

    Be sure to test each mapping individually before using it in a package. Similarly, make sure you test individual steps in the package. To do this, right-click a step and select Execute Step. This is called unit testing. In some cases, it may not be possible to test an individual step - for example, when it requires a variable that is defined in the package. However, it is a good practice to test each step individually, whenever possible.

You should save your work frequently when working on packages.

To execute the package, click the Execute button in the package window. As with mappings, you can specify the context and the agent to run the package with. When you receive a notification that the session has started, open the Operator Navigator. The package represents a session in the Operator Navigator. Mapping and tool steps are represented as steps. Mapping steps are then subdivided into tasks that complete the individual data transfer operations. Tool steps, however, have only one task.

See Creating a new Package in Developing Integration Projects with Oracle Data Integrator.

See Running a Package in Developing Integration Projects with Oracle Data Integrator.

Create a Blank Package

Learn how to create a blank package in Oracle Data Integrator

To create a blank package, perform the following:
  1. Locate the project and folder in the Projects view where you want to create the package.

    A package always belongs to a project, but you can use mappings from other projects in the package.

  2. Right-click the Packages node and select New Package.
  3. Provide a meaningful name to your package in the Name field.
  4. Describe what the package does, by entering details in the Description field.

    This description appears in the package documentation and is useful when performing changes or maintenance.

  5. To begin adding steps, click the Diagram tab.

Create a Step

Learn how to create a package step using a procedure in Oracle Data Integrator

To create a step, using a procedure:
  1. Find the mapping, ODI tool, or procedure that you want to add. To add a procedure, expand the project and folder nodes in the Projects view. Then expand the Procedures node.
  2. Drag the procedure onto the package diagram. You see an icon representing the procedure step in the package.
  3. (optional) Change the name of the procedure step.

Arrange Package Steps

Learn how to arrange package steps in Oracle Data Integrator

To arrange the steps in a package:
  1. Define the first step. Right-click a step and select First Step.
  2. Define the success path for your package by connecting the normal sequence of steps into a continuous sequence. Click the Next step on success tool, which resembles a green arrow with the word ok above it.
  3. Click all the steps in the sequence from the first to the last.
  4. Click the Select tool (which resembles a cursor), to stop sequencing.
  5. Add error handling by clicking the red ko button representing “Next step on failure.” Now click a step and the corresponding error recovery step. If this step fails, then report the error into a log file.
  6. Delete unwanted links on steps, by selecting the step or link with the Select tool. Then use Delete selection on the toolbar, or right-click and select Delete. You can also use the keyboard by pressing the Delete key.