You are on page 1of 26

Cloud Mapping Designer

- Transformations

Ajay Bhosal

Scalolearn Services Pvt. Ltd.


Agenda
• Define Transformation
• Explain various types of transformations
• Describe Mapplets
• Use a Mapplet in Mapplet transformation
• Use Query in a Mapping

Scalolearn Services Pvt. Ltd.


IICS Transformations

Scalolearn Services Pvt. Ltd.


What is a Transformation?
Prerequisites
A transformation is a mapping object that modifies the data in the mapping or passes
it on to the next step of the mapping.
In IICS, a transformation can be of two types:
 Active Transformation
• An active transformation changes the number of rows that pass through it.
• Example: Filter Transformation

 Passive Transformation
• A passive transformation does not change the number of rows that pass through it.
• Example: Expression Transformation

Scalolearn Services Pvt. Ltd.


Transformations Overview
Prerequisites
Transformation Name Description

Source Transformation Used to read data from a source.

Target Transformation Used to write data to a target.

Rank Transformation Used to limit records to a top or bottom range.

Data Masking Transformation Used to mask sensitive data as realistic test data for non-production
environments.
Union Transformation Used to merge data from multiple input groups into a single output group.

SQL Transformation Used to call a stored procedure or function or execute a query against a
database.
Joiner Transformation Used to join data from two sources.

Sorter Transformation Used to sort data in ascending or descending order, according to a specified
sort condition.
Router Transformation Used to apply a condition to incoming data.

Scalolearn Services Pvt. Ltd.


Filter Transformation
Prerequisites
• The Filter transformation filters data from the data flow depending upon the
specified filter condition(s).
• A filter condition is an expression that returns either a TRUE or a FALSE value.
• When the filter condition returns a TRUE value for a row, the transformation passes
the row to the rest of the data flow.
• If the filter condition returns a FALSE value, the row is dropped from the flow.

Scalolearn Services Pvt. Ltd.


Filter Transformation
Prerequisites
In IICS, you can apply two types of filters in a mapping:
 Simple Filter
•A simple filter condition includes a field name, a comparison operator, and a value.
•When you define multiple simple filter conditions in a mapping, the task evaluates the conditions in
the specified order and evaluates the filter conditions using the AND logical operator.
•The task returns the rows that match all the filter conditions.

 Advanced Filter
• Use an advanced filter condition to define complex expressions.
• When you configure a complex expression, you can incorporate multiple conditions using the AND or
the OR logical operators.

Scalolearn Services Pvt. Ltd.


Expression Transformation
Prerequisites
An Expression transformation is a passive transformation that allows you to create new
fields within the mapping.
There are two types of fields in IICS:
 Expression Field
•Defines the calculations that you perform on an incoming field and acts as the output field for
results.
• You can use the field in the data flow.

 Variable Field
• Holds a variable in the expression.
• You can use this field to store data temporarily, compare values, or to simplify complex expressions.
• A variable field is not available for use in downstream data flow.
Scalolearn Services Pvt. Ltd.
Union v/s Join

Scalolearn Services Pvt. Ltd.


Comparision
Prerequisites
Requirement Union Transformation Joiner Transformation
Remove duplicate rows No. Use a Filter transformation Yes
downstream to remove duplicates.

Combine records based No. The Union Transformation is Yes. The Joiner transformation supports
on a join condition equivalent to a UNION ALL statement Normal, Right Outer, Left Outer, and Full Outer
in SQL, which combines data vertically JOINs.
from multiple sources.

Include multiple input Yes. You can define multiple input Yes. You can define two input groups, Master
groups groups and one output group. and Detail.

Merge different data All the source columns must have At least one column in the sources to be
types similar data types. The number of joined must have the same data type.
columns in each source must be the
same.

Generate transactions No Yes

Scalolearn Services Pvt. Ltd.


Demo:
Using Query in a Mapping

Scalolearn Services Pvt. Ltd.


Lookup, Aggregation and Normalization

Scalolearn Services Pvt. Ltd.


Lookup Transformation
Prerequisites
• The Lookup transformation allows you to perform a lookup on relational tables, flat
files, and views.
• To use a lookup transformation, you need to define the lookup object, lookup
connection, lookup condition, and the return values.
• You must also specify how the lookup will behave if multiple matches are found
during lookup.
• You can use the following two types of Lookups in IICS:
 Connected Lookup: It receives source data directly from the mapping pipeline, performs a
lookup, and returns data.
 Unconnected Lookup: This type of lookup is neither connected to the source nor to the target.
You can use this transformation when you want the lookup to return only one value.

Scalolearn Services Pvt. Ltd.


Aggregator Transformation
Prerequisites
• The Aggregator transformation is an active transformation that allows you to
perform aggregate calculations, such as averages and sums on a group of data.
• To define how to group data for aggregate expressions, you can use the Group By
fields in the Group By tab of the Aggregate transformation’s Properties panel.

Scalolearn Services Pvt. Ltd.


Normalizer Transformation
Prerequisites
• The Normalizer transformation is an active transformation that transforms one incoming row into
multiple output rows.
• When the Normalizer transformation receives a row that contains multiple-occurring data, it returns
a row for each instance of the multiple-occurring data.
• When you configure a Normalizer transformation, you must define the Normalized Field.
What is a Normalized Field?
These are the fields that occur multiple times and hold different data values for a single row. For
multiple occurring fields, you must set the Occurs value to an integer greater than 1 for that field.

Scalolearn Services Pvt. Ltd.


Normalizer Transformation
Prerequisites
The Normalizer transformation generates key values for normalized data that appears
on the Normalized Fields tab for multiple occurring fields.
The mapping task generates the following fields for normalized data:
 Generated Key
 Generated Column ID

Generated Key
• A key value that the task generates each time it processes an incoming row.
• When the task starts, the generated key value is set to 1. As more rows are processed, the
generated key value increments by one.
• The naming convention for the Normalizer generated key is GK_<redefined_field_name>.

Scalolearn Services Pvt. Ltd.


Normalizer Transformation
Prerequisites
Generated Column ID
• A column ID is a value that represents the instance number of the multiple occurring fields.
• You can see the occurrence number in the Field Mapping tab of Normalizer transformation.
• For example, in the below image, the task uses values 1 through 4 to represent each occurrence
of the Quarter field.
• The naming convention for the Normalizer generated key is GCID_<redefined_field_name>.

Scalolearn Services Pvt. Ltd.


Demo:
Using Normalizer, Aggregator
and Rank transformations in a
Mapping

Scalolearn Services Pvt. Ltd.


Demo:
Using Unconnected Lookup
transformation in a mapping

Scalolearn Services Pvt. Ltd.


Mapplets

Scalolearn Services Pvt. Ltd.


Mapplet Overview
Prerequisites
• A mapplet is a reusable transformation logic that you can use to transform source
data before loading it to the target.
• You can use the Mapplet Designer to create or upload a mapplet exported from
PowerCenter.
• Once the mapplet is created, you can add it to a Mapplet transformation to use its
transformation logic.
• To use a mapplet in a Mapplet transformation, you must configure the mapplet
input and output.

Scalolearn Services Pvt. Ltd.


Mapplet Overview
Prerequisites
Mapplet Input
• Mapplet input can be an Input transformation, a Source transformation, or both.
• You must use an Input transformation when you want the mapplet to receive input data from
one or more upstream transformations.
• You include one or more Source transformations in a mapplet to provide source data.
Mapplet Output
• Mapplet output can be an Output transformation, a Target transformation, or both.
• You must use an Output transformation when you want the mapplet to pass data to one or
more downstream transformations.
• You must use the Target transformation when you want the mapplet to write data to a target.

Scalolearn Services Pvt. Ltd.


Mapplet Transformation
Prerequisites
• The Mapplet transformation inserts a mapplet into a mapping or into another
mapplet.
• Every Mapplet transformation can contain one mapplet.
• To use multiple mapplets in a mapping, you can add multiple Mapplet
transformations to the mapping.
• You can use the Mapplet transformation to accomplish the following goals:
 Extend the data transformation capabilities of Data Integration.
 Reuse transformation logic in different mappings.
 Hide complex transformation logic.

Scalolearn Services Pvt. Ltd.


Demo:
Using Mapplet transformation in
a mapping

Scalolearn Services Pvt. Ltd.


Scalolearn Services Pvt. Ltd.
Thank You

Scalolearn Services Pvt. Ltd.

You might also like