You are on page 1of 18

Informatica PowerCenter

Transformations

Prasad Shenwai
Enterprise BI Consultant
Oracle Center of Excellence (CoE)
Application Managed Services (AMS)
Global Business Services (GBS)
Contents

I. OVERVIEW 03
II. SOURCE QUALIFIER 04
III. LOOKUP 06
IV. SEQUENCE GENERATOR 09
V. UPDATE STRATEGY 11
VI. ROUTER 13
VII. AGGREGATOR 15
VIII. NAMING CONVENTIONS 17

10/12/2018 2:28 AM 2
Overview
A transformation is a repository object that generates, modifies, or passes data. The Designer
provides a set of transformations that perform specific functions. For example, an Aggregator
transformation performs calculations on groups of data.

Transformations can be. active or passive.

Active Transformations
An active transformation can perform any of the following actions:
• Change the number of rows that pass through the transformation.
• Change the transaction boundary.
• Change the row type.

Passive Transformations
A passive transformation does not change the number of rows that pass through the transformation,
maintains the transaction boundary, and maintains the row type.

10/12/2018 2:28 AM 3
Source Qualifier
When you add a relational or a flat file source definition to a mapping, you need to connect it to a
Source Qualifier transformation. The Source Qualifier transformation represents the rows that the
Integration Service reads when it runs a session.

• Join data originating from the same source database.


• Filter rows when the .Integration Service reads source data.
• Specify an outer join rather than the default inner join.
• Specify sorted ports.
• Select only distinct values from the source.
• Create a custom query to issue a special SELECT statement for the Integration Service to read
source data.

10/12/2018 2:28 AM 4
Source Qualifier – Transformation Properties
Configure the following Source Qualifier transformation properties on the Properties tab:

10/12/2018 2:28 AM 5
Lookup
Use a Lookup transformation in a mapping to look up data in a flat file, relational table, view, or
synonym. Perform the following tasks with a Lookup transformation:

• Get a related value. Retrieve a value from the lookup table based on a value in the source.
For example, the source has an employee ID. Retrieve the employee name from the lookup table.
• Get multiple values.. Retrieve multiple rows from a lookup table.
For example, return all employees in a department.
• Perform a calculation. Retrieve a value from a lookup table and use it in a calculation.
For example, retrieve a sales tax percentage, calculate a tax, and return the tax to a target.
• Update slowly changing dimension tables. Determine whether rows exist in a target.

10/12/2018 2:28 AM 6
Connected vs Unconnected Lookup

10/12/2018 2:28 AM 7
Lookup Configuration
Define the following components when you configure a Lookup transformation in a mapping:
• Lookup Source - Use a flat file, relational table, or source qualifier for a lookup source.
• Ports - The Ports tab contains input and output ports. The Ports tab also includes lookup ports
that represent columns of data to return from the lookup source.
• Properties - Lookup.SQL Override, Lookup Source Filter, Lookup Caching Enabled,
Connection Information
• Condition - When you configure a lookup condition in a Lookup transformation, you compare
the value of one or more columns in the source data with values in the lookup source or cache.

10/12/2018 2:28 AM 8
Sequence Generator
The Sequence Generator transformation generates numeric values.

You can complete the following tasks with a Sequence Generator transformation:
• Create keys.
• Replace missing values.
• Cycle through a sequential range of numbers.

The Sequence Generator transformation is unique among all transformations because you cannot add, edit, or delete
the default ports, NEXTVAL and CURRVAL.

10/12/2018 2:28 AM 9
Sequence Generator – Transformation Properties

10/12/2018 2:28 AM 10
Update Strategy
In PowerCenter, you set the update strategy at two different levels:
• Within a session - When you configure a session, you can instruct the Integration Service to either treat all rows
in the same way (for example, treat all rows as inserts), or use instructions coded into the session mapping to flag
rows for different database operations.
• Within a mapping - Within a mapping, you use the Update Strategy transformation to flag rows for insert, delete,
update, or reject.

10/12/2018 2:28 AM 11
Update Strategy - Configuration
Configuration Steps for using Update Strategy within a Mapping:

1. Add an Update Strategy transformation to the mapping.


2. When you write the transformation update strategy expression, use either the DECODE or IIF function to flag
rows for different operations (insert, delete, update, or reject).
3. When you configure a session that uses this mapping, select Data Driven for the Treat Source Rows As
session property.
4. Define the following update strategy target table options:
• Select Insert
• Select Update as Update
• Do not select Delete

10/12/2018 2:28 AM 12
Router
A Router transformation is similar to a Filter transformation because both transformations allow you to use a
condition to test data. A Filter transformation tests data for one condition and drops the rows of data that do not
meet the condition. However, a Router transformation tests data for one or more conditions and gives you the
option to route rows of data that do not meet any of the conditions to a default output group.

10/12/2018 2:28 AM 13
Router - Configuration
A Router transformation consists of input and output groups, input and output ports, group filter conditions, and
properties that you configure in the Designer.

The Integration Service passes the row to the default group if all of the conditions evaluate to FALSE. If this happens,
the Integration Service passes the data of the other six countries to the transformation or target that is associated
with the default group. If you want the Integration Service to drop all rows in the default group, do not connect it to a
transformation or a target in a mapping.

10/12/2018 2:28 AM 14
Aggregator
The Aggregator transformation performs aggregate calculations, such as averages and sums.

The Aggregator transformation is unlike the Expression transformation, in that you use the Aggregator
transformation to perform calculations on groups. The Expression transformation permits you to perform
calculations on a row-by-row basis.

When you use the transformation language to create aggregate expressions, you can use conditional clauses to
filter rows, providing more flexibility than SQL language.

10/12/2018 2:28 AM 15
Aggregator – Configuration
Nested Aggregate Functions
You can include multiple single-level or multiple nested functions in different output ports in an Aggregator transformation.
However, you cannot include both single-level and nested functions in an Aggregator transformation. If you need to
create both single-level and nested functions, create separate Aggregator transformations.

Conditional Clauses
Use conditional clauses in the aggregate expression to reduce the number of rows used in the aggregation. The
conditional clause can be any clause that evaluates to TRUE or FALSE.
For example, use the following expression to calculate the total commissions of employees who exceeded their
quarterly quota:
SUM( COMMISSION, COMMISSION > QUOTA )

Null Values in Aggregate Functions


You can choose to treat null values in aggregate functions as NULL or zero. By default, the Integration Service treats null
values as NULL in aggregate functions.

Group By Ports
The Aggregator transformation lets you define groups for aggregations, rather than performing the aggregation
across all input data. For example, rather than finding the total company sales, you can find the total sales
grouped by region.

10/12/2018 2:28 AM 16
Naming Conventions

• Mapping – m_MappingName

• Mapplet - mplt_MappletName

• Session - s_SessionName

• Worklet - wl_WorkletName

• Workflow - wf_WorkflowName

10/12/2018 2:28 AM 17
Thank You

You might also like