Professional Documents
Culture Documents
Lab Book
Page 1
Table of Contents
Lab 01:
Lab 02:
Lab 03:
Lab 04:
Lab 05:
Lab 06:
Lab 07:
Lab 7.1:
Lab 7.2:
Lab 7.3:
Lab 7.4:
Lab 7.5:
Lab 7.6:
Lab 7.7:
Lab 08:
Lab 09:
Page 2
Lab 01:
I.
Getting Started
Objective :
Objective of this lab exercise is to be familiar with basic functionality of ETL tool. You will create jobs that
extract data, transform it, and then load it into target files or tables. This Lab Book is having the sample
data that will provides a road map showing where you are going and how to get there. It covers the
following:
Types of data sources and targets. An outline of the types of data sources and targets that Informatica
supports.
Exercises. A summary of the tasks you will do.
Table1. Sample Table
Table
Column
Description
EMPLOYEES
EMPNO
ENAME
JOB
MGR
HIREDATE
SAL
COMM
Employee number
Employee name
Job title
Employee supervisor
Date of hire
Employee salary
Employee sales commission
DEPTID
DEPTNAME
Department Number
Department Name
DEPARTMENT
As you can see, the data is relatively straightforward, and consists of a small subset of what you expect
to find in a company database.
Environment Setup
ASCII Text Files: Each of the ASCII text files is named according to the data it contains. It includes the
following ASCII files:
TIME.TXT
Table 2 provides an easy-to-read summary of the exercises.
Exercise Title
Source
Target
Example 1
TIME.TXT
TIME
Summary
Loading Data from Comma-delimited file to table.
Order of input/output columns differs
Page 3
Exercise1
TIME.TXT
Exercise2
TIME
Exercise3
Exercise4
Exercisd5
TIME.TXT
-
TIME
-
Exercise6
Exercise7
Exercise8
Exercise9
Exercise10
Exercise11
Employee
Employee
Employee
Employee,
Department
Employee
-
Employee
-
Exercise12
Example 2
Exercise 10
Exercise 11
Page 4
Lab 02:
I.
Objective:
In this exercise you can create a mapping consisting of Sequential File Input and a source qualifier
Transformation to transform it and load it into target file.
II.
Lab Setup:
Connectivity to the DS Server and Repository
III.
General Instructions:
1.
2.
3.
4.
5.
IV.
Steps:
1.
2.
3.
4.
V.
Instructions to follows:
1.
Page 5
2.
Page 6
3.
Create mapping
(a) Click the tools again and click mapping designer.
(b) Now drag the sources from the source folder in navigator window.
(c) Drag the target from target folder from the navigator window.
(d) Insert the transformation using transformation tab in menu bar.
i.
Click on create
ii.
Choose the transformation.(here we are using expression transformation)
4.
Page 7
(b) Link the Transformation output to the target. Click the transformation field and, then
drag the link to the target. Release the mouse to link them.
5.
Configuring Transformation
(a) Double click on the transformation dialogue, a window will appear in front of you.
(b)
(c)
(d)
(e)
(f)
Go to Ports tab we can add ports using a tab highlighted in the picture.
We can have Input, Output and local variables.
Use local variable for temporary computation.
Input Ports are the set of inputs coming from the source.
Output ports are the desired outputs for loading into the targets.
Page 8
(g) We can give the expression for cleansing data or for other purposes.(here we are using
string input changing it to date and extracting day, month and year from it)
(h) Apply it.
(i) Save the mapping by ctrl+s or got repository option in menu bar and save.
Page 9
Lab 03:
I.
Objective:
In this exercise you can work with Workflow Manager to connection management to repository and
session task.
II.
Steps:
1.
2.
3.
4.
5.
Give user name password and connection string for both source and target.
Now go to worflows on menu bar and click on create.(name the workflow by giving some
meaningful name to it like wk_mappingname)
Now go to tasks in menu bar and click on create and name the task(use same naming
convention like ses_router)
6.
Page 10
7.
8.
9.
Double click on session task go to mapping tab click on sources and assign connection browser
to it apply same for target.
10. Click ok.
11. Now go to workflow and click on start workflow.
12. After that workflow monitor will open automatically which will show you the status of workflow
i.e. whether it got succeeded or failed and how much time it took to execute)
Page 11
Lab 04:
I.
Objective :
In this exercise you can work with Workflow Monitor.
II.
Steps:
1.
a.
b.
c.
d.
e.
Double click on the session a property window will get open on the bottom of workflow monitor
or we can open property window by clicking on view tab in menubar.
In the properties window we can see the number of source success, rejected rows and target
success, rejected rows.
We can see the partition task progress details.
We can see the session statistics.
We can get the session log by right click
Page 12
Page 13
Lab 05:
I.
Objective :
In this exercise you work with Mapplet.
II.
Steps:
1.
2.
3.
4.
5.
6.
7.
It is just like a function where we can change the set of inputs and outputs.
Page 14
Lab 06:
I.
Objective :
In this exercise you work with Worklet.
II.
Steps:
1.
2.
3.
4.
Page 15
Lab 07:
I.
Objective :
The main objective of this exercise is to be familiar with Transformations. 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.
II.
Transformations can be active or passive. An active transformation can change the number of rows
that pass through it, such as a Filter transformation that removes rows that do not meet the filter
condition. A passive transformation does not change the number of rows that pass through it, such
as an Expression transformation that performs a calculation on data and passes all rows through the
transformation.
Transformations can be connected to the data flow, or they can be unconnected. An unconnected
transformation is not connected to other transformations in the mapping. An unconnected
transformation is called within another transformation, and returns a value to that transformation.
Transformation Description:
Transformation
Type
Description
Aggregator
Active/
Connected
Expression
Passive/
Connected
Calculates a value.
Page 16
Filter
Active/
Connected
Filters data.
Joiner
Active/
Connected
Lookup
Passive/
Connected or
Unconnected
Looks up values.
Router
Active/
Connected
Sequence
Generator
Passive/
Connected
Sorter
Active/Connected
Source Qualifier
Active/
Connected
Stored Procedure
Passive/
Connected or
Unconnected
Update Strategy
Active/
Connected
Page 17
Lab 7.1:
I.
Objective :
In this exercise an Aggregator transformation lets you perform aggregate calculations, such as averages
and sums
II.
Steps:
1.
2.
In the Mapping Designer, click Transformation > Create. Select the Aggregator transformation.
Enter a name for the Aggregator, click Create. Then click Done.
4.
5.
6.
Double-click the title bar of the transformation to open the Edit Transformations dialog box.
Select the Ports tab.
Click the group by option for each column you want the Aggregator to use in creating groups.
Optionally, enter a default value to replace null groups.
If you want to use a non-aggregate expression to modify groups, click the Add button and enter a
name and data type for the port. Make the port an output port by clearing Input (I). Click in the right
corner of the Expression field, enter the non-aggregate expression using one of the input ports, and
click OK. Select Group By.
7.
Click Add and enter a name and data type for the aggregate expression port. Make the port an
output port by clearing Input (I). Click in the right corner of the Expression field to open the
Expression Editor. Enter the aggregate expression, click Validate, and click OK.
Make sure the expression validates before closing the Expression Editor.
8.
9.
Page 18
Page 19
Lab 7.2:
I.
Objective :
In this exercise an Expression transformation to calculate values in a single row before you write to the
target.
For example, you might need to adjust employee salaries, concatenate first and last names, or convert
strings to numbers.
II.
Steps:
1.
2.
In the Mapping Designer, click Transformation > Create. Select the Expression transformation.
Enter a name for it (the convention is EXP_TransformationName) and click OK.
Create the input ports.
If you have the input transformation available, you can select Link Columns from the Layout
menu and then drag each port used in the calculation into the Expression transformation. With
this method, the Designer copies the port into the new transformation and creates a connection
between the two ports. Or, you can open the transformation and create each port manually.
Note: If you want to make this transformation reusable, you must create each port manually
within the transformation.
3.
4.
5.
Repeat the previous step for each input port you want to add to the expression.
Create the output ports (O) you need, making sure to assign a port datatype that matches the
expression return value. The naming convention for output ports is OUT_PORTNAME.
Click the small button that appears in the Expression section of the dialog box and enter the
expression in the Expression Editor.
Page 20
To prevent typographic errors, where possible, use the listed port names and functions.
If you select a port name that is not connected to the transformation, the Designer copies the
port into the new transformation and creates a connection between the two ports.
Port names used as part of an expression in an Expression transformation follow stricter rules
than port names in other types of transformations:
a.
6.
A port name must begin with a single- or double-byte letter or single- or doublebyte underscore (_).
b. It can contain any of the following single- or double-byte characters: a letter,
number, underscore (_), $, #, or @.
Check the expression syntax by clicking Validate.
If necessary, make corrections to the expression and check the syntax again. Then save the
expression and exit the Expression Editor.
7.
8.
9.
Page 21
Lab 7.3:
I.
Objective :
In this exercise you can filter rows in a mapping with Filter transformation. You pass all the rows from a
source transformation through the Filter transformation, and then enter a filter condition for the
transformation.
II.
Steps:
1.
2.
3.
Select and drag all the ports from a source qualifier or other transformation to add them to the
Filter transformation.
After you select and drag ports, copies of these ports appear in the Filter transformation. Each
column has both an input and an output port.
4.
5.
Page 22
6.
Click the Value section of the condition, and then click the Open button.
The Expression Editor appears.
7.
8.
9. Click OK.
10. Select the Tracing Level, and click OK to return to the Mapping Designer.
11. Click Repository > Save to save the mapping.
Page 23
Lab 7.4:
I.
Objective :
In this exercise you can use the Joiner transformation to join source data from two related
heterogeneous sources residing in different locations or file systems.
You can also join data from the same source. The Joiner transformation joins sources with at least one
matching column. The Joiner transformation uses a condition that matches one or more pairs of columns
between the two sources.
II.
Steps:
1.
In the Mapping Designer, click Transformation > Create. Select the Joiner transformation. Enter
a name, and click OK.
The naming convention for Joiner transformations is JNR_TransformationName. Enter a
description for the transformation. The Designer creates the Joiner transformation.
2.
Drag all the input/output ports from the first source into the Joiner transformation.
The Designer creates input/output ports for the source fields in the Joiner transformation as
detail fields by default. You can edit this property later.
3.
Select and drag all the input/output ports from the second source into the Joiner
transformation.
The Designer configures the second set of source fields and master fields by default.
4.
5.
Double-click the title bar of the Joiner transformation to open the transformation.
Click the Ports tab.
Page 24
6.
Click any box in the M column to switch the master/detail relationship for the sources.
Tip: To improve performance for an unsorted Joiner transformation, use the source with fewer
rows as the master source. To improve performance for a sorted Joiner transformation, use the
source with fewer duplicate key values as the master.
1.
2.
Page 25
3.
4.
Click the Add button to add a condition. You can add multiple conditions. The master and detail
ports must have matching datatypes. The Joiner transformation only supports equivalent (=)
joins.
Click the Properties tab and configure properties for the transformation.
Note: You can edit the join condition from the Condition tab. The keyword AND separates
multiple conditions.
5.
6.
Click OK.
Click Repository > Save to save changes to the mapping.
Page 26
Lab 7.5:
I.
Objective :
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.
II.
Steps:
1.
2.
3.
4.
5.
6.
Select and drag all the ports from a transformation to add them to the Router transformation,
or you can manually create input ports on the Ports tab.
Double-click the title bar of the Router transformation to edit transformation properties.
Click the Transformation tab and configure transformation properties.
Click the Properties tab and configure tracing levels.
7.
Click the Groups tab, and then click the Add button to create a user-defined group.
The Designer creates the default group when you create the first user-defined group.
8.
Click the Group Filter Condition field to open the Expression Editor.
Page 27
9.
10.
11.
12.
13.
Page 28
Lab 7.6:
I.
Objective :
In this exercise you can sort data with the Sorter transformation. You can sort data in ascending or
descending order according to a specified sort key. You can also configure the Sorter transformation for
case-sensitive sorting, and specify whether the output rows should be distinct.
II.
Steps:
1.
In the Mapping Designer, click Transformation > Create. Select the Sorter transformation.
The naming convention for Sorter transformations is SRT_TransformationName. Enter a
description for the transformation. This description appears in the Repository Manager, making
it easier to understand what the transformation does.
2.
3.
4.
Click Done.
Drag the ports you want to sort into the Sorter transformation.
The Designer creates the input/output ports for each port you include.
5.
6.
7.
8.
9.
Double-click the title bar of the transformation to open the Edit Transformations dialog box.
Select the Ports tab.
Select the ports you want to use as the sort key.
For each port selected as part of the sort key, specify whether you want the Integration Service
to sort data in ascending or descending order.
Select the Properties tab. Modify the Sorter transformation properties.
Page 29
Page 30
Lab 7.7:
I.
Objective :
The Sequence Generator transformation generates numeric values. You can use the Sequence Generator
to create unique primary key values, replace missing primary keys, or cycle through a sequential range of
numbers.
II.
Steps:
1.
In the Mapping Designer, click Transformation > Create. Select the Sequence Generator
transformation.
The naming convention for Sequence Generator transformations is SEQ_TransformationName.
2.
Enter a name for the Sequence Generator, and click Create. Click Done.
The Designer creates the Sequence Generator transformation.
3.
4.
5.
Double-click the title bar of the transformation to open the Edit Transformations dialog box.
Enter a description for the transformation. This description appears in the Repository Manager,
making it easier for you or others to understand what the transformation does.
Select the Properties tab. Enter settings.
Page 31
Note: You cannot override the Sequence Generator transformation properties at the session level.
This protects the integrity of the sequence values generated.
6.
7.
Click OK.
To generate new sequences during a session, connect the NEXTVAL port to at least one
transformation in the mapping.
Use the NEXTVAL or CURRVAL ports in an expression in other transformations.
8.
Page 32
Lab 08:
I.
Objective :
In this exercise you can learn that how Pushdown Optimization optimizes the execution time of a
session.
II.
Steps:
1.
Double click on the task which you have created to edit the properties.
2.
Scroll down and click on the drop down to select the type of optimization.
Pushdown
Optimization
III.
The Integration Service pushes as much transformation logic as possible to the target
database.
Page 33
instead. Both target and source should be in the same database for using full pushdown
optimization
IV.
Source-Side Targer-Side
X
External Procedure
Filter
Java
Page 34
Joiner
Lookup
Normalizer
Rank
Router
Sequence Generator
Sorter
Source Qualifier
Stored Procedure
Target
Transaction Control
Union
Update Strategy
XML Generator
XML Parser
XML Source Qualifier
Page 35
Lab 09:
I.
Objective :
In this exercise you can learn the ability to scale the number of partitions without manually adding
partitions in the session properties. Based on the session configuration, the Integration Service
determines the number of partitions when it runs the session.
II.
1.
2.
3.
4.
III.
Disabled. Do not use dynamic partitioning. Defines the number of partitions on the Mapping
tab.
Based on number of partitions. Sets the partitions to a number that you define in the Number
of Partitions attribute. Use the $DynamicPartitionCount session parameter, or enter a number
greater than 1.
Based on number of nodes in grid. Sets the partitions to the number of nodes in the grid
running the session. If you configure this option for sessions that do not run on a grid, the
session runs in one partition and logs a message in the session log.
Based on source partitioning. Determines the number of partitions using database partition
information. The number of partitions is the maximum of the number of partitions at the
source.
Steps:
1.
2.
3.
Double click on the task which you have created to edit the properties.
Click on config object tab.
Scroll down and click on the drop down to select the type of partitioning.
Page 36
Page 37