Professional Documents
Culture Documents
1
Agenda
• Rule 1
• Rule 2
• Rule 3
Transformation
Engine
Integrator
Error
View
Check
Correct Loader Warehouse
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
Source Data
Warehouse
Direct Load
Client Components
1. Repository Server Administration Console
2. Repository Manager
3. Designer
4. Workflow Manager
5. Workflow Monitor
Repository Service
Configuration
Repository
Configuration
List of Repositories
• 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
Mapplet
Warehouse
Designer
Repository Designer
Navigator
Output
Workspace
• Click on the ‘Add a new column’ button to add new columns in the source and
specify the details
• Click OK to accept changes
• 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
Transformation …….
TRANSFORMATIONS
ACTIVE PASSIVE
Active Transformations
1. Aggregator
2. Joiner
3. Normalizer
4. Rank
5. Source Qualifier
Passive Transformations
1. Lookup
2. Expression
3.External Procedure
4. Sequence Generator
5. Stored Procedure
Router is similar to filter, router also has the option to route rows
based on condition
• 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.
Variable Ports
– For Aggregator, Expression and Rank transformations
– Use variables to
• simplify complex expression
• store temporary data
• store values from prior rows
• 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
• Connect all the input ports, ports in transformation objects and the output
ports to complete the data flow
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.
Type of Tasks
• Command
• Decision
• Event
• Email
• Timer
• Assignment
• Session
The Assignment
task allows you
to assign a
value to a user-
defined
workflow
variable.
•Workflow
manager>Connections>Replace
Development Standards
• Mapping - m_MappingName
• Mapplet - mplt_MappletName
• Session - s_MappingName
• Workflow - wf_SessionName
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
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
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
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)
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.
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
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.
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.
• Create an expression