Beruflich Dokumente
Kultur Dokumente
II.
III.
INFORMATICA
INFORMATICA PRODUCTS: The following are the various products from informatica cooperation.
I.
II.
III.
IV.
V.
VI.
Informatica Cloud
VII.
VIII.
I.
II.
III.
IV.
Repository Service
V.
Integration Service
VI.
INFORMATICA
Power Center Clients: There are four power center client components gets install
I.
II.
III.
IV.
Designer: The designer is a GUI based client component which allows you to
design the plan of ETL processor called Mapping.
A mapping is made up of following metadata definitions
I.
Source
II.
Transformation Rule
III.
Target
Work-Flow Manager: -
II.
III.
Start work-flow
Session: -
Work-flow: A work flow is a top object in the power center development hiarchery to start one (or) more sessions in sequence (or) parallel (or) both.
INFORMATICA
Work-flow Monitor: Its a GUI based client component which monitors the work-flows
and sessions running on integration service.
The work-flow sessions status is displayed as succeed (or) failed.
It allows you to fetch session log from repository.
Steps involving in build data acquisition
i.
ii.
iii.
iv.
v.
Create work-flow
vi.
Start work-flow
Repository Manager: Its a GUI based administrative client component which allows you to
define following tasks
i.
ii.
Folder: -
POWER CENTER REPOSITORY: The power center repository is a relational database that contains
metadata which is required to perform ETL process. There are two types of
repositories
I.
Local Repository
II.
Global Repository
INFORMATICA
Local Repository: The repository that supports to share the metadata within the
repository across multi users.
Global Repository: The metadata can be shared across multiple repositories.
The repository is the brain of ETL system that stores ETL code
(Metadata).
REPOSITORY SERVICE: The repository service manages connections to the power center
repository from client applications.
The repository service is a multi threaded process that inserts,
retrieves, update and delete metadata from repository.
The repository service ensures that there is a consistency of the
metadata stored in the repository.
INFORMATICA
INTEGRATION SERVICE: -
Reader
ii.
iii.
Writer
INFORMATICA
A master gate-way node receives the request from the client and
distributes the request to the other nodes known as worker nodes.
If the master gate-way node fails the user request cannot be
processed.
In a really configurations we configure the domain with more than
one node as master node.
POWER CENTER ADMINISTRATION CONSOLE: It is a web application which allows you to manage power center
domain.
The following administrative tasks can be performed using
administration console
I.
II.
III.
IV.
V.
I.
II.
III.
IV.
Create folder
INFORMATICA
Grant Succeeded.
SQL > CONN Batch 10AM/Target;
Connected
SQL > Create table DIM_EMPLOYEE (EMPNO Number (5) Primary
Key, ENAME Varchar2 (10);
Job Varchar2 (10), Sal Number (7, 2);
COMM Number (7, 2), Dept No Number (2);
INFORMATICA
Table created
CREATION OF ODBC CONNECTIONS: Source ODBC Connection: Start Settings Control Panel Administrative Tools Data Source
(ODBC)
Select a SYSTEM DSN
Click on ADD
Select a driver Oracle in ORADBLOG_HIME
Click on FINISH
Enter the following details
Data Source Name: - SCOTT_ODBC
TNS Service Name: - ORCL
User ID: - SCOTT
Click on Test Connection
Enter the PASSWORD TIGER
Again Click OK
INFORMATICA
Click OK
Power Center Services: Start Settings Control Panel Administrative Tools Services
Start the following Services
I.
II.
Creation of Folder: Start Programs Informatica Power Center 8.6.0 Clients Power
Center Repository Manager
From repository navigator windows select the Repository Name
with NIPUNA_REP Right Click Click on CONNECT
Enter User Name: - ADMINISTRATOR
Password: - ADMINISTRATOR
Click on CONNECT
From FOLDER Menu select CREATE
Enter the folder name: - BATCH 10AM (own wish)
Click OK
INFORMATICA
10
Click on NEXT
Enter the account information to store power center domain configure
metadata
Database Type: - ORACLE
Database URL: - NIPUNA: 1521 (Computer Name: Port No)
Database User ID: - NIPUNA
Database Password: - REP
INFORMATICA
CREATION of POWER CENTER SERVICES: Start Programs Informatica Power Center 8.6.0 Services
Informatica Power Center Administration Console
Enter User Name: - Admin
Password: - Admin
Click on OK
Select Administration Console
11
Click on CREATE
Click on CLOSE
INFORMATICA
12
ii.
INFORMATICA
13
INFORMATICA
Procedure: -
14
INFORMATICA
Click on OK
15
INFORMATICA
Click on OK
Click on Done
Creation of Reader Connection: From Work-Flow Manager client and Select Connections
Click on Relational
Select the type Oracle
Click on New
Enter the following details
Name: - SCOTT_READER (or) READER_SCOTT (Our Wish)
User Name: - SCOTT
Password: - TIGER
Connect String: - ORCL
Click on OK
Creation of Writer Connection: Click on New
16
Value
Relational
SCOTT_READER
INFORMATICA
Value
Relational
BATCH10AM_WRITER
17
From Session sub folder drop the Session beside the start task
(Work-Flow).
From Tasks Menu select Link Task
Drag the Link from start task and drop on Session
From Repository Menu click on SAVE
INFORMATICA
Active Transformation
18
II.
Passive Transformation
ACTIVE TRANSFORMATION: A transformation which can affect the number of rows (or) change
the number of rows when the data is moving from source to target is
known as Active Transformation.
I.
Filter Transformation
II.
Aggregator Transformation
III.
IV.
Joiner Transformation
V.
Union Transformation
VI.
Router Transformation
VII.
Rank Transformation
VIII.
Sorter Transformation
IX.
X.
XI.
Normalizer Transformation
XII.
SQL Transformation
INFORMATICA
PASSIVE TRANSFORMATION: A transformation which doesnt affect (or) change the number of
rows is known as Passive Transformation.
The following are the list of Passive Transformations used for
processing the data
I.
Expression Transformation
II.
III.
IV.
Look-up Transformation
19
V.
VI.
PORTS AND TYPES OF PORTS: A port represents column of the task (or) file. There are two types of
ports
Input Port: -
Output Port: A port which can provide the data is known as Output Port, which is
designated as O.
INFORMATICA
A port which can receive the data is known as Input Port, which is
designated as I.
Lookup Transformation
II.
20
POWER CENTER TRANSFORMATION LANGUAGE: The power center transformation language is a set of built-in
functions used to build transformation logic to process the data.
The Informatica function set is similar to SQL functions.
I.
String Function
II.
Numeric Function
III.
Date Function
IV.
Aggregate Function
V.
Conversion Function
VI.
Cleansing Function
VII.
Variable Function
VIII.
Scientific Function
IX.
Test Function
X.
Miscellaneous Function
INFORMATICA
FILTER TRANSFORMATION: This is of type an Active Transformation which filters the data
records based on given condition.
The integration service evaluates the condition in the filter
transformation, returns True (or) False.
The filter transformation returns True when the input record is
satisfied with given condition those records are allowed for further
processing are loading.
False indicates that the records are rejected from filter
transformation.
The rejected records cannot be captured (or) received.
The filter transformation supports to develop a single condition and
allows you to pass the data to the single target.
The filter transformation functions as WHERE Clause in SQL.
Define the filter transformation to perform data cleansing.
21
Business Rule: Calculate the Tax (Sal*0.17) for top three employees based on
salary, who belongs to sales department, the sales department ID is
30.
II.
III.
IV.
INFORMATICA
RANK TRANSFORMATION: -
Top/Bottom
II.
Number of Ranks
22
Note: - ***
The following are the Cache based Transformations (or) Costly
Transformation
a. Rank Transformation
c. Joiner Transformation
d. Look-up Transformation
e. Aggregate Transformation
EXPRESSION TRANSFORMATION: -
INFORMATICA
b. Sorter Transformation
II.
III.
23
Value
Filter Condition
Dept No: - 30
INFORMATICA
Click on DONE
Click on APPLY
Click on Ok
From Transformation Menu select CREATE
Select the Transformation type RANK
Enter the name RANK_EMPOLYEES (Our Wish)
Click on CREATE
Click on DONE
From Filter Transformation copy the ports to the Rank Transformation
Double click on Rank Transformation select Ports Tab
For a Port name Sal select Rank Port (R)
Select Properties Tab
Transformation Attribute
Value
Top/Bottom
Top
Number of Ranks
Click on APPLY
Click on OK
24
Precision
Scale
Tax
decimal
I/P O/P
Var
-
O
-
Expression
Sal*0.17
Click on OK
From Expression Transformation connect the Ports to the Target.
Mapping Rule: i)
INFORMATICA
Port Name
ii)
Transformation Attribute
Value
Filter Condition
25
ISNULL (COMM) OR
ISNULL (DEPTNO), FALSE, TRUE)
iii)
iv)
INFORMATICA
vi)
Double the count in the target when the source having N records
26
EXPRESSION TRANSFORMATION Variable Port: A port which can store the data temporarily is known as Variable
Port (V).
Mapping Rules: i)
INFORMATICA
Port
Name
Data
Type
Precision
Scale
V_Total
Sal
Decimal
Expression
IIF(ISNULL(COMM)S
AL, SAL+COMM)
V
Decimal
TAX
I O
V
2
O
27
Click on APPLY
Click on OK
ii)
Precisio
n
Scale
Exception_F
lag
String
10
I O V
Expression
IIF((ISNULL(EMPNO
) OR
ISNULL(ENAME) OR
ISNULL(JOB) OR
ISNULL(SAL) OR
ISNULL(COMM) OR
INFORMATICA
Port Name
ISNULL(DEPTNO),
E,C)
Click on APPLY
Click on OK
Create the Transformation type Filter and develop the following
condition
Transformation Attribute
Value
Filter condition
Exception_flag=C
Click on APPLY
Click on OK
Solution: -
28
Data
Type
Expression
YOJ
Decimal
Quarter
Decimal
TO_DECIMAL(TO_CHAR(HIREDATE,
YYYY))
Month
Decimal
Month
Name
String
10
Decimal
Decimal
Decimal
Week
no. in
year
Day no.
in week
Day no.
in
month
Decimal
Decimal
TO_DECIMAL(TO_CHAR(HIREDATE,
MM))
TO_DECIMAL(TO_CHAR(HIREDATE,
MON))
INFORMATICA
Week
no. in
month
TO_DECIMAL(TO_CHAR(HIREDATE,
Q))
TO_DECIMAL(TO_CHAR(HIREDATE,
W))
TO_DECIMAL(TO_CHAR(HIREDATE,
WW))
TO_DECIMAL(TO_CHAR(HIREDATE,
D))
Day no.
in year
TO_DECIMAL(TO_CHAR(HIREDATE,
DD))
TO_DECIMAL(TO_CHAR(HIREDATE,
DDD))
29
ii)
Solution: Port
Name
Data
Type
Expression
COMM
Decimal
SAL+IIF(ISNULL(COMM),0,COMM
)
iii)
INFORMATICA
Solution: -
1, F,
UNK)
Note: - The power center supports following comments to ignore
expressions (or) any text messages while executing on Integration
Service.
--, ||
iv)
Concatenate two string fields such as first name and last name
30
vi)
Solution: -
INFORMATICA
ROUTER TRANSFORMATION: This is a type an Active Transformation which allows you to develop
multiple conditions and allows you to pass the records to the multiple
targets.
The Router Transformation created with two types of groups
I.
Input group
II.
Output group
INPUT GROUP: An Input group receives the data from the source pipe line.
There should be only input group to receive the data.
31
OUTPUT GROUP: An Output group provides the data for further processing (or)
loading.
There are two types of Output groups
User Defined Output group: It allows you to develop condition
INFORMATICA
Each group has one condition all group conditions are evaluated for
each row.
ROUTER
i)
Single condition
i)
Multiple conditions
ii)
Single target
ii)
Multiple targets
iii)
iii)
MAPPING RULES: 32
i)
Correct the data pass through one target and exception data
pass through another target if any record contains NULL value.
That is defined as Exception.
ISNULL (JOB) OR
ISNULL (MGR) OR
ISNULL (HIREDATE) OR
ISNULL (SAL) OR
ISNULL (COMM) OR
ISNULL (DEPTNO), E, C)
Create the Transformation type Router
Double click on the Router Transformation and select groups Tab
From Toolbar Tab click on ADD a new group
Group Name
Correct_Data
Exception_Flag= C
Exception_Data
Exception_Flag= E
Default ONE
Click on APPLY
Click on OK
Select * from EMP_EVEN;
i)
33
Double click on the Router Transformation and select the group Tab
ii)
Group Name
EVEN
MOD(EMP,2)=O
ENAME_A
TRUE
ENAME_S
TRUE
INFORMATICA
SUBSTR (ENAME, 1, 1) = A
SUBSTR (ENAME, 1, 1) = S
SORTER TRANSFORMATION: This is of type Active Transformation which allows you to sort the
data either in ascending order (or) descending order.
The port(s) which is participated in sorting the data is designated
Key Port.
Use the Sorter Transformation to eliminate duplicates hence it is
known as Active Transformation.
Group By
II.
Aggregate Expressions
34
III.
Sorted Input
IV.
Aggregate Cache
I.
Sum()
II.
Average()
III.
Max()
IV.
Min()
V.
Count()
VI.
First()
VII.
Last()
VIII.
Median()
IX.
Variance()
X.
Percentile()
INFORMATICA
35
The Group By ports are sorted using Sorter Transformation, keep the
Sorter Transformation prior to Aggregator Transformation.
Unsorted Aggregator: No rows are released from cache until all rows are aggregated.
The cache size requirements increases, there by load on the
machine increases.
INFORMATICA
36
INFORMATICA
LOOKUP TRANSFORMATION: -
ports
I.
II.
III.
IV.
II.
Connected Lookup
II.
Unconnected Lookup
37
INFORMATICA
Cached Lookup: -
38
Data Type
Precisio
n
Scale
Expression
SUMSAL
Decimal
SUM (SAL)
INFORMATICA
39
Operator
Transformation Port
DEPTNO
DEPTNO1
Click on APPLY
Click on OK
INFORMATICA
JOINER TRANSFORMATION: This is of type an Active Transformation which allows you to combine
the data records horizontal from multiple sources based on join condition.
40
The Integration Service creates the joiner cache for only Master
Source.
The Joiner Transformation is created with the following types of ports
I.
II.
III.
INFORMATICA
II)
41
III)
IV)
It keeps all the records from the Detail Source and matching records
from Master Source.
DETAIL OUTER JOIN: It keeps all the records from the Master Source and matching
records from Detail Source.
INFORMATICA
FULL OUTER JOIN: It keeps matching and non-matching records from both Master and
Detail Sources.
Performance Considerations: o Define the Master Source which can occupy the least amount of
space in cache.
o An Inner Join can improve the performance over an Outer Join
because an Inner Join can result lesser number of records than
Outer Join.
42
DISADVANTAGES: o Can only Join two input data streams per Joiner
o Only supports Equi-Join
o Does not supports OR condition
OPERATOR
DETAIL
DEPTNO1
DEPTNO
43
Create Session
Create Work-Flow
Start Work-Flow
ii)
Output group: - Which sends the data to either target (or) any
other down stream transformation for further processing.
INFORMATICA
Procedure: Create two Source definitions with the name EMP, EMP1 with the
same structure
Create a Target definition with the name EMP_UNION with the same
structure from EMP (or) EMP1
Create a Mapping with the name M_HOMOGENEOUS_UNION
Drag the Sources EMP and EMP1, drop on work space
Drag the Target EMP_UNION, drop on work space
Create a Transformation of type UNION with the name
UNION_EMP_EMP1
Double click on the header of UNION Transformation
Click on Groups Tab and click on ADD a new group (name the Group
as EMP & EMP1)
Click on Group Ports Tab and ADD the following Ports
44
DATATYPE
PRECISION
SCALE
EMPNO
Integer
10
ENAME
String
10
JOB
String
10
MGR
Integer
10
HIREDATE
Date/Time
29
SAL
Decimal
10
COMM
Decimal
10
DEPTNO
Integer
10
Click on APPLY
Click on OK
Connect the Ports from SQ_EMP to EMP group of Union
Transformation
INFORMATICA
PORTNAME
HETEROGENEOUS JOINS: 45
Creation of SQL Server Database: START PROGRAMS MICROSOFT SQL SERVER ENTERPRISE
MANAGER
From left window expand CONSOLE ROOT
Select the DATABASES folder, Right click and click on NEW
DATABASE
INFORMATICA
Procedure: -
46
SP_HELP DEPT
INSERT INTO DEPT VALUES (10, SALES, HYD)
INSERT INTO DEPT VALUES (20, OPERATIONS, CHE)
INSERT INTO DEPT VALUES (30, ACCOUNTS, DEL)
SELECT * FROM DEPT
INFORMATICA
47
Password: - SA
Attribute
Value
Database Name
SCOTTDB
Password
INFORMATICA
User Name: - SA
Click on OK
Creation of Writer connection to Microsoft SQL Server: Procedure: Open the Client Power Center Work-flow Manager
From Connections Menu, select Relational
Select the type Microsoft SQL Server
Click on NEW
Enter the following details to create connection object
Name: - SQL_SERVER_READER (our wish)
User Name: - SA
Password: - SA
Attribute
Value
Database Name
BATCH10AMDB
Password
Click on OK
48
Creation of SQL definition Microsoft SQL Server: From Tools Menu select Source Analyzer
From Sources Menu click on Import from Database
Connect to the database with the following details
ODBC data Source: - BATCH10AM_SQL_SERVER
User Name: - SA
Owner Name: -SA
INFORMATICA
Password: - SA
Click on CONNECT
From Show Owners select ALL
Select the Table
Click on OK
From Repository Menu click on SAVE
Create a Target definition with a name EMP_DEPT (oracle)
Columns list (EMPNO, ENAME, JOB, SAL, DEPTNO, DNAME, LOC)
Create a Mapping with a name M_HETEROGENEOUS_JOIN
Drop the Sources definition on work space
Create the Transformation type JOINER
From SQ_EMP copy the required Ports to the Joiner Transformation
From SQ_DEPT copy the required Ports to the Joiner Transformation
Change the Datatype for a Port Name: - DEPTNO from Integer to
Decimal
Double click on Joiner Transformation and select the Condition Tab
From Toolbar click on ADD a new condition
MASTER
OPERATOR
DETAIL
DEPTNO1
DEPTNO
Click on APPLY
49
Click on OK
From Joiner Transformation connect the ports to the Target definition
From Repository Menu click on SAVE
Create a Session with a name S_M_HETEROGENEOUS_JOIN
Create a Work-flow with a name W_S_M_HETEROGENEOUS_JOIN
Start Work-flow
INFORMATICA
II.
Lookup Transformation
SQL OVER WRITE VERTICAL MERGING: Procedure: Create Source definition EMP (Oracle) and Target definition
EMP_COUNT
Create a Mapping with the name M_SQLOVERWRITE_UNION
Drop the Source and Target definitions on Work Space
From Source Qualifier connect the ports to the Target and select the
Properties Tab
TRANSFORMATION ATTRIBUTE
VALUE
SQL query
50
SQL OVER WRITE SELF JOINS: The Source Qualifier Transformation supports only homogeneous
data sources to perform horizontal merging.
Source Qualifier supports SQL joins such as Inner Join (Equi Join),
Left Outer Join, Right Outer Join and Full Outer Join.
INFORMATICA
Disadvantages of Source Qualifier Join: o It can only join homogeneous relation tables
o It can affect performances on the source database because source
database servers may not be tuned with required buffer sizes.
Procedure: Create Sources with the names EMP (Oracle) and DEPT (Oracle)
Create Target with the name EMP_SQL_JOIN (Oracle)
Column list (EMPNO, ENAME, JOB, SAL, DEPTNO, DNAME, LOC)
Create a Mapping with the name M_SQL_JOIN
Drop the Sources and Target definitions on work space
Select the SQ_DEPT click on DELETE
From DEPT Source definition copy the ports to SQ_EMP
Double click on Source qualifier Transformation and select the
Properties Tab
TRANSFORMATION ATTRIBUTE
VALUE
SQL Query
51
Click on OK
From Source qualifier connect the Ports to the Target
PROPERTIES OF THE SOURCE QUALIFIER: Source filter supports to write conditions to filter the data.
INFORMATICA
I)
IV)
Performance Considerations: Use Sorter Transformation to perform sort rather than using an
order by clause in SQL over ride because the Source database may
not be clowned with required buffer sizes.
V)
Pre Sort: Integration Service executes SQL statements using Source database
connection before it starts extraction.
Post Sort: Integration Service executes SQL statements using Source database
connection after starts extraction.
52
VI)
INFORMATICA
Procedure: -
STORED PROCEDURE TRANSFORMATION: It is of type a Passive Transformation used to call the Procedures
written at database level.
Stored Procedures are reusable.
A Stored Procedure is nothing but a set of SQL statements.
53
Connect to the Target and Create the following procedure: SQL> SHOW USER
INFORMATICA
Target Post-Load: -
54
INFORMATICA
VALUE
CONNECTION INFORMATION
55
BATCH10AM
Click on APPLY
Click on OK
Create a Work-flow with the name W_ S_M_TAXCAL_SP
Start Work-flow
II.
INFORMATICA
FLAT FILES: -
Delimited Flat File: Each column (or) field is separated by some special characters such
as Comma, Tab, Space, Semi-colon, pipe etc.
Ex: - Customer_East.txt
56
Click on NEXT
Click on FINISH
From Repository Menu click on SAVE
INFORMATICA
Value
Direct
C:\Flat File
Customer_East.txt
File List: 57
II.
Ex: - CUSTOMER_EAST.txt
INFORMATICA
58
Note: Source qualifier does not supports to write SQL query in Files,
it supports only in databases
Attributes
Value
Direct
C:\Flat File
CUSTOMER_EAST.txt
INFORMATICA
Creation of Flat File: Open the text editor Notepad provide the path of each source file
C:\Flat File\CUSTOMER_EAST.txt
C:\Flat File\CUSTOMER_SOUTH.txt
C:\Flat File\CUSTOMER_WEST.txt
59
CNO, CNAME,
100, Arun,
2000
Sandy, 2000
104,
101, Anil,
1000
Dusty,
2000
103,
105,
chitti,
2000
INFORMATICA
CUSTOMER_EAST.txt
CUSTOMER_WEST.txt
Value
Indirect
C:\List
LIST.txt
**Rejected Truncated/Over Flow Rows: From Mapping double click on Target definition and select Properties
Tab
60
Transformation Attribute
Value
Click on APPLY
Click on OK
When you Run the Session the Integration Service rejects the
truncated records, it can view by the following directory.
INFORMATICA
EX: - EMPLOYEE.txt
7001VSSNAAYANA450020
7002SIVA
500010
7003SURYA
550030
Note: Fixed Width files improve the performance over Delimited files.
Comma, Tab, Space, Pipe are column character
/n is a record Delimiter character
61
Click on NEXT
Provide the column names for each field
Click on FINISH
Right click on the Source definition and click on Edit
Click on Advance
Set number of bytes to skip between the record : 2
Click on OK
Click on OK
From Repository Menu click on SAVE
From Target to start Work Flow same procedure as Delimited Flat File
INFORMATICA
Click on APPLY
The XML Source qualifier transformation reads the data from XML
files, which are saved with an extension .xml.
Every XML source definition by default associates with XML source
qualifier transformation.
EX: - EMP.xml
<EMP_DETAIL>
<EMP>
<EMPNO> 7001 </EMPNO>
<ENAME> SMITH </ENAME>
<JOB> MANAGER </JOB>
<SAL> 5000 </SAL>
<DEPTNO> 10 </DEPTNO>
</EMP>
<EMP>
62
INFORMATICA
Click on OPEN
Click on YES
Click on OK
Click on NEXT
Select Hierarchy relationships
Select Denormalized XML views
Click on FINISH
From Repository Menu click on SAVE
Transaction Controlled Transformation: This is of type an Active transformation which controls the
transactions bounded by Commit and Rollback.
The transaction controlled transformation functions as TCL
commands (commit, Rollback) in SQL.
63
ii)
i)
TC_COMMIT_AFTER
ii)
TC_COMMIT_BEFORE
iii)
TC_ROLLBACK_AFTER
iv)
TC_ROLLBACk_BEFORE
INFORMATICA
The following are the constant can be used to write condition based
commits
ii)
iii)
Target Based Commit: During Target Based commit Session the Integration Service
commits the Target based on the following factors
i)
64
ii)
Writer Wait Timeout: The amount of time writer waits before it issues a commit.
Configure the write wait timeout in the Integration Service.
iii)
Buffer Blocks: Blocks of memory that holds rows of data during Session.
INFORMATICA
When you run the Target based commit session the Integration
Service may issue a commit BEFORE, ON and AFTER the given
commit interval.
When the writer buffer block fills the Integration Service issues
a commit.
ii)
Source Based Commit: The Integration Service commits the data to Target Based on
number of rows from Active Source (i.e., Source Qualifier)
Case: -1)
You have a Source Based commit session that passes 10,000
records from active source.
When the 10,000 records reach the Target the Integration Service
issues a commit.
If the Session completes successfully then Integration Service issues
a commit at 10,000, 20,000, and 30,000, so on.
Case: -2)
65
Value
INFORMATICA
Click on APPLY
Click on OK
From Transaction Controlled transformation connect the ports to the
Target
Create a Session with the name S_M_USERDEFINED_COMMIT
Set Writer and Reader connections
Create the Work Flow with the name W_S_M_USERDEFINED_COMMIT
Start Work Flow
Note: Target Based Commit session improves the session performance
then Source Based Commit Session.
66
When you run the Source Based Commit Session the Integration
Service identifies the two Active Sources to issues the Commit.
For T1 Active Source is SQ_EMP and for T2 Active Source is
Aggregator transformation.
Normalizer transformation: -
INFORMATICA
Procedure: -
67
Creation of Target definition: Create a Target definition with the name T_ACCOUNT
(YEAR, ACCOUNT, MONTH, AMOUNT)
Create a Mapping with the name M_DATE_POINT
OCCURS
DATA TYPE
PRECISION
SCALE
Year
Number
Account
String
10
Amount
Number
10
INFORMATICA
Click on APPLY
Click on OK
From Source qualifier connect the Ports to Normalizer transformation
From Normalizer transformation connect the Ports to Target
[GCID_AMOUNT Month]
GCID generated column ID
GK generated key
SEQUENCE GENERATOR TRANSFORMATION: This is of type a Passive transformation which generates Numeric
values.
The Numeric values are defined as Primary keys.
68
NEXTVAL
ii)
CURRVAL
INFORMATICA
End Value: The End value is the maximum value you want the Integration
Service generate.
If the Integration Service reaches the end value and Sequence
generator is not configure to cycle then session fails with an error
message (Over flow error).
Increment By: Difference between two consecutive values from Nextval port.
69
INFORMATICA
Start Value: Start value after the generated sequence if you select cycle.
Reset: If reset is enable the Integration Service generates the values based
on original current values for each session.
Otherwise Integration Service updates the current value to the last
value generated +1.
Note: - The default value for a standard Sequence generator is zero for
number of cache values.
Cyclic Loading (Round Robin Loading): Exercise: First record to first Target, second record to second Target, third
record to third Target and fourth record to fourth Target and so on.
70
Transformation Value
Value
Start Value
Increment Value
Cyclic
INFORMATICA
Group Name
T1
Nextval=1
T2
Nextval=2
T3
Nextval=3
Click on APPLY
Click on OK
From Repository Menu click on SAVE
71
INFORMATICA
Design a Mapping which can pass Even number rows to one Target and
Odd number rows to one Target
72
UPDATE STRATEGY TRANSFORMATION: This is of type an Active transformation which flags the source
records for INSERT, UPDATE, DELETE and REJECT the rows to define data
driven operations.
INFORMATICA
ii)
Update Strategy in Mapping Level: When you want the Integration Service to perform multiple database
operations on Target then we use an Update Strategy transformation at
mapping level.
73
ii.
DD_UPDATE 1
iii.
DD_DELETE 2
iv.
DD_REJECT 3
INFORMATICA
i.
Treat Source Rows As: DELETE: The Integration Service performs only delete operations on the
target based on key constraint.
Treat Source Rows As: DATA DRIVEN: The Integration Service follows the instructions coded in update
strategy transformation in mapping.
INFORMATICA
75
Operator
Transformation Port
EMPNO
EMPNO1
Value
Connection Information
BATCH 10AM
INFORMATICA
Click on APPLY
Click on OK
Create Transformation type Expression
From Source qualifier copy the required ports to the Expression
transformation
From Lookup transformation copy the port EMPKEY to Expression
transformation
Double click on Expression transformation and select the Ports Tab
From Toolbar click on ADD a new port
Port Name
Data type
Expression
Insert_Flag
String
10
76
Insert_Flag
Insert_Flag = TRUE
Update_Flag
Update_Flag = FALSE
Click on OK
Insert Flow: Create Transformation type Sequence generator and Update
Strategy
INFORMATICA
Click on APPLY
Value
DD_INSERT (or) 0
Value
77
DD_INSERT (or) 1
Mapping Logic: -
INFORMATICA
ii)
iii)
78
INFORMATICA
Operator
Transformation Port
EMPNO
EMPNO1
Value
SELECT
OUT.EMPKEY AS EMPKEY,
OUT.EMPNO AS EMPNO,
OUT.ENAME AS ENAME,
OUT.JOB AS JOB,
OUT.SAL AS SAL,
OUT.DEPTNO AS DEPTNO,
79
OUT.VERSION AS VERSION
FROM DIM_EMPLOYEE_TYPE2 OUTWHERE
OUT.EMPKEY=
(SELECT MAX (INN.EMPKEY) FROM
DIM_EMPLOYEE_TYPE2
INN WHERE INN.EMPNO=OUT.EMPNO
BATCH10AMDB
INFORMATICA
Connection
Information
Click on APPLY
Click on OK
Dataty
pe
Expression
INSERT_FLA
G
String
10
String
10
UPDATE_FL
AG
80
INSERT_FLAG
INSERT_FLAG=TRUE
UPDATE_FLAG
UPDATE_FLAG=TRUE
Insert Flag: -
Dataty
pe
Expression
Version
Decim
al
INFORMATICA
Click on APPLY
Click on OK
From Expression transformation copy the Ports to Update Strategy
transformation and develop the following expression DD_INSERT
From Update Strategy transformation connect the Ports to the Target
definition
From Sequence Generator transformation connect the Nextval Port
to the Target definition (EMPKEY)
Update Flag as Insert: Create the Transformation type Expression, Update Strategy
From Router transformation, from Update group copy the following
Ports to Expression transformation [EMPNO3, ENAME3, JOB3, SAL3,
DEPTNO1 and VERSION3]
Double click on Expression transformation select Ports Tab
Uncheck the Output Port for a port name VERSION3
81
Dataty
pe
Expression
Version
Decim
al
VERSION3+1
Click on APPLY
Click on OK
INFORMATICA
82
OPERATOR
TRANSFORMATION
PORT
EMPNO
EMPNO1
VALUE
SELECT
OUT.EMPKEY AS EMPKEY,
OUT.EMPNO AS EMPNO,
OUT.ENAME AS ENAME,
OUT.JOB AS JOB,
OUT.SAL AS SAL,
OUT.DEPTNO AS DEPTNO,
83
OUT.START_DATE AS START_DATE,
OUT.END_DATE AS END_DATE
FROM EMPLOYEE_TYPE2 OUTWHERE
OUT.EMPKEY=
(SELECT MAX (INN.EMPKEY) FROM
EMPLOYEE_TYPE2
Connection Information
BATCH10AMDB
Click on APPLY
Click on OK
INFORMATICA
INN WHERE
INN.EMPNO=OUT.EMPNO
Dataty
pe
Expression
INSERT_FLA
G
String
10
String
10
UPDATE_FL
AG
Click on APPLY
Click on OK
Create the Transformation type Router
84
Group Name
INSERT_FLAG
INSERT_FLAG=TRUE
UPDATE_FLAG
UPDATE_FLAG=TRUE
Insert Flow for New Record: Create the Transformation type Expression, Update Strategy and
Sequence Generator
From Router transformation, from Insert group copy the following
Ports to Expression transformation [EMPNO1, ENAME1, JOB1, SAL1, and
DEPTNO1]
INFORMATICA
Datatyp
e
Expression
Start_Date
Date/Ti
me
29
SYSDATE
Click on APPLY
Click on OK
From Expression transformation copy the Ports to Update Strategy
transformation
From Update Strategy transformation connect the Ports to the Target
definition
From Sequence Generator transformation connect the Nextval Port
to the Target definition (EMPKEY)
Update as Insert Flow: Create the Transformation type Expression, Update Strategy
85
Port Name
Datatyp
e
Expression
Start_Date
Date/Ti
me
29
SYSDATE
Click on APPLY
Click on OK
From Expression transformation copy the Ports to Update Strategy
transformation
INFORMATICA
Datatyp
e
Expression
End_Date
Date/Ti
me
29
Click on APPLY
Click on OK
From Expression transformation copy the Ports to Update Strategy
transformation
86
VALUE
DD_UPDATE (or) 1
INFORMATICA
11.
12.
Scheduling Workflow
13.
14.
PMCMD Utility
87
PMREP Utility
16.
17.
18.
19.
20.
Session Recovery
21.
22.
23.
INFORMATICA
15.
Named Cache
ii.
Unnamed Cache
24.
25.
Mapping Debugger
26.
27.
28.
29.
30.
31.
Session Partitioning
32.
UNCONNECTED STORED PROCEDURE: An Unconnected Stored Procedure is not part of mapping data flow
It is neither connected to the Source nor connected to the Target
88
INFORMATICA
Creation of Target definition: Open SQL PLUS, LOGON to user account BATCH10AM/TARGET
SQL> Create table EMP_TRGT as select * from SCOTT.EMP WHERE
1=2;
SQL> Select INDEX_NAME from USER_INDEXES WHERE TABLE_NAME
= EMP_TRGT;
SQL> Create Index EMP_IDX on EMP_TRGT (EMPNO);
Index Created;
Import the Target table using target designer tool
Create the following Stored Procedure in the account BATCH10AM
i)
89
BEGIN
EXECUTE IMMEDIATE
Drop Index ||V_INDEX_NAME;
END;
/ (PRESS ENTER)
ii)
V_TABLE_NAME in Varchar2,
V_COL_NAME in Varchar2,
V_TABLE_NAME in Varchar2
)
INFORMATICA
AS
BEGIN
EXECUTE IMMEDIATE
Create Index ||V_INDEX_NAME|| ON ||V_TABLE_NAME||(||
V_COL_NAME||);
END;
/ (PRESS ENTER)
Create a Mapping with the name
M_EMPLOYEE_DROP_CREATE_INDEX
Drop the Source and Target definitions on Work Space
Create Transformation type Stored Procedure
Enter the name SP_DROP_INDEX which call the Procedure with the
name EMP_DROP_INDEX
Click on CREATE
Connect the database with the following details
90
INFORMATICA
Click on DONE
TRANSFORMATION ATTRIBUTE
VALUE
Call Text
EMP_DROP_INDEX (EMP_IDX)
Connection Information
BATCH10AMDB
Click on APPLY
Click on OK
Double click on Stored Procedure Transformation with the name
SP_CREATE_INDEX
Select the Properties Tab
TRANSFORMATION
ATTRIBUTE
VALUE
Stored Procedure
Type
Call Text
91
Connection
Information
BATCH10AMDB
Click on APPLY
Click on OK
From Repository Menu click on SAVE
Create Session with the name S_M_
EMPLOYEE_DROP_CREATE_INDEX
INFORMATICA
92
/ (PRESS ENTER)
Create a Source definition with the name EMP
Create a Target definition with the name EMP_USP
[TOTSAL, TAX, HRA, EMPNO, ENAME, JOB, SAL, DEPTNO]
Create a Mapping with the name M_UNCONNECTED_PROC
Drop the Source and Target definitions on Work Space
Create the Transformation type Stored Procedure and Expression
DATA TYPE
EXPRESION
V_TAX
Decimal
V_TAX
V_HRA
Decimal
V_HRA
TOTAL SAL
Decimal
TAX
Decimal
:SP.USP (EMPNO,PROC_RESULT,
V_TAX, V_HRA)
HRA
Decimal
INFORMATICA
V_TAX
V_HRA
Click on APPLY
Click on OK
From Expression transformation connect the required Ports to the
Target
From Repository Menu click on SAVE
93
Connected Lookup
i)
ii)
Returns multiple
values (by linking
output ports to
another
transformation)
iii)
iv)
v)
Unconnected Lookup
i)
ii)
iii)
INFORMATICA
iv)
v)
BUSINESS PURPOSE: A Source table (or) File may have a percentage of records with
incomplete data. The holes in the data can be filled by performing a
lookup to another table (or) tables. As only a percentage of the rows are
affected it is better to perform the lookup on only those rows that need it
and not the entire data set.
94
INFORMATICA
DATA TYPE
IN_EMPNO
Decimal
OPERATOR
TRANSFORMATION
PORT
EMPNO
IN_EMP
VALUE
95
Connection Information
SCOTTDB
Click on APPLY
Click on OK
Create the Transformation type Expression
From Source Qualifier copy the following Ports to the Expression
Transformation
[EMPNO, ENAME, JOB, SAL, COMM, DEPTNO]
Dataty
pe
Expression
O_COMM
Decim
al
INFORMATICA
Click on APPLY
Click on OK
From Expression Transformation connect Ports to the Target
From Repository Menu click on SAVE
MAPPLET AND TYPES OF MAPPLETS: A Mapplet is a reusable object create with business logic using set of
transformations
A Mapplet is created using mapplet designer tool in the designer
client component
There are two types of Mapplets
i)
ii)
Passive Mapplet: -
96
Mapplet Limitations: -
i)
ii)
iii)
INFORMATICA
97
Port Name
EMPNO
ENAME
JOB
SAL
COMM
DEPTNO
Click on APPLY
VALUE
Filter Condition
INFORMATICA
Click on OK
DATA
TYPE
Decimal
Decimal
EXPRESSION
7
7
2
2
V
-
SAL+ COMM
IIF (TOTAL SAL>3000,
TOTAL SAL*0.25, TOTAL
SAL*0.15)
Click on APPLY
Click on OK
From Expression transformation copy the Ports to the Sorter
transformation
Define the KEY on Port name TAX
From Sorter transformation copy the port to Mapplet Output
98
REUSABLE TRANSFORMATION: -
ii)
INFORMATICA
99
The default value for number of cached values property is zero for a
Standard Sequence Generator Transformation
For a Reusable Sequence Generator the default value for number of
cached value property is 1,000
Method-2: USING TRANSFORMATION DEVELOPER TOOL: From Tools Menu select Transformation developer
INFORMATICA
100