Working with Packages
Introduction to Packages
The Package is the largest unit of execution in Oracle Data Integrator. A Package is made up of a sequence of steps organized into an execution diagram.Each step can either succeed or fail its execution. Depending on the execution result (success or failure), a step can branch to another step.
Introduction to Steps
Type | Description | See Section |
---|---|---|
Flow (Interface) |
Executes an Interface. |
Section 10.3.1.1, "Executing an Interface" |
Procedure |
Executes a Procedure. |
Section 10.3.1.2, "Executing a Procedure" |
Variable |
Declares, sets, refreshes or evaluates the value of a variable. |
Section 10.3.1.3, "Variable Steps" |
Oracle Data Integrator Tools |
These tools, available in the Toolbox, enable to access all Oracle
Data Integrator API commands, or perform operating system calls |
Section 10.3.1.4, "Adding Oracle Data Integrator Tool Steps" |
Models, Sub-models, and Datastores |
Performs journalizing, static check or reverse-engineering operations on these objects |
Section 10.3.1.5, "Model, Sub-Models and Datastore Related Steps" |
Description of "Figure 10-1 Sample Package"
-
Execute procedure "System Backup" that runs some backup operations.
-
Execute interface "Customer Group" that loads the customer group datastore.
-
Execute interface "Customer" that loads the customer datastore.
-
Execute interface "Product" that loads the product datastore.
-
Refresh variable "Last Invoice ID" step to set the value of this variable for use later in the Package.
-
Execute interface "Invoice Header" that load the invoice header datastore.
-
Execute interface "Invoice Lines" that load the invoices datastore.
-
If any of the steps above fails, then the Package runs the "Send
Alert" step that sends an email to the administrator using an Oracle
Data Integrator tool.
Introduction to the Package editor
The Package editor provides a single environment for designing Packages. Figure 10-2 gives an overview of the Package editor.Creating a new Package
To create a new Package:-
In the Project tree in Designer Navigator, click the Packages node in the folder where you want to create the Package.
-
Right-click and select New Package.
-
Type in the Name of the Package.
-
Go to the Diagram tab.
-
Add steps as described in Section 10.3, "Working with Steps"
-
From the File menu, click Save.
10.3 Working with Steps
Packages are an organized sequence of steps. Designing a Package consists mainly in working with the steps of this Package.10.3.1 Adding a Step
Adding a step depends on the nature of the steps being inserted. See Table 10-1 for more information on the different types of steps. The procedures for adding the different type of steps are given below.10.3.1.1 Executing an Interface
To insert a Flow (Interface) step:-
Open the Package editor and go to the Diagram tab.
-
Select the interface to add to the Package from the Designer Navigator Projects tree.
-
Drag and drop the interface into the diagram. A flow Step appears.
-
Click the step icon in the diagram. The properties panel opens.
-
In the General tab, edit the Step Name field.
-
From the File menu, click Save.
10.3.1.2 Executing a Procedure
To insert a Procedure step:-
Open the Package editor and go to the Diagram tab.
-
Select the procedure to add to the Package from the Designer Navigator Projects tree.
-
Drag and drop the procedure into the diagram. A procedure step appears.
-
Click the step icon in the diagram. The properties panel opens.
-
In the General tab, edit the Step Name field.
-
In the Options tab, set the procedure options if needed.
-
From the File menu, click Save.
10.3.1.3 Variable Steps
There are different variable steps within Oracle Data Integrator:-
Declare Variable: When a variable is used
in a Package (or in elements of the topology which are used in the
Package), it is strongly recommended that you insert a Declare Variable
step in the Package. This step explicitly declares the variable in the
Package.
-
Refresh Variable: This step refreshes the variable by running the query specified in the variable definition.
-
Set Variable: There are two functions for this step:
-
Assign sets the current value of a variable.
-
Increment increases or decreases a numeric value by the specified amount.
-
Assign sets the current value of a variable.
-
Evaluate Variable: This step compares the
value of the variable with a given value according to an operator. If
the condition is met, then the evaluation step is true, otherwise it is
false. This step allows for branching in Packages.
Declaring a Variable
To insert a Declare Variable step:-
Open the Package editor and go to the Diagram tab.
-
In Designer Navigator, select the variable to add to the Package from the Projects tree for a project variable or from the Others tree for a global variable.
-
Drag and drop the variable into the diagram. A variable step appears.
-
Click on the step icon in the diagram. The properties panel opens.
-
In the General tab, fill in the Step Name field. Select Declare Variable in the Step Type.
-
From the File menu, click Save.
Refreshing a Variable
To insert a Refresh Variable step:-
Open the Package editor and go to the Diagram tab.
-
In Designer Navigator, select the variable to add to the Package from the Projects tree for a project variable or from the Others tree for a global variable.
-
Drag and drop the variable into the diagram. A variable step appears.
-
Click on the step icon in the diagram. The properties panel opens.
-
In the General tab, fill in the Step Name field. Select Refresh Variable in the Step Type.
-
From the File menu, click Save.
Setting a Variable
To insert a Set Variable step:-
Open the Package editor and go to the Diagram tab.
-
In Designer Navigator, select the variable to add to the Package from the Projects tree for a project variable or from the Others tree for a global variable.
-
Drag and drop the variable into the diagram. A variable step appears.
-
Click on the step icon in the diagram. The properties panel opens.
-
In the General tab, fill in the Step Name field. Select Set Variable in the Step Type.
-
Select Assign or Increment depending on the operation you want to perform on the variable value.
-
Type in the Value field the value to set or the increment. This value may be another variable.
-
From the File menu, click Save.
Evaluating a Variable
To insert an Evaluate Variable step:-
Open the Package editor and go to the Diagram tab.
-
In Designer Navigator, select the variable to add to the Package from the Projects tree for a project variable or from the Others tree for a global variable.
-
Drag and drop the variable into the diagram. A variable step appears.
-
Click on the step icon in the diagram. The properties panel opens.
-
In the General tab, fill in the Step Name field. Select Evaluate Variable in the Step Type.
-
Select the Operator used to compare the variable value.
-
Type in the Value field the value to compare with your variable. This value may be another variable.
Note:You can specify a list of values in the Value field. When using the IN operator, use the semicolon character (;) to separate the values of a list. -
From the File menu, click Save.
No comments:
Post a Comment