EIM Load Explanation With An Example
EIM Load Explanation With An Example
Montpellier PSSC
Classification: Confidential
Montpellier PSSC
Table of Content
_
2/54
Classification: Confidential
Montpellier PSSC
Introduction
Purpose of this paper
The purpose of this document is to give to reader an introduction to Siebel EIM
Load. The main goal is to present a simple example of Siebel EIM load of data in
order to start more complex EIM load of data in the future. With a simple example
as document thread, the reader will be able to learn about such Siebel process and
understand EIM Siebel mechanism.
3/54
Classification: Confidential
Montpellier PSSC
EIM Overview
Introducing Enterprise Integration Manager
In Siebel Application User data is populated and managed by
you. User data is stored in one or more tables in the Siebel
Database and it implies a lot of relationships between these
tables. It is obviously complex to populate user data using
SQL. First reason is referential integrity (which is maintained
programmatically through ROW_ID) of Siebel data.
Siebel offers you processes to import, delete or export of data
into tables. This process called EIM uses interface tables
acting as a staging area between the Siebel Database and
other data sources. Once data entered in EIM tables, EIM task
performs data load into Siebel tables, according to Siebel
System rules.
4/54
Classification: Confidential
Montpellier PSSC
Data Mapping
Data Mapping determines which Siebel table columns will store external source
data and which interface table columns will be used to import from source to
destination. Data Mapping is Business Analyst job and is the more complex and
important part in EIM process. Once you located correct EIM tables and its columns,
you just have to run EIM task to import successfully you user data.
Invoking EIM
All interface tables have 3 columns, which must be populated in addition to the
data that was mapped. A number to identify all records that should be processed in
the batch (IF_ROW_BATCH_NUM) and an unique number to identify the record in
the batch (ROW_ID, which is NOT the same row id exposed previously in this
document), the third one is a status. The EIM batch (or task) is using a
configuration file (.ifb file) to specify the batch, order and type of processing.
5/54
Classification: Confidential
Montpellier PSSC
6/54
Classification: Confidential
Montpellier PSSC
Context Description
Siebel context description
We use Siebel Finances Services Application (version 7.5.3) integrated with an
archive solution called Optim Archive For Siebel. This solution allows users to
archive old data in their Siebel Application to gain performance and space in
production database for example. The aim of this document is not to describe this
archive solution.
Thus, we can archive Siebel activities, opportunities and service requests.
We decided to work with Siebel Activities and to import a huge set of user data
concerning activities.
7/54
Classification: Confidential
Montpellier PSSC
8/54
Classification: Confidential
Montpellier PSSC
During almost EIM exercises, which will be described, we worked with this record,
these applets (one list applet and one form applet), this view and this screen.
With Siebel help menu of your browser client, you can obtain such information.
Hereafter you can see all Siebel information about our parameters set we worked
with.
Screen:
Activities
Screen
View:
Activity List View [Cache Mode : Not
Cached]
Business Object:
Actio
n
Applets:
Applet[0]: Activity List Applet With Navigation; Applet[1]: Activity Form
Applet;
Business Components: BusComp[0]: Action; BusComp[1]:
Action;
9/54
Classification: Confidential
Montpellier PSSC
10/54
Classification: Confidential
Montpellier PSSC
EIM Export
EIM Export Overview
To export data, EIM reads the data in the Siebel database tables and places the
information in the appropriate EIM tables. You can then copy data from the EIM
tables into another database. The export process generally populates the
applicable EIM table with a row for every Siebel base table row encountered. As a
consequence, where EIM tables have mappings to multiple Siebel base tables, one
export operation can generate multiple rows within the EIM table governing the
rows encountered within the Siebel base tables.
We know also which view and applet are concerned (see below). So we can guess
which Siebel Table is concerned using Siebel Tools:
Launch Siebel Tools shortcut
11/54
Classification: Confidential
Montpellier PSSC
C:\sea752\tools\BIN\siebdev.exe /c "c:\sea752\tools\bin\enu\tools.cfg" /U
sadmin /P sadmin /d ServerDataSrc /s C:\sia753.wri
12/54
Classification: Confidential
Montpellier PSSC
13/54
Classification: Confidential
Montpellier PSSC
Thus we are able to know the base table of our record with Table field in Tools.
We are going to search EIM tables mapping with Siebel table S_EVT_ACT
14/54
Classification: Confidential
Montpellier PSSC
We obtain the EIM Table list of EIM tables mapping with S_EVT_ACT table
NOTE: the red lines represent old EIM tables with old name convention (name
ending with IF extension) and they are inactive. Now EIM tables beginning with
EIM extension.
Now we are going to focus on EIM_ACTIVITY table.
15/54
Classification: Confidential
Montpellier PSSC
3 For parent tables, EIM locates child table rows and exports them to their
corresponding EIM tables
Go to Configuration file section further, to learn more about these different
parameters exposed above.
16/54
Classification: Confidential
Montpellier PSSC
17/54
Classification: Confidential
Montpellier PSSC
18/54
Classification: Confidential
Montpellier PSSC
19/54
Classification: Confidential
Montpellier PSSC
For your information, hereafter you can find the help guide
20/54
Classification: Confidential
Montpellier PSSC
The enterprise component is EIM and the task is launched with following
configuration:
21/54
Classification: Confidential
Montpellier PSSC
You can see all possible parameters for component EIM with the following
command:
22/54
Classification: Confidential
Montpellier PSSC
Then you can use your SQL tools (here DB2 Command Center) to check results.
23/54
Classification: Confidential
Montpellier PSSC
24/54
Classification: Confidential
Montpellier PSSC
You can verify the batch number (=100) and the batch status (=exported)
25/54
Classification: Confidential
Montpellier PSSC
EIM Import
EIM Import Overview
Importing data into Siebel base tables is a multi step process that requires
significant effort. You must first load data from an external database into the EIM
tables. Subsequently, you need to run an EIM process to read the data in these EIM
tables and import them into the appropriate Siebel base tables.
To import tables of data, EIM performs a sequence of tasks. Each task involves
multiple passes; at least one pass is required for each EIM table included in the
process. Depending on the type of import process, EIM may repeat several tasks.
The greatest difficulty of EIM import process is obviously data mapping between
external data source (your data) and Siebel tables. Because of huge and complex
data model of Siebel, because of complex Siebel Tables Management processes (a
lot of child-parent relationship for example), it is a so hard exercise to identify
which EIM columns to fill in, which EIM columns are useful and which one are no
useful, which EIM columns point to which Siebel Base Table Columns.
26/54
Classification: Confidential
Montpellier PSSC
Then, to avoid the difficulty of data mapping we copied this record with some
modifications.
We insert a new record into EIM_ACTIVITY table with the 4 mandatory
attributes. To determine mandatory attributes for an EIM table, we can use
Siebel Tools.
27/54
Classification: Confidential
Montpellier PSSC
28/54
Classification: Confidential
Montpellier PSSC
You can see first line for import, which is a copy of the second line above,
which is exported
To finish you complete some of the other fields of record for import,
following values for the same fields of exported record.
29/54
Classification: Confidential
Montpellier PSSC
You can continue to copy the exported record, as well as you want.
30/54
Classification: Confidential
Montpellier PSSC
31/54
Classification: Confidential
Montpellier PSSC
NOTE: The ONLY BASE TABLES IGNORE BASE TABLES, ONLY BASE COLUMNS,
and IGNORE BASE COLUMNS parameters can be used to improve EIM
performance.
We use a different batch number for import (=10 for example) than this one
uses for export (=100). Thus, the new configuration file for import will be the
following:
32/54
Classification: Confidential
Montpellier PSSC
33/54
Classification: Confidential
Montpellier PSSC
The enterprise component is EIM and the task is launched with following
configuration:
34/54
Classification: Confidential
Montpellier PSSC
Then, query the appropriate EIM tables for rows whose IF_ROW_BATCH_NUM
equals the batch number for the import.
These columns in each EIM table indicate whether a row was imported
successfully, and they identify the pass number on which a row failed. During
various passes of import processing, EIM sets the IF_ROW_STAT value to one of
the values shown in following table:
35/54
Classification: Confidential
Montpellier PSSC
36/54
Classification: Confidential
Montpellier PSSC
37/54
Classification: Confidential
Montpellier PSSC
38/54
Classification: Confidential
Montpellier PSSC
In AIX environment:
39/54
Classification: Confidential
Montpellier PSSC
40/54
Classification: Confidential
Montpellier PSSC
In the previous example, we just needed to enter a value for the field
RESOURCE_RES_NUM. This error caused the failure of all EIM import process.
The status was PARTIALLY_IMPORTED.
--An other instance of log file is the following. Error with severity 8, which
doesnt stop the EIM process. If you want, you can fix it or not.
At the file end, you can see the error total. Here 51 errors, which are, in fact,
warnings-like.
An example of EIM log with an error, severity 8 (warning)
Process [export EIM activities test #1] had 1 row fail
On EIM_ACTIVITY for batch 10 in step 7, pass 196:
Failed to resolve foreign key value. (severity 8) // severity 8 DOESNT CAUSE
// STOP OF PROCESS
Interface table:
EIM_ACTIVITY (EIM_ACTIVITY)
-----------TODO_ACTIVITY_UID (Activity User Id)
Base table:
S_EVT_ACT (Activity)
--------TODO_APPT_ID (Todo Appointment)
This is a foreign key value in the base table and the values in the interface
table did not resolve to existing values. Verify that the IF columns correspond to
existing base table rows or new interface table rows.
This failure did not eliminate the rows from further processing. Processing
will continue for other columns in the same and in other destination base
table.
----------------------------------------------------------------------Recorded 51 groups of failures. // Total of errors (may be warning)
41/54
Classification: Confidential
Montpellier PSSC
Example
Keeping the former example of errors (51 errors), we are going to show how to
fix a foreign key problem.
We decided (it is our choice) to fix the following error with severity 8:
on EIM_ACTIVITY for batch 10 in step 4, pass 110:
Failed to resolve foreign key value. (severity 8) // not a real error
Interface table:
EIM_ACTIVITY (EIM_ACTIVITY)
// for all of the following attributes, values
-----------// are missed to find an existing foreign key
ACT_AST_BI (Name)
ACT_AST_NUM (Asset number)
ACT_ASTPRDVEN_NAME (Name)
ACT_AST_PRDVEN_BI (Name)
ACT_AST_PRDVEN_LOC (Site)
ACT_AST_PROD_BI (Name)
ACT_AST_PROD_NAME (Name)
ACT_REV_NUM (Rev Num)
Base table:
S_EVT_ACT (Activity)
--------ASSET_ID (Asset ID) // it is a foreign key pointing to another table
42/54
Classification: Confidential
Montpellier PSSC
Action
First we need to search ASSET_ID column in S_EVT_ACT table in order to find
the foreign table. Using Tools, you will see ASSET_ID column point to S_ASSET
table.
43/54
Classification: Confidential
Montpellier PSSC
Indeed, in order to correctly enter right values in EIM columns (values pointing
to an existing row in S_ASSET table) to map to a correct foreign key, we need
to understand foreign key mapping:
EIM_ACTIVITY
------------------ACT_AST_BI (Name)
ACT_AST_NUM (Asset number)
ACT_ASTPRDVEN_NAME (Name)
ACT_AST_PRDVEN_BI (Name)
ACT_AST_PRDVEN_LOC (Site)
ACT_AST_PROD_BI (Name)
ACT_AST_PROD_NAME (Name)
ACT_REV_NUM (Rev Num)
S_ASSET
-----------?????????
?????????
?????????
?????????
?????????
?????????
?????????
?????????
EIM_ACTIVITY
S_ASSET
EIM Load
S_EVT_ACT
ASSET_ID
44/54
Classification: Confidential
Point
To Foreign key
Montpellier PSSC
45/54
Classification: Confidential
Montpellier PSSC
46/54
Classification: Confidential
Montpellier PSSC
47/54
Classification: Confidential
Montpellier PSSC
These following screenshots show you the mapping between EIM columns
(Interface table data column) and foreign table S_ASSET (user key attribute)
EIM_ACTIVITY
S_ASSET
Take a glance at user key attribute column. This column indicates you the exact
value to enter in corresponding interface column.
Since a foreign key in a foreign table can point itself to another foreign key and
so on, the search of the right value to enter in foreign key mapping could be so
fastidious. The following section explains you how to resolve foreign key
mappings.
48/54
Classification: Confidential
Montpellier PSSC
1. Go to S_ASSET Table
49/54
Classification: Confidential
Montpellier PSSC
50/54
Classification: Confidential
Montpellier PSSC
51/54
Classification: Confidential
Montpellier PSSC
The join path must be read from the greatest join sequence number to the
lowest join sequence number.
TIP: you find again this order in the name of the user key attribute
PROD_ID
3
VENR_OU_ID
2
BU_ID
1
NAME
0
52/54
Classification: Confidential
Montpellier PSSC
But ACT_AST_PRDVEN_BI column must contain row_id value and not a name
value.
There is a very specific Siebel way to populate such _BI column
(organization column): you must populate the equivalent _BU column with
the name (here it will be ACT_AST_PRDVEN_BU).
You can find the explanation in the next section.
Result:
We must fill in EIM interface column ACT_AST_PRDVEN_BU with the
corresponding value of S_BU.NAME
53/54
Classification: Confidential
Montpellier PSSC
54/54
Classification: Confidential