You are on page 1of 111

Informatica 7.

1
Agenda

Day 1 DWH Concepts


Overview of ETL
Informatica 7.1 Architecture
Repository Server
Informatica Server
Repository Manager
Day 2 Overview of source Analyzer
Overview of Warehouse designer
Overview of Mapping Designer & Various Transformations available.
Overview of Mapplets designer & Transformation Developer

©Copyright 2004, Cognizant Academy, All Rights Reserved 2


Agenda

Day 3 Workflow Manager


Creating Tasks,Worklets and Workflows
Running the sessions and workflows.
Workflow Monitor
Day 4 Mapping Wizards
Performance Tuning

Day 5 Development Standards & AQUA


Case Studies

©Copyright 2004, Cognizant Academy, All Rights Reserved 3


ETL
ETL(Extraction, Transformation and Loading) is a process by which data
is integrated and transformed from the operational systems into the
datawarehouse environment
Filters and
Extractors
Cleanser
Error
Operational systems Cleaning View
Rules Check
• Rule 1 Correct
• Rule 2
• Rule 3
Transformation
Rules

• Rule 1
• Rule 2
• Rule 3

Transformation
Engine
Integrator

Error
View
Check
Correct Loader Warehouse

©Copyright 2004, Cognizant Academy, All Rights Reserved 4


Extraction

80 tables

Oracle

Target
50 tables

Sybase

Text files
©Copyright 2004, Cognizant Academy, All Rights Reserved 5
Transformation

Source
Emp Last First
id Name Name
10001 Jones Indiana

Staging Area
10002 Holmes Sherloc
k

Name =
Contact(First Name,
Last Name)
Indiana Jones
Sherlock Homes

©Copyright 2004, Cognizant Academy, All Rights Reserved 6


Loading

Source Data
Warehouse
Direct Load

Staging Area grated


inte
m ed&
r a n sfor load
lean
,T data
C
Cleaning,
Transformation
& Integration of
Raw data

©Copyright 2004, Cognizant Academy, All Rights Reserved 7


Informatica-7 Architecture

©Copyright 2004, Cognizant Academy, All Rights Reserved 8


Informatica Components
Server Components
1. Informatica Server
2. Repository Server

Client Components
1. Repository Server Administration Console
2. Repository Manager
3. Designer
4. Workflow Manager
5. Workflow Monitor

©Copyright 2004, Cognizant Academy, All Rights Reserved 9


Informatica Server Components

©Copyright 2004, Cognizant Academy, All Rights Reserved 10


PowerCenter Server

• Manages the scheduling and execution of workflows


• The PowerCenter Server reads mapping and session information from
the repository. It extracts data from the mapping sources and stores the
data in memory while it applies the transformation rules that you
configure in the mapping. The PowerCenter Server loads the
transformed data into the mapping targets.
• The PowerCenter Server can achieve high performance using
symmetric multi-processing systems. The PowerCenter Server can start
and run multiple workflows concurrently. It can also concurrently
process partitions within a single session.

©Copyright 2004, Cognizant Academy, All Rights Reserved 11


Informatica Server Configuration
Configuration of: Server Setup & Load
Manager details

Informatica Server is mapped


to the Repository here

Product, Database and Partitioning


licenses are updated here

©Copyright 2004, Cognizant Academy, All Rights Reserved 12


Repository Server

• The Repository Server Manages the metadata in the repository database.


• The Repository Server manages repository connection requests from client
applications. For each repository database registered with the Repository
Server, it configures and manages a Repository Agent process. The
Repository Server also monitors the status of running Repository Agents,
and sends repository object notification messages to client applications.

• The Repository Agent is a separate, multi-threaded process that retrieves,


inserts, and updates metadata in the repository database tables. The
Repository Agent ensures the consistency of metadata in the repository by
employing object locking.

©Copyright 2004, Cognizant Academy, All Rights Reserved 13


Repository Server Configuration

Repository Service
Configuration

Repository
Configuration

©Copyright 2004, Cognizant Academy, All Rights Reserved 14


Informatica Client Components

©Copyright 2004, Cognizant Academy, All Rights Reserved 15


Repository Server Administration Console

You can use the Administration Console to perform the following


tasks:
• Add, edit, and remove repository configurations.
• Export and import repository configurations.
• Create a repository.
• Promote a local repository to a global repository.
• Copy a repository.
• Delete a repository from the database.
• Back up and restore a repository.

©Copyright 2004, Cognizant Academy, All Rights Reserved 16


Repository Server Administration Console Contd..
Registering Repository Server

©Copyright 2004, Cognizant Academy, All Rights Reserved 17


Repository Server Administration Console Contd..
Connecting to Repository Server

©Copyright 2004, Cognizant Academy, All Rights Reserved 18


Repository Server Administration Console Contd..

List of Repositories

©Copyright 2004, Cognizant Academy, All Rights Reserved 19


Repository Server Administration Console Contd..

Creating a Repository - Right click on Repository and Choose Add Repository

©Copyright 2004, Cognizant Academy, All Rights Reserved 20


Repository Manager

• Used for administering the repository


• Allows to do the following tasks
• Perform Folder functions
• Create, edit and delete folders
• Copy a folder within a repository or to other repository
• Compare folders
• Implement Repository security
• Create, edit and delete repository users and user groups
• Assign and revoke repository privileges and folder permissions
• View locks and un-lock objects

©Copyright 2004, Cognizant Academy, All Rights Reserved 21


Repository Manager Contd..
• Import and export repository connection information in the registry
• Analyze source/target, mapping dependencies
• View the properties of repository objects

©Copyright 2004, Cognizant Academy, All Rights Reserved 22


Creating Folders
• Click on Folders>Create
• Enter folder name, description, owner, group and permissions

©Copyright 2004, Cognizant Academy, All Rights Reserved 23


Creating Groups
• Connect to a repository
• To create Groups choose Security>Manage Users and Privileges
• Select Groups tab and then click Add

©Copyright 2004, Cognizant Academy, All Rights Reserved 24


Creating Users
• To create Users choose Security>Manage Users and Privileges
• Enter a username
• Enter the password twice to confirm it

©Copyright 2004, Cognizant Academy, All Rights Reserved 25


Creating Users Contd..
• Click Group Memberships

• To Add the user to a group, select the group in the Not Member list, and
click Add
• To Remove the user from a group, select the group in the Member List, and
click Remove
©Copyright 2004, Cognizant Academy, All Rights Reserved 26
Assigning Privileges
Choose Security> Manage Users and Privileges> Privileges

©Copyright 2004, Cognizant Academy, All Rights Reserved 27


Display Repository Users

Click Edit>Show User Connection to view the repository users

©Copyright 2004, Cognizant Academy, All Rights Reserved 28


View/Remove Locks

• Locks prevent the users from duplicating or overriding work


• Choose Edit > Show Locks to view all the locked objects
• The dialog box shows
• Username locking the object
• Folder containing the object
• Version containing the object
• Object type(folder, session, reusable transformation etc.)
• Object name
• Lock type(Read,Write,Execute,Save,Fetch)
• Lock time, hostname,Application(Server Manager, Designer, Server
etc.)

©Copyright 2004, Cognizant Academy, All Rights Reserved 29


Day 2

©Copyright 2004, Cognizant Academy, All Rights Reserved 30


Overview of PowerMart Designer
Designer provides five tools with which to create mappings
• Source Analyzer
- to import or create source definitions for flat file, ERP, and relational sources
• Warehouse Designer
- to import or create target definitions
• Transformation developer
- to create reusable transformations
• Mapplet designer
- to create mapplets
• Mapping designer
- to create mappings

©Copyright 2004, Cognizant Academy, All Rights Reserved 31


Designer Work Space

Source Transformation Mapping


Analyzer developer Designer

Mapplet
Warehouse
Designer
Repository Designer
Navigator

Output

Workspace

©Copyright 2004, Cognizant Academy, All Rights Reserved 32


Source Analyzer
• Reads and analyzes schema information of operational databases and flat
files
• Stores metadata information in the repository
• How to import a source?
• choose Sources > Import from database/flat file
• To import a table enter ODBC data source, username, password

©Copyright 2004, Cognizant Academy, All Rights Reserved 33


Source Analyzer
• Click on Connect button and the list of tables appears
• Select the tables which you will be using as source tables
• Click OK to add the selected tables into the Source analyzer work space
How to create a new Source?
• Choose Sources > Create

• Give a name to the new source, select the database type


• Click Create and then Done buttons to make the blank source appear in
workspace

©Copyright 2004, Cognizant Academy, All Rights Reserved 34


Source Analyzer
• To enter column names, data types and field lengths double click on the newly
created source structure
• Click on the Columns tab

• Click on the ‘Add a new column’ button to add new columns in the source and
specify the details
• Click OK to accept changes

©Copyright 2004, Cognizant Academy, All Rights Reserved 35


Warehouse Designer

Provides the following features


• Create a new target
• Import the target structure
• Create cubes and dimensions for multi-dimensional metadata analysis

How to create a new target?


• Choose Targets > Create
• Enter the name for the target table and the database type
• Double click on the empty target structure and enter the column names, data
type and field length same as done for creating sources
• Select the newly created table and choose from menu bar Target
>Generate/Execute SQL

©Copyright 2004, Cognizant Academy, All Rights Reserved 36


Warehouse Designer

• Connect to the warehouse by giving ODBC data source,user id and


password
• Select the appropriate Generation options and click on Generate SQL
file button
• To view/ edit the SQL click on Edit SQL file
• To generate the tables in the database click on Execute SQL file
• Look at the Output window to check for errors in generation of the
target table in database

©Copyright 2004, Cognizant Academy, All Rights Reserved 37


Warehouse Designer
How to import target table definition?
• Choose Target > Import from database
• Connect to the database by selecting the ODBC data source and the enter the
user name and password

• Select tables from the list of tables available in the database which will be used
as targets
• Click OK to get the tables in the workspace
©Copyright 2004, Cognizant Academy, All Rights Reserved 38
Transformation Developer

•When a transformation needs to be created as reusable across


mappings then it is created in Transformation Developer
•When a set of transformation needs to be reused in a mapping it is
created in mapplet designer

©Copyright 2004, Cognizant Academy, All Rights Reserved 39


Transformation Developer

Transformation …….

A Transformation is any part of mapping that generates or


modifies Data

Use the Transformation Developer to create reusable Transformations

Use Transformation Functions to convert Data

©Copyright 2004, Cognizant Academy, All Rights Reserved 40


Transformation Developer

Transformations are of two types

TRANSFORMATIONS

ACTIVE PASSIVE

©Copyright 2004, Cognizant Academy, All Rights Reserved 41


Transformation Developer

Active Transformations

An active Transformation can change the number of records


passed through it.

List of Active Transformations

1. Aggregator
2. Joiner
3. Normalizer
4. Rank
5. Source Qualifier

©Copyright 2004, Cognizant Academy, All Rights Reserved 42


Transformation Developer

Passive Transformations

An Passive Transformation cannot change the number of records


count

List of Passive Transformations.

1. Lookup
2. Expression
3.External Procedure
4. Sequence Generator
5. Stored Procedure

©Copyright 2004, Cognizant Academy, All Rights Reserved 43


Transformation Objects

©Copyright 2004, Cognizant Academy, All Rights Reserved 44


Create transformation
Transformation Objects
To create a transformation
Click on Transformation > Create

©Copyright 2004, Cognizant Academy, All Rights Reserved 45


Source Qualifier

Represents data temporarily stored on the PowerMart server

©Copyright 2004, Cognizant Academy, All Rights Reserved 46


Expression

Perform custom calculations of a simple or complex nature, using


data from one or more input ports

©Copyright 2004, Cognizant Academy, All Rights Reserved 47


Filter

Performs a test on all records before allowing them to be sent


to the next object

©Copyright 2004, Cognizant Academy, All Rights Reserved 48


Router

Router is similar to filter, router also has the option to route rows
based on condition

©Copyright 2004, Cognizant Academy, All Rights Reserved 49


Sorter

• The sorter transformation is an active transformation that allows you to sort relational and
flat file data based on a sort key.
• This can be used to improve Aggregator performance by provided it with sorted data.

©Copyright 2004, Cognizant Academy, All Rights Reserved 50


Sequence Generator
Generates unique ID values in the same fashion as a sequence in
a relational database

©Copyright 2004, Cognizant Academy, All Rights Reserved 51


Look-up

Looks up data from a table, view or synonym

©Copyright 2004, Cognizant Academy, All Rights Reserved 52


Look-up Contd..

• Informatica server queries lookup table based on


lookup ports and lookup condition
• Lookup can be connected or unconnected
• Lookup can be cached or uncached
• Lookup policy on multiple match can be specified

©Copyright 2004, Cognizant Academy, All Rights Reserved 53


Update Strategy

• Defines how the PowerMart server should handle updates to existing


records in targets: Insert, Update, Delete, Reject options at the mapping level
• Session can be configured to treat the rows as insert/update/delete

©Copyright 2004, Cognizant Academy, All Rights Reserved 54


Joiner
• Joins data from disparate sources - such as mainframes, flat files and
relational databases
• Join sources are categorized as Master and Detail
• The possible join types are: Normal Join, Master Outer Join, Detail Outer
Join, Full Outer Join

©Copyright 2004, Cognizant Academy, All Rights Reserved 55


Normalizer
•Normalizer is used to split the source rows into n number of rows
•Normalizer can be used to break out repeated data in a record to
multiple records as in the case of Cobol sources

©Copyright 2004, Cognizant Academy, All Rights Reserved 56


Aggregator

Performs an aggregate calculation(Count, Average etc.)

©Copyright 2004, Cognizant Academy, All Rights Reserved 57


Stored Procedure

Calls a database stored procedure and captures return values

©Copyright 2004, Cognizant Academy, All Rights Reserved 58


Rank

• Rank transformation allows to select top/bottom rank of data


• It can be used for numeric and string values

©Copyright 2004, Cognizant Academy, All Rights Reserved 59


How to create a mapping?

©Copyright 2004, Cognizant Academy, All Rights Reserved 60


Mapping Designer
Ports
• To design the basic flow of data between source and targets
• Types: input, output, variable

Variable Ports
– For Aggregator, Expression and Rank transformations
– Use variables to
• simplify complex expression
• store temporary data
• store values from prior rows

©Copyright 2004, Cognizant Academy, All Rights Reserved 61


Mapping Creation
How to create a Mapping?
• Open the Mapping designer workspace
• Choose Mappings > Create
• Give a proper name to the mapping

• Open the Sources from the navigator which you would have created/imported
using source analyzer
• Drag and drop the source table from navigator into the workspace

©Copyright 2004, Cognizant Academy, All Rights Reserved 62


Mapping Creation Contd..

©Copyright 2004, Cognizant Academy, All Rights Reserved 63


Mapping Creation Contd..
• Choose Transformation > Create to create a transformation object
• Select the type of transformation object you want to create and give a proper
name to it

©Copyright 2004, Cognizant Academy, All Rights Reserved 64


Mapping Creation Contd..
• Drag and drop the required fields(ports) from Source Qualifier to the
transformation object

©Copyright 2004, Cognizant Academy, All Rights Reserved 65


Mapping Creation Contd..
• Add new ports in the transformation object and define them as variable ports
to do complex transformation

©Copyright 2004, Cognizant Academy, All Rights Reserved 66


Mapping Creation Contd..
• Open the Targets from the navigator which you would have created/imported
using Warehouse Designer
• Select the target table, drag and drop it into the designer workspace

©Copyright 2004, Cognizant Academy, All Rights Reserved 67


Mapping Creation Contd..
• Drag and drop the output ports from the last transformation object to the
corresponding ports in the target

• Choose Repository > Save to store the mapping


• Check the output window for any errors
©Copyright 2004, Cognizant Academy, All Rights Reserved 68
Compare Objects
The following repository objects can be compared
 Sources
 Targets
 Transformations
 Mappings and Mapplets
 Instances
 Folders
Note:
 Can not compare Repositories
 Can not compare objects of different types
 Read permission required for folders to compare them.
©Copyright 2004, Cognizant Academy, All Rights Reserved 69
Source Compare

©Copyright 2004, Cognizant Academy, All Rights Reserved 70


Copying Objects

The following objects could be copied


•Mapping and Mapplet
•Transformation Objects
•Sources and Targets

©Copyright 2004, Cognizant Academy, All Rights Reserved 71


Mapplet Designer
Mapplet
• Reusable object that reflect set of transformation logic to use in multiple
mappings
• Like a single transformation object
• Expands at run time

Each Mapplet must include the following


• Exactly one input transformation or Source Qualifier transformation
• At least one output transformation

©Copyright 2004, Cognizant Academy, All Rights Reserved 72


Creating a Mapplet
• Open the Mapplet designer workspace
• Choose Mapplets > Create
• Give a name to the Mapplet

• Create an input transformation to define mapplet input ports if the


mapplet contains no sources

©Copyright 2004, Cognizant Academy, All Rights Reserved 73


Creating a Mapplet Contd..

• Double click on the object to define the input ports

©Copyright 2004, Cognizant Academy, All Rights Reserved 74


Creating a Mapplet Contd..
• Create the transformation objects to be used in the mapplet
• One input transformation can be connected to only one transformation, so to
pass same values to two separate data flows,connect the input
transformation to another transformation and then split the data flow
• Use Output transformation to create output ports, creating one Output
transformation for each mapplet output group

• Connect all the input ports, ports in transformation objects and the output
ports to complete the data flow

©Copyright 2004, Cognizant Academy, All Rights Reserved 75


Creating a Mapplet Contd..
• Choose Repository > Save to store the mapplet
• Check the output window for validation status
• If mapplet is not valid,correct the problem and re-save the Mapplet

©Copyright 2004, Cognizant Academy, All Rights Reserved 76


Workflow Manager

©Copyright 2004, Cognizant Academy, All Rights Reserved 77


Work Flow Manager
In the Workflow
Manager, you define a
set of instructions called
a Workflow to execute
mappings you build in
the Designer. Workflow

Generally, a workflow
contains a Session and
any other task you may
want to perform when
you execute a session.
Tasks can include a
Session, Email, or
Scheduling information.
You connect each task
with Links in the
workflow.

You can also create a


worklet in the Workflow Session Task Link
Manager. A Worklet is
an object that groups a
set of tasks.

©Copyright 2004, Cognizant Academy, All Rights Reserved 78


Working with tasks

Type of Tasks

• Command
• Decision
• Event
• Email
• Timer
• Assignment
• Session

©Copyright 2004, Cognizant Academy, All Rights Reserved 79


Session Task
A Session task is
created for each
Mapping you want
the Informatica
Server to run. The
Informatica Server
uses the
instructions
configured in the
Session to move
data from sources
to targets.

©Copyright 2004, Cognizant Academy, All Rights Reserved 80


Command Task

The Command task allows you to


specify one or more shell
commands to run during the
workflow. For example, you can
specify shell commands in the
Command task to delete reject
files, copy a file, or archive target
files.

Standalone Command task:


You can use a Command task
anywhere in the workflow or
worklet to run shell commands.

Pre- and post-session shell


command: You can call a
Command task as the pre- or
post-session shell command for a
Session task.
©Copyright 2004, Cognizant Academy, All Rights Reserved 81
Event Task
You can define events in the workflow to specify the sequence of task execution. The event
is triggered based on the completion of the sequence of tasks. Use the following tasks to
help you use events in the workflow:
Event-Raise task. Event-Raise task represents a user-defined event. Use the Event-
Raise task with the Event-Wait task to define events.
Event-Wait task. The Event-Wait task waits for an event to occur. Once the event
triggers, the Informatica Server continues executing the rest of the workflow.
 Pre-defined event. A pre-defined event is a file-watch event. For pre-defined
events, use an Event-Wait task to instruct the Informatica (Indicator File)
 User-defined event. A user-defined event is a sequence of tasks in the
workflow.
S4 waits till S3 completes
- with the help of Events

©Copyright 2004, Cognizant Academy, All Rights Reserved 82


Email Task
Email task is used to send
email notifications during a
workflow.
You can create reusable Email
tasks in the Task Developer for
any type of email. Or, you can
create non-reusable Email
tasks in the Workflow and
Worklet Designer.
You can use Email tasks in any
of the following locations:
Session properties
Workflow properties
Workflow or Worklet

©Copyright 2004, Cognizant Academy, All Rights Reserved 83


Decision Task
The Decision task allows you
to enter a condition that
determines the execution of
the workflow, similar to a link
condition.
The Informatica Server
evaluates the condition in
the Decision Task and sets
the pre-defined condition
variable to True (1) or False
(0).
You can use the Decision
task instead of multiple link
conditions in a workflow

©Copyright 2004, Cognizant Academy, All Rights Reserved 84


Timer Task
The Timer task allows you to
specify the period of time to
wait before the Informatica
Server executes the next task in
the workflow.
You can choose to start the
next task in the workflow at an
exact time and date.
You can also choose to wait a
period of time after the start
time of another task, workflow,
or worklet before starting the
next task.
The Timer task has two types of
settings:
5.Absolute time
6.Relative time
©Copyright 2004, Cognizant Academy, All Rights Reserved 85
Assignment Task

The Assignment
task allows you
to assign a
value to a user-
defined
workflow
variable.

©Copyright 2004, Cognizant Academy, All Rights Reserved 86


Workflow
Use links to connect each tasks.

©Copyright 2004, Cognizant Academy, All Rights Reserved 87


Worklet
A worklet is an
object that
represents a set of
tasks. It can contain
any task available in
the Workflow
Manager. You can
also nest a worklet
in another worklet.

©Copyright 2004, Cognizant Academy, All Rights Reserved 88


WorkFlow Monitor
The Workflow
Monitor is a tool that
allows you to monitor
workflows and tasks.

You can view details


about a workflow or
task in either Gantt
Chart view or Task
view.

You can run, stop,


abort, and resume
workflows from the
Workflow Monitor.

©Copyright 2004, Cognizant Academy, All Rights Reserved 89


Workflow Monitor Contd..
You can configure options specific to Gantt Chart and Task view.

©Copyright 2004, Cognizant Academy, All Rights Reserved 90


WorkFlow Monitor Contd..
Gantt Chart View Task View

©Copyright 2004, Cognizant Academy, All Rights Reserved 91


Replacing a relational database connection

•Workflow
manager>Connections>Replace

Development Standards

©Copyright 2004, Cognizant Academy, All Rights Reserved 92


Naming Conventions

• Mapping - m_MappingName
• Mapplet - mplt_MappletName
• Session - s_MappingName
• Workflow - wf_SessionName

Transformation Naming Conventions


• Aggregator AGG_xxx • Stored Procedure SP_xxx
• Expression EXP_xxx
• Source Qualifier SQ_xxx
• Filter FIL_xxx
• Update Strategy UPD_xxx
• Joiner JNR_xxx
• Lookup LKP_xxx
• Normalizer NRM_xxx
• Rank RNK_xxx
• Sequence Generator SEQ_xxx

©Copyright 2004, Cognizant Academy, All Rights Reserved 93


Coding Standards

• Use Shortcuts for Sources & Targets


• Use Transformation Ports (Input, Output, Variable) as required
• Verify the connections of ports between Transformations
• Verify the Type and Precision of ports between Transformations
• Use parameters and variables as required

Note: There will be as many user-defined rules in real time projects.

©Copyright 2004, Cognizant Academy, All Rights Reserved 94


AQUA
A Cognizant Proprietary Product

©Copyright 2004, Cognizant Academy, All Rights Reserved 95


AQUA - Automated Quality Analyzer
AQUA enhances the Quality of Informatica deliverables in terms of Rules
reduction in bugs and enforces development standards
Reports
Metrics

©Copyright 2004, Cognizant Academy, All Rights Reserved 96


Case Studies

©Copyright 2004, Cognizant Academy, All Rights Reserved 97


Moving Forward step-by-step

Step 1
Create a Regular Folder with name as Training_<Associate_ID>

Step 2
Create a User ID and grant Privilages to the user ID to your Folder

Step 3
Create a DSN Connection String
[The tutor will provide all the required information]

Step 4
Import the definition of the table EMPLOYEE (ASSID, DOJ, GRADE,
SPEC) in the Shared Folder using the above DSN

©Copyright 2004, Cognizant Academy, All Rights Reserved 98


Moving Forward step-by-step

Step 5
Create a target definition in Warehouse Designer for SALARY (ASSID,
BPAY, SPA, PF, DOP) in the Shared Folder

Step 6
Generate the “Create SQL script” in the Target using the above DSN
and create the table in the database using the above DSN

Step 7
Create shortcuts for the Source and Target from the shared folder in the
Regular Folder

Step 8
Explore the added metadata thru repository manager

©Copyright 2004, Cognizant Academy, All Rights Reserved 99


Moving Forward step-by-step

Step 9
Create a Mapping to compute the monthly Salary. Use
SRC_EMPLOYEE as the Source and TGT_SALARY as the Target.
Calculate Total Salary (BPAY + SPA - PF) using an Expression
transformation. Populate the target field DOP with current date.

Step 10
Create a Session for the above mapping. Set the Connection
Strings for the Source and Target. Set other Session level
properties.
[The tutor will provide all the required Connection information]

Step 11
Explore the Session & Workflow properties in Workflow Monitor. Get
the Workflow log and Session log and explore them

©Copyright 2004, Cognizant Academy, All Rights Reserved 100


Moving Forward self-drive

Exercise 1
Create a new mapping to compute the monthly Salary. Use SRC_EMPLOYEE
as the Source and TGT_SALARY as the Target. Calculate Total Salary (BPAY
+ SPA - PF) using an Expression transformation. Populate the target field DOP
with current date.

Exercise 2
Add a Filter transformation to the above-created mapping with the following
filter condition “Salary > 10000”
Populate target, Emp_Tgt2 (Flat-file) with following fields - Emp_Id,
Emp_Name, Tot_Salary.

Exercise 3
Import table definitions of Emp_Src (Database) into Source.
Using a Router transformation,
Route the first 6-month salary details into Emp_Tgt1 (Flat-file)
and the next 6-month salary details into Emp_Tgt1 (Flat-file)

©Copyright 2004, Cognizant Academy, All Rights Reserved 101


Moving Forward self-drive

Exercise 4
Import table definitions of Emp_Src (Database) into Source. Use Sorter
transformation Sort by Emp_Id, Dept_Id. Load the records into Emp_Tgt
(Database).

Exercise 5
Import table definitions of Emp_Src (Database) into Source. Use Sequence
Generator transformation to create Serial Number. Load the records into a flat
file.

Exercise 6
(i) Import table definitions of Emp_Src (Database) into Source & Dept_Src
(database) into Look-up transformation. Using Dept_Id as Look-up key, load
records into Dept_Tgt (Database).
(ii) Import table definitions of Coll_Details (Database) into Source & Dept_Src
(database) into Look-up transformation. Using Dept_Id as look-up key, load
records into a flat-file.

©Copyright 2004, Cognizant Academy, All Rights Reserved 102


Moving Forward self-drive
Exercise 7
Import table definitions of Emp_Src (Database) into Source. Using Update
Strategy transformation, perform a look-up on Dept_Tgt (created in Q 6i). If
the record is present Update else Insert the new record in Dept_Tgt.

Exercise 8
Use Joiner transformation to implement Q 6i.

Exercise 9
Import table definitions of Emp_Sal (Database) into Source. Using Normalizer
transformation obtain records in the following format. Load the target table
Emp_Sal_Tgt (Database).
Emp_Sal
Emp_Id Emp_Name Jan_Sal Feb_Sal Mar_Sal
1 John 5000 10000 8000
Emp_Sal_Tgt
Emp_Id Emp_Name Month Salary
1 John January 5000
1 John February 10000
1 John March 8000

©Copyright 2004, Cognizant Academy, All Rights Reserved 103


Moving Forward self-drive

Exercise 10
Import table definitions of Emp_Sal (Database) into Source. Using Aggregator
transformation, group records by Dept_Id. Calculate Avg_Sal, To_Sal &
Cnt_Rcrds for each Dept_Id. Populate into a flat-file.

©Copyright 2004, Cognizant Academy, All Rights Reserved 104


Test your understanding!

©Copyright 2004, Cognizant Academy, All Rights Reserved 105


Sample Questions

• Which Component gets metadata from Repository?


• Which Component can be used for creating Repository?
• What is the Order of Execution of ports?
• How many port values can be retrieved by an unconnected
lookup and connected lookup respectively ?
• What is the port type of NEXTVAL, CURRVAL ports of a
Sequence Generator?
• What are the different Tracing levels?
• What are the types of lookup caches?
• What are the four Update Strategy constants?

©Copyright 2004, Cognizant Academy, All Rights Reserved 106


Performance
Tuning
Filter Transformation

• Use the Filter transformation early in the mapping.


• Use the Source Qualifier transformation to filter.

Joiner Transformation
• Perform joins in a database when possible.
• Join sorted data when possible.
• For an unsorted Joiner transformation, designate as the master
source the source with fewer rows.
• For a sorted Joiner transformation, designate as the master
source the source with fewer duplicate key values.

©Copyright 2004, Cognizant Academy, All Rights Reserved 108


Lookup Transformation
• Cache small lookup tables

• Use a persistent lookup cache for static lookup tables.

• Override the ORDER BY statement for cached lookups

Stored Procedure Transformation


• Reduce the row count.

• Create an expression

©Copyright 2004, Cognizant Academy, All Rights Reserved 109


Local and Global Shortcut Tips

• Keep shared objects in centralized folders


• Only create shortcuts to finalized objects.
• After editing a referenced object, make sure affected mappings are still
valid.
• Refresh views of shortcuts when working in a multiuser environment.

©Copyright 2004, Cognizant Academy, All Rights Reserved 110


Thank You!

©Copyright 2004, Cognizant Academy, All Rights Reserved 111

You might also like