Powered By Blogger

Tuesday, May 24, 2011

Transformations-Basics

1.Joiner Transformation

Joiner Transformation is an Active and Connected transformation. This can be used to join two sources coming from two different locations or from same location. For example, to join a flat file and a relational source or to join two flat files or to join a relational source and a XML source.

In order to join two sources, there must be atleast one matching port. at least one matching port. While joining two sources it is a must to specify one source as master and the other as detail.


The Joiner transformation supports the following types of joins:


1)Normal

2)Master Outer

3)Detail Outer

4)Full Outer


Normal join discards all the rows of data from the master and detail source that do not match, based on the condition.


Master outer join discards all the unmatched rows from the master source and keeps all the rows from the detail source and the matching rows from the master source.


Detail outer join keeps all rows of data from the master source and the matching rows from the detail source. It discards the unmatched rows from the detail source.


Full outer join keeps all rows of data from both the master and detail sources.


2.Lookup transformation is Passive and it can be both Connected and UnConnected as well. It is used to look up data in a relational table, view, or synonym. Lookup definition can be imported either from source or from target tables.

For example, if we want to retrieve all the sales of a product with an ID 10 and assume that the sales data resides in another table. Here instead of using the sales table as one more source, use Lookup transformation to lookup the data for the product, with ID 10 in sales table.


Connected lookup receives input values directly from mapping pipeline whereas

UnConnected lookup receives values from: LKP expression from another transformation.


Connected lookup returns multiple columns from the same row whereas

UnConnected lookup has one return port and returns one column from each row.


Connected lookup supports user-defined default values whereas

UnConnected lookup does not support user defined

3.XML Source Qualifier Transformation

XML Source Qualifier is a Passive and Connected transformation.

XML Source Qualifier is used only with an XML source definition.

It represents the data elements that the Informatica Server reads when it executes a session with XML sources.

4.Stored Procedure Transformation

Stored Procedure transformation is a Passive and Connected & UnConnectedtransformation. It is useful to automate time-consuming tasks and it is also used in error handling, to drop and recreate indexes and to determine the space in database, a specialized calculation etc.


The stored procedure must exist in the database before creating a Stored Procedure transformation, and the stored procedure can exist in a source, target, or any database with a valid connection to the Informatica Server. Stored Procedure is an executable script with SQL statements and control statements, user-defined variables and conditional statements.


Note:
Differences between Advanced External Procedure and External Procedure Transformations:

1) External Procedure returns single value,

whereas

Advanced External Procedure returns multiple values.


2) External Procedure supports COM and Informatica procedures

whereas

Advanced External Procedure supports only Informatica Procedures.

Source Qualifier Transformation

Source Qualifier transformation is an Active and Connected transformation. When adding a relational or a flat file source definition to a mapping, it is must to connect it to a Source Qualifier transformation.


The Source Qualifier performs the various tasks such as

Overriding Default SQL query,

Filtering records;

join data from two or more tables etc.

No comments: