7 Creating a Package for Delta Extraction
So far we have seen examples of extracting data from BW data targets. The instructions in this chapter explain how the mappings introduced in the previous chapters can be turned into delta extraction mappings.
In delta extraction mappings only the data, which was changed after last extraction, is extracted. Delta extraction mappings are only supported for InfoCubes, ODS/DSO and Open Hub objects, but not for InfoObjects.
This chapter includes the following sections:
Creating the MIN_REQUEST_ID Variable
The second step consists of creating an ODI variable that stores the last extracted request ID. This request ID serves as the starting point for the next extraction run:
Creating a Package for Delta Extraction
In the third step the building blocks created in the previous steps are put together: Variable and Mappings are arranged into a Package:
-
Open the
SAP Demo
Project. -
Create a new Package named
SAP Demo
. -
Insert a Declare Variable step to this Package:
Drag and Drop the
MIN_REQUEST_ID
variable and select the "Declare Variable" step type. -
Insert a Flow step to this Package:
Drag and drop the Mapping created in the previous sections for InfoCube/ ODS or OpenHub-Extraction in the Package.
-
Insert a Refresh Variable step to this Package.
Drag and Drop the
MIN_REQUEST_ID
variable and select the "Refresh Variable" step type. -
Define the step sequence.
-
Define the Declare Variable step as the First Step.
-
Link it to the Flow step that is the next step upon success.
-
Link the Flow step to the Refresh Variable step that is the next step upon success and the last step in the Package. Add arrows between the variables.
Your Package should look as shown on this screenshot.
-
Running the Package
To run the Package:
-
In the Projects tree view, expand the
SAP Demo
Project. -
Select the
SAP Demo
Package. -
Right-click and select Run.
-
In the Execution window, click OK.
-
In the Session Started window, click OK.
What happens when you execute the delta extraction Package?
First, Oracle Data Integrator initializes the variable MIN_REQUEST_ID with the last historized value (declare variable step). This value is then passed into ABAP extraction program to specify where to start the data extraction. The KM queries the SAP system for the highest assigned request ID. All data between min and max request ID will be extracted (mapping).
After the execution of the mapping the refresh variable step stores the highest request ID into MIN_REQUEST_ID for next extraction run.