WorkFlow:
Mappings are run in workflow, several parallel or sequential combinations of sessions
and each session is mapped to a mapping, below is the pictorial representation of how a
WorkFlow will look like.
WorkFlow is built using WORKFLOW MANAGER Component.
Simple Project:
1. ALTER USER HR ACCOUNT UNLOCK;
GRANT DBA TO HR;
ALTER USER HR IDENTIFIED BY oracle;
2. CREATE USER TARGET IDENTIFIED BY oracle;
GRANT DBA TO TARGET;
3. Copy DDL of EMPLOYEES and DEPARTEMENTS table from HR schema and
create them in TARGET schema without any data.
4. Create ODBC sources for both HR and TARGET using Administrative tools.
We will use Oracle Driver provided by Informatics while creating ODBC
datasource. (oracle 6.1 datawire protocol)
DATA SOURCE NAME: HR
HOSTNAME: localhost
PORT: 1521
SID: oracle
DATA SOURCE NAME: TARGET
HOSTNAME: localhost
PORT: 1521
SID: oracle
Components:
Task Developer: Not Required for this Project
Worklet Designer: Not Required for this Project
Workflow Designer:
We create a workflow with name wf_EMPLOYEES we will automatically get a start
button as shown below.
Then we create a Task, Task are of different types like session , email etc.
For this Project we will create a Session task with name s_EMPLOYEES.
8. When we create a Session Task with name s_EMPLOYEES it will show us all the
mappings that are available in under this project folder.
Currently we have only m_EMPLOYEES mapping , so we select that.
And then link the START button to this session task s_EMPLOYEES as shown
below.
10. In session properties we provide Source and Target connection details and also
can change other properties as shown below.
11. Next we run the session and we can monitor the session using workflow monitor.
As soon as we run the session it automatically opens workflow monitor.
SESSION PROPERTIES:
FAIL PARENT
Parent of a session is a WORKFLOW, so if session fails we can fail
workflow. (General tab)
WRITE COMPATIBLE LOG
By Default Infromatica creates log in .bin format, we can create in .txt
format by using this option. (Properties tab)
BULK VS NORMAL
BULK load is faster but it has some pre-requisites like target table must not
have any constraints , indexes etc. (Mapping tab)
SAVE SESSION LOG
Save session logs for how many runs, like 5 runs , 10 runs etc. We must not
give much runs.(Config Object tab)
PRE-POST SQL
This applies to both source and target , like drop some index before load
and later create again etc. (Mapping tab)
EMAIL
Email can be sent before starting a session, after the session is completed
ot failure. We can write some operating system commands before and after
session etc. (Components tab)
STOP ON ERROR:
By default it is 0, but good practice is to set it to 1.
If Stop on Error is 0, it will ignore all error and load all good data and
ignore bad data.
If Stop on error is 1, session will fail for the first error and will not load
anything. (Config Object tab)
COMMIT INTERVAL:
By default value is set to 10000, That means if we have more number of
records target will be committed every 10000 recods.
So if we query from target we see changes only after 10K records are
committed. We increase this value. (Properties tab)
TRUNCATE TARGET TABLE OPTION:
It will truncate the target table, useful in staging env where we are loading
data from production daily. Only thing to note as user must have truncate
previlage. (Mapping tab)
LINK CONDITIONS in workflow for a session:
We can specify any number of link conditions between n number of sessions.
There can be many branches between the sessions as shown below.
The Link condition can be specified with various available properties like Session
SUCCEEDED or FAILED, Session row count > o or <30 etc.
if there are multiple links on a session we can specify the AND , OR notation on that link.
TRANSFORMATION
ACTIVE vs PASSIVE Transformation:
Active Transformation:
Number of records will change.
Passive Transformation:
Number of records will not change.
1. EXPRESSION TRANSFORMATION: