Informatica PowerCenter Overview
Informatica PowerCenter Overview
Page 0‐1
Informatica Course Overview
Page 0‐2
Informatica Course Overview
Page 0‐3
Informatica Course Overview
Page 0‐4
Informatica Course Overview
Page 0‐5
Informatica Course Overview
Page 0‐6
Informatica Course Overview
Page 0‐7
Informatica Course Overview
Page 0‐8
Informatica Course Overview
Page 0‐9
Informatica Course Overview
Page 0‐10
Informatica Course Overview
Page 0‐11
Informatica Course Overview
Page 0‐12
Informatica Course Overview
Page 0‐13
Informatica Course Overview
Page 0‐14
Informatica Course Overview
Page 0‐15
Informatica PowerCenter
Page 01‐1
Informatica PowerCenter
Page 01‐2
Informatica PowerCenter
Page 01‐3
Informatica PowerCenter
The above Figure 1.1. shows a simplified data warehouse model. The
developer puts business rules for data transformation into the metadata
repository. There is a transformation process that extracts data from the
operational sources like database, legacy systems, and flat files. It
transforms data according to the business rules, and loads the data into the
data warehouse. From the data warehouse, atomic data flows to various
departments for their customized usage. These departmental databases
are called data marts.
The end user will use a query tool to look at the metadata in the repository
and the transformed data in the warehouse. The data in the data
warehouse will be used to cater to dynamic and complex reporting
requirements.
When Informatica’s PowerCenter is fit into the above model, the developer
can use PowerCenter Designer tool to develop mappings and other
metadata for the Informatica repository.
Page 01‐4
Informatica PowerCenter
Page 01‐5
Informatica PowerCenter
Sources
PowerCenter accesses the following sources:
Relational: Oracle, Sybase ASE, Informix, IBM DB2, Microsoft SQL Server,
and Teradata.
File: Fixed and delimited flat file, COBOL file, XML file, and web log.
Application: Business sources such as Hyperion Essbase, WebSphere MQ,
IBM DB2 OLAP Server, JMS, Microsoft Message Queue, PeopleSoft, SAP
NetWeaver, SAS, Siebel, TIBCO, and webMethods.
Mainframe: Mainframe databases such as Adabas, Datacom, IBM DB2
OS/390, IBM DB2 OS/400, IDMS, IDMS‐X, IMS, and VSAM.
Other: Microsoft Excel, Microsoft Access, and external web services.
Targets
PowerCenter can load data into the following targets:
Relational: Oracle,, Sybase
y ASE,, Sybase
y IQ,
Q, Informix,, IBM DB2,, Microsoft
SQL Server, and Teradata.
File: Fixed and delimited flat file and XML.
Application: Business sources such as Hyperion Essbase, WebSphere MQ,
IBM DB2 OLAP Server, JMS, Microsoft Message Queue, mySAP, PeopleSoft
EPM, SAP BW, SAS, Siebel, TIBCO, and webMethods.
Mainframe: Mainframe databases such as IBM DB2 for z/OS, IMS, and
VSAM.
Other: Microsoft Access and external web services.
Page 01‐8
Informatica PowerCenter
The PowerCenter Designer has five tools to build mappings and mapplets
so as to specify how to move and transform data between sources and
targets.
The five tools are as follows:
•Source Analyzer
•Target designer
•Transformation Developer
•Mapplet Designer
•Mapping Designer
The D
Th Designer
ig allows
ll to
t workk with
ith multiple
lti l tools
t l att one time
ti and
d to
t workk
in multiple folders and repositories at the same time. It also includes
windows so as to view folders, repository objects, and Tasks.
Page 01‐9
Informatica PowerCenter
Page 01‐10
Informatica PowerCenter
Page 01‐11
Informatica PowerCenter
Page 01‐12
Informatica PowerCenter
Page 01‐13
Informatica PowerCenter
Page 01‐14
Informatica PowerCenter
Page 01‐15
Informatica PowerCenter
Page 01‐16
Informatica PowerCenter
Page 01‐17
Informatica PowerCenter
Page 01‐18
Informatica PowerCenter
Page 01‐19
Informatica PowerCenter
The created repository service will be seen in the folder. Then select the
Repository Service in Navigator window and then the repository service
can be enabled or disabled using Enable or Disable
Page 01‐20
Informatica PowerCenter
Page 01‐21
Informatica PowerCenter
Steps to connect to the repository using Repository Manager for the first
time:
1. Launch the Repository Manager tool, choose Start | Programs |
Informatica PowerCenter | Client | Repository Manager.
3. Click on the Add Repository menu option.
4. Enter the following information:
• Repository name
• Username
5. Choose Repository | Connect or right click on the repository name and
choose Connect.
6. The Connect to Repository dialog box appears.
7. Enter the repository username and password.
8. Click More.
9 Th
9. The CConnectt to
t Repository
R it di
dialog
l gbbox expands.
d
10. Enter the host name of the machine the Repository Server is running
on and the port number the Repository Server uses for connections.
11. Click Connect.
Page 01‐22
Informatica PowerCenter
The Repository Server now opens a connection to the database, and a new
icon representing the repository appears in the Repository Manager.
Folders within the repository now appear underneath the icon for that
repository.
Page 01‐23
Informatica PowerCenter
Page 01‐24
Informatica PowerCenter
Page 01‐25
Informatica PowerCenter
Page 01‐26
Informatica PowerCenter
Page 01‐27
Informatica PowerCenter
The steps for Assigning the Users to the Group are as follows:
•Select the Group from Navigator Window
•Overview|Edit |Users
•Add the users to the group
Page 01‐28
Informatica PowerCenter
The steps for Assigning the Roles to the Group are as follows:
1. Select Group from Navigator Window
2. Overview|Edit |Roles
3. Select the Appropriate Roles from:
• System‐Defined Roles
• Custom Roles
4. Press OK
The steps for Assigning the Privileges to the Group are as follows:
1. Select Group from Navigator Window
2. Overview|Edit |Privileges
3. Select the appropriate privileges from:
• Tools: Includes the privilege
g to log
g in to the Administration
Console.
Page 01‐29
Informatica PowerCenter
Folders provide a way to organize and store all metadata in the repository,
including mappings, schemas, and sessions. Folders are designed to be
flexible, to logically organize the repository. Each folder has a set of
configurable properties that helps to define how users access the folder.
For example, create a folder that allows all repository users to see objects
within the folder, but not to edit them. Or, create a folder that allows users
to share objects within the folder.
Folder Attributes
• FOLDER OWNER ‐ User who serves as focal point to folder
permissions
• PERMISSIONS ‐ Rights to read, write, and/or execute objects in a
folder
• SHARED ‐ Property that allows users to make shortcuts in a
f ld
folder
• SHORTCUT ‐ A dynamic link to an object stored in a shared
folder
• VERSIONS ‐ Folder iterations that indicate development
stages
A folder can be designated as shared by checking ‘Allow Shortcuts’ in the
Folder Properties. When a folder is shared, users can create shortcuts to
objects in the folder, thereby sharing the metadata in the folder. Once a
folder is designated as shared, it cannot be reverted back to make it non‐
shared. If a folder is not shared, users will only be able to make copies of
objects in the folder.
Page 01‐30
Informatica PowerCenter
Page 01‐31
Informatica PowerCenter
Permissions
Allows repository users to perform Tasks within a folder. To perform Tasks
within a folder having the privilege to perform the Task in the repository as
well as the applicable folder permission is a must. The available folder
permissions are:
Page 01‐32
Informatica PowerCenter
Page 01‐33
Informatica PowerCenter
Page 01‐34
Informatica PowerCenter
Page 01‐35
Informatica PowerCenter
Page 01‐36
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐1
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐2
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐3
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐4
Dimension Modeling for Data Warehouse Introduction to Data Modeling
The PowerCenter Designer has five tools which helps to build mappings
and mapplets so that one can specify how to move and transform data
between sources and targets. The Designer helps to create source
definitions, target definitions, and transformations to build the mappings.
Page 01‐5
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐6
Dimension Modeling for Data Warehouse Introduction to Data Modeling
The first tool, the Source Analyzer, is used to identify the sources that will
be used to build the data mart or warehouse and create repository
definitions for those sources. Source definitions describe the sources that
are going to be providing data to the warehouse. The different ways to
create source definitions in the Repository.
Page 01‐7
Dimension Modeling for Data Warehouse Introduction to Data Modeling
• Source name
• Database location
• Column names
• Datatypes
• Key constraints
To import a source definition, first connect to the source database from the
client machine using a properly configured ODBC data source or gateway.
Read permission is required on the database object.
Page 01‐8
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐9
Dimension Modeling for Data Warehouse Introduction to Data Modeling
The next step in the design process is to create the target schema. This is
accomplished in the second component of the Designer, the Target
designer.
The Target designer provides a GUI interface for creating and customizing
the logical target schema. Target definitions can be customized as needed.
When the customization is complete, one can create the physical targets in
the database from SQL scripts executed from the Target designer.
Page 01‐10
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐11
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐12
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Target Definitions can also be created manually via a menu option or the
toolbar. An empty definition is created, you can enter the table name,
columns, datatypes, precision, and key information.
Page 01‐13
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐14
Dimension Modeling for Data Warehouse Introduction to Data Modeling
5. Select the relational table or tables to import the definitions into the
repository. Hold down the Shift key to select a block of tables, or hold
down the Ctrl key to make non‐contiguous selections. Also the Select All
and Select None buttons can be used to select or clear all available
targets.
6. Click OK. The selected target definitions now appear in the Navigator
under the Targets icon.
77. Choose Repository
p y | Save.
III Manual:
1. In the Target designer, choose Targets | Create.
2. Enter a name for the target and select the target type. One can create a
flat file target definition by choosing Flat File for the target type.
3. The target name entered is the name of the new table in the database
when a relational target definition is created. Follow any database‐
specific naming conventions.
4. Click Create.
5. An empty table structure appears in the workspace. (It may be covered
by the dialog box.) The new target definition also appears within the
Navigator window.
6. If another target definition is to be created, enter a new target name and
target type and click Create.
Create Repeat this step for each target to be
created.
7. Click Done when all target definitions are created.
8. Configure the target definition i.e., add the required columns.
9. Choose Repository | Save.
Page 01‐15
Dimension Modeling for Data Warehouse Introduction to Data Modeling
The above diagram shows how a mapping looks like. It has the various
transformations which the source data has to go through. Every mapping
must contain the following components:
• Source definition ‐ Describes the characteristics of a source table or
file
• Transformation ‐ Modifies data before writing it to targets. Use
different transformation objects to perform different functions
• Target Definition ‐ Defines the target table or flat file
• Connectors ‐ Connect sources, targets, and transformations so the
Integration service can move the data as it transforms it
Page 01‐16
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐17
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Active ‐ 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.
Page 01‐18
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐19
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Active Transformations:
• Source Qualifier ‐ represents all data queries from the source
• Normalizer ‐ normalizes records from VSAM or relational sources
• Aggregator ‐ performs aggregate calculations
• Filter ‐ serves as a conditional filter
• Router ‐ serves as a group conditional filter
• Rank ‐ limits records to top or bottom range
• Sorter ‐ sorts the input rows in ascending or descending order
• Update Strategy ‐ allows for logic to insert, update, delete, or reject
data
• Joiner – allows extraction of data from heterogeneous sources
• Application Source Qualifier ‐ Represents the rows that the
Integration Service reads from an application, such as an ERP source,
when
h it runs a session.
i
• Transaction Control ‐ Defines commit and rollback transactions.
• XML Generator ‐ Reads data from one or more input ports and outputs
XML through a single output port.
• XML Parser ‐ Reads XML from one input port and outputs data to one
or more output ports.
• XML Source Qualifier ‐ Represents the rows that the Integration
Service reads from an XML source when it runs a session.
Page 01‐20
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Passive Transformations:
•Expression ‐ performs simple calculations
•Lookup ‐ looks up values and passes to other objects
•Stored Procedures ‐ calls a stored procedure and captures return
values
•Sequence Generator ‐ generates unique ID values
Page 01‐21
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐22
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐23
Dimension Modeling for Data Warehouse Introduction to Data Modeling
The first step in the process of moving data between sources and targets is
to create a mapping in the Mapping Designer.
Page 01‐24
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐25
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐26
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐27
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐28
Dimension Modeling for Data Warehouse Introduction to Data Modeling
By using sorted input, Integration service does not use cache and just
performs calculations assuming the data comes in sorter order thus
improvement in performance.
Page 01‐29
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐30
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐31
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐32
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐33
Dimension Modeling for Data Warehouse Introduction to Data Modeling
Page 01‐34
Informatica PowerCenter Workflow Manager
Page 03‐1
Informatica PowerCenter Workflow Manager
Page 03‐2
Informatica PowerCenter Workflow Manager
A Workflow combines the logic of Session Tasks, other types of Tasks and
Worklets. A Session is a type of Task related to the movement of data
th gh the
through th Server.
S Tasks
T k are theth building
b ildi g blocks
bl k off a Workflow.
W kfl
Page 03‐3
Informatica PowerCenter Workflow Manager
Finally, the Workflow Tasks are connected with links to specify the order
of execution in the Workflow.
Page 03‐4
Informatica PowerCenter Workflow Manager
Page 03‐5
Informatica PowerCenter Workflow Manager
Task Developer
• Used to construct Session, Shell Command and Email Tasks
• Tasks created in Task Developer are reusable in Worklets or Workflows
Worklet Designer
• Used to construct an object which represents a set of Tasks
• Worklets are reusable in multiple Workflows
Workflow Designer
• “Maps” the execution order of Sessions, Tasks and Worklets for the
Integration Service
Page 03‐6
Informatica PowerCenter Workflow Manager
The Workflow Monitor is a tool used to monitor Workflows and Tasks. The
details about a Workflow or a Task can be viewed in either Gantt Chart view
or Task view. Workflows can be run, stopped, aborted, and resumed from
the Workflow Monitor. The Workflow Monitor displays Workflows that
have run at least once.
Page 03‐7
Informatica PowerCenter Workflow Manager
Page 03‐8
Informatica PowerCenter Workflow Manager
The Task view displays details about Workflow runs in a report format. It
displays the following details:
• Task name ‐ The name of the task will be displayed under the
workflow name
• Folder name ‐ The name of the folder containing the Task
• Status ‐ The status of the Task or Workflow
• Workflow name ‐ The name of the Workflow
• Worklet name ‐ The name of the Worklet
• Start time ‐ The time that the Integration Service starts executing
the Task or Workflow
• Completion time ‐ The time that the Integration service finishes
executing the Task or Workflow
• Status
St t message g ‐ Message
M g from
f th
the Integration
I t g ti Service
S i regarding
g di g
the status of the Task or Workflow
• User name ‐ Name of the user who owns the Workflow or Task
• Run type ‐ The method used to start the Workflow. Workflow can be
manually started or scheduled to start
• Task type ‐ The type of the Task
Page 03‐9
Informatica PowerCenter Workflow Manager
The Gantt Chart view displays details about Workflow runs in chronological
format. It displays the following information:
Page 03‐10
Informatica PowerCenter Workflow Manager
Before running any Workflow, the first thing that needs to be done is to
configure a database connection. A database connection specifies the
source and target database connection information. When a session that
reads from or writes to a relational database is created or modified, only
configured source and target databases can be selected.
For every source and target database used in the session, a separate
database connection has to be configured.
Page 03‐11
Informatica PowerCenter Workflow Manager
Page 03‐12
Informatica PowerCenter Workflow Manager
Page 03‐13
Informatica PowerCenter Workflow Manager
Page 03‐14
Informatica PowerCenter Workflow Manager
Reusable Tasks can be used in multiple Workflows in the same folder. The
reusable Tasks can be seen in the Tasks node in the Navigator window.
Page 03‐15
Informatica PowerCenter Workflow Manager
Tasks created within the Workflow are non‐reusable Tasks. The Non‐
reusable Tasks can be seen in the Sessions node in the Navigator window.
Page 03‐16
Informatica PowerCenter Workflow Manager
A Session Task is the basic object created in the Workflow Manager that
assembles the information contained in a mapping together with database
connection and other information. It is the vehicle for commanding the
Integration Service to extract, transform, and load data and report session
status and performance characteristics. A Workflow groups two or more
sessions to run sequentially or concurrently or as specified in the
Workflow.
Page 03‐17
Informatica PowerCenter Workflow Manager
Page 03‐18
Informatica PowerCenter Workflow Manager
Page 03‐19
Informatica PowerCenter Workflow Manager
To create a Workflow:
1. Open the Workflow Designer.
2. Choose Workflows | Create menu option.
3. Enter a name for the new Workflow.
4. Click OK.
To create a Task:
1. In the Workflow Designer, click the Session Task icon on the Tasks
toolbar.
2. Choose Tasks | Create menu option.
3. Select Session task for the Task type. Enter a name for the Session
Task.
4. Click Create. The Mappings dialog box appears.
5 Select
5. S l t the
th mapping
i g to
t be
b usedd in
i the
th Session
S i Task T k and
d click
li k OK.
OK
6. Click Done. The Session Task appears in the workspace.
Page 03‐20
Informatica PowerCenter Workflow Manager
9. Click in the right corner of the Expression field, enter the non‐aggregate
expression using one of the input ports, then click OK. To group by on a
column check the group by checkbox.
10. Click Add and enter a name and data type for the aggregate expression
port. Make the port an output port by clearing Input (I).
11. Click in the right corner of the Expression field to open the Expression
Editor. Enter the aggregate expression, click Validate, then click OK.
p
12. Make sure the expression validates before closing
g the Expression
p Editor.
13. Add default values for specific ports as necessary.
14. Click OK.
15. Choose Repository | Save to save changes to the mapping.
Page 03‐21
Informatica PowerCenter Workflow Manager
You can debug a valid mapping to know about data and error conditions.
To debug a mapping, the Debugger is configured and run from within the
Mapping Designer.
When the Debugger is run, it pauses at breakpoints and allows viewing and
editing of transformation output data.
• Existing
E i ti g non‐reusable
bl session
i ffor th
the mapping.
i g The
Th DDebugger
b gg uses
existing source, target, and session configuration properties. When the
Debugger is run, the PowerCenter Server runs the non‐reusable session
and the existing workflow.
• Existing reusable session for the mapping. The Debugger uses existing
source, target, and session configuration properties. When the
Debugger is run, the PowerCenter Server runs a debug instance of the
reusable session and creates and runs a debug workflow for the
session.
Page 03‐22
Informatica PowerCenter Workflow Manager
• Debug session instance created for the mapping. Using the Debugger
Wizard, the user can configure source, target, and session
configuration properties. When the Debugger is run, the PowerCenter
Server runs a debug instance of the debug workflow and creates and
runs a debug workflow for the session.
Debug Process
Use the following process to debug a mapping:
1. Create breakpoints. Create breakpoints in a mapping if PowerCenter
Server is to evaluate data and error conditions.
2. Configure the Debugger. Use the Debugger Wizard to configure the
Debugger for the mapping. Select the session type the PowerCenter
Server uses when it runs Debugger. When a debug session is created, a
b t off session
subset i properties
ti within
ithi th
the D
Debugger
b gg Wizard
Wi d need d to
t be
b
configured, such as source and target location. You can also choose to
load or discard target data.
3. Run the Debugger. Run the Debugger from within the Mapping
Designer. When the Debugger is run, the Designer connects to the
PowerCenter Server. The PowerCenter Server initializes the Debugger
and runs the debugging session and workflow. The PowerCenter
Server reads the breakpoints and pauses the Debugger when the
breakpoints evaluate to true.
Page 03‐23
Informatica PowerCenter Workflow Manager
5. Modify data and breakpoints. When the Debugger pauses, data can be
modified to see the effect on transformations, mapplets, and targets as
the data moves through the pipeline. Breakpoint information can also
be modified
Page 03‐24
Informatica PowerCenter Workflow Manager
Page 03‐25
Informatica PowerCenter Workflow Manager
Page 03‐26
Informatica PowerCenter Workflow Manager
Page 03‐27
Informatica PowerCenter Workflow Manager
Page 03‐28
Informatica PowerCenter Transformations
Page 04‐1
Informatica PowerCenter Transformations
Page 04‐2
Informatica PowerCenter Transformations
The Integration service queries the lookup table based on the lookup ports
in the transformation. It compares Lookup Transformation port values to
lookup table column values based on the lookup condition. The result of the
lookup is passed to other transformations and the target.
Page 04‐3
Informatica PowerCenter Transformations
A lookup condition has to be specified in the Condition tab. One input port
is needed for each column used in the lookup condition. The same input
port can be used more than once in a condition, and also multiple
diti
conditions can be
b specified.
ifi d
Page 04‐4
Informatica PowerCenter Transformations
Page 04‐5
Informatica PowerCenter Transformations
Page 04‐6
Informatica PowerCenter Transformations
Page 04‐7
Informatica PowerCenter Transformations
Page 04‐8
Informatica PowerCenter Transformations
The Filter Transformation limits the rows sent to the target or other
transformations. All the rows from a source transformation can be passed
through the Filter Transformation based on a filter condition. All ports in a
Filter Transformation are input/output, and only rows that meet the
condition pass through the Filter Transformation. In some cases, you need
to filter data based on one or more conditions before writing it to targets.
For example, if you have a human resources target containing information
about current employees, you might want to filter out employees who
have resigned.
Page 04‐9
Informatica PowerCenter Transformations
The Filter Condition can be entered in the expression editor. The expression
editor is invoked by clicking on down arrow next to Filter Condition option
under the Properties tab of Edit Transformation window.
For example, if you want to filter out rows for employees whose salary is
less than $30,000, you enter the following condition:
Multiple conditions can be defined using the AND and OR logical operators.
TRUE and FALSE values are implicit return values from any condition and
hence need not be specified in the condition expression. If the filter
condition evaluates to NULL, the row is assumed to be FALSE.
Page 04‐10
Informatica PowerCenter Transformations
Page 04‐11
Informatica PowerCenter Transformations
Page 04‐12
Informatica PowerCenter Transformations
The Joiner Transformation is used to join two sources with at least one
matching port. The Joiner Transformation uses a condition that matches one
or more pairs of ports between the two sources. For example, you can join a
flat file with in‐house customer IDs and a relational database table that
contains user‐defined customer IDs. If two relational sources contain keys,
then a Source Qualifier Transformation can easily join the sources on those
keys. Joiner Transformations typically combine information from two
different sources that do not have matching keys, such as flat file sources.
One of the sources is specified as the master source, and the other as the
detail source. This is specified in the Ports tab of the transformation by
clicking the M (Master/Detail checkbox) column. When ports of a
transformation are added to a Joiner transformation, the ports from the first
source are automatically set as detail sources. Adding the ports from the
second transformation automatically sets them as master sources. The
master/detail relation determines how the join treats data from those
sources based on the type of join.
The Joiner Transformation supports the following join types, which are set in
the Properties tab:
• Normal (Default)
• Master Outer
• Detail Outer
• Full Outer
The condition of the join is a mandatory condition defining at least one field
from each data source that the transformation uses to perform the join.
These fields must be declared to be of the same data type. For example, the
following condition joins data from two sources based on an item ID:
ITEM_NO = ITEM_NO1
Page 04‐13
Informatica PowerCenter Transformations
Page 04‐14
Informatica PowerCenter Transformations
Page 04‐15
Informatica PowerCenter Transformations
The Rank Transformation is used to select only the top or bottom rank of
data. It can be used to return the largest or smallest numeric value in a
port or group.
All ports
t representing
ti g the
th same row sett can be
b connected
t d to
t the
th
transformation. Only the rows that fall within that rank, based on some
measure set during configuration, pass through the Rank Transformation.
Expression to transform data or perform calculations can also be written.
Page 04‐16
Informatica PowerCenter Transformations
Page 04‐17
Informatica PowerCenter Transformations
Flat Files can be used as sources and targets in a mapping. To do so, flat
file sources and targets must be defined in the repository. Flat file source
definitions can be imported or created in the Source Analyzer. Flat file
target definitions can be imported or created in the Target designer.
After the file source and target definitions are created, they can be used in
mappings.
Page 04‐18
Informatica PowerCenter Transformations
Fixed‐width and delimited flat file source and target definitions can be
imported that do not contain binary data. When importing the definition,
the file must be in a directory local to the client machine. In addition, the
Integration service must be able to access all source files during the
Workflow. When a file source or target definition is created, the properties
of the file must be defined.
The Source Analyzer and the Target designer provides a Flat File Wizard,
which prompts for the following file properties:
• File name and location
• File code page
• File type
• Column names and data types
• Number of header rows in the file
• Column size and null characters for fixed‐width files
• Delimiter type, quote character, and escape character for delimited
files
Page 04‐19
Informatica PowerCenter Transformations
Page 04‐20
Informatica PowerCenter Transformations
Page 04‐21
Informatica PowerCenter Transformations
Page 04‐22
Informatica PowerCenter Mapplets
Page 05‐1
Informatica PowerCenter Mapplets
Page 05‐2
Informatica PowerCenter Mapplets
Page 05‐3
Informatica PowerCenter Mapplets
Page 05‐4
Informatica PowerCenter Mapplets
Page 05‐5
Informatica PowerCenter Mapplets
Page 05‐6
Informatica PowerCenter Mapplets
Every mapplet ends with a Mapplet Output Transformation. The data from
the mapplet passes to the mapping through the Mapplet Output
Transformation. A mapplet must contain at least one Output
transformation with at least one connected port in the mapplet. Each
connected port in an Output transformation displays as a mapplet output
port in a mapping. Each Output transformation in a mapplet displays as an
output group in a mapping. An output group can pass data to multiple
pipelines in a mapping.
Page 05‐7
Informatica PowerCenter Mapplets
Page 05‐8
Informatica PowerCenter Mapplets
Page 05‐9
Informatica PowerCenter Mapplets
Page 05‐10
Informatica PowerCenter Mapplets
In the above example, the source flat file contains the year‐wise, monthly
sales information in one row. The objective is to split this one row of data
into multiple rows to get sales information by month.
Page 05‐11
Informatica PowerCenter Mapplets
The first step, after bringing in the source definition, would be to create a
Normalizer Transformation. Ports must be manually added under the
Normalizer tab – they cannot be dragged from other transformations.
Defining the output records structure here automatically creates the input
ports that are required to create the desired output. The value in the
Occurs column of the Normalizer tab designates the number of repeated
ports created in the Ports tab.
Page 05‐12
Informatica PowerCenter Mapplets
In the above example, the monthly sales will have the occurs value as 12.
Page 05‐13
Informatica PowerCenter Mapplets
The Designer also generates one column (port) for each OCCURS clause in
the source file to specify the positional index within an OCCURS clause. The
naming convention for the Normalizer column ID is:
GCID_occurring_field_name.
Page 05‐14
Informatica PowerCenter Mapplets
Page 05‐15
Informatica PowerCenter Mapplets
Page 05‐16
Informatica PowerCenter Mapplets
Page 05‐17
Informatica PowerCenter Mapplets
Page 05‐18
Informatica PowerCenter Mapplets
Page 05‐19
Informatica PowerCenter Mapplets
Page 05‐20
Informatica PowerCenter Workflow and Session Log
Page 06-1
Informatica PowerCenter Workflow and Session Log
Page 06-2
Informatica PowerCenter Workflow and Session Log
Page 06-3
Informatica PowerCenter Workflow and Session Log
Page 06-4
Informatica PowerCenter Workflow and Session Log
Use workflow variables when you configure the following types of tasks:
Decision tasks. Decision tasks determine how the Integration Service
runs a workflow. For example, use the Status variable to run a second
session only if the first session completes successfully.
Links. Links connect each workflow task. Use workflow variables in links
to create branches in the workflow. For example, after a Decision task,
you can create one link to follow when the decision condition evaluates
to true, and another link to follow when the decision condition evaluates
to false.
Timer tasks. Timer tasks specify when the Integration Service begins to
run the next task in the workflow. Use a user‐defined date/time variable
to specify the time the Integration Service starts to run the next task.
Use th
U the following
f ll i g keywords
k d to
t write
it expressions
i ffor user‐defined
d fi d and
d
predefined workflow variables:
AND
OR
NOT
TRUE
FALSE
NULL
SYSDATE
Page 06-5
Informatica PowerCenter Workflow and Session Log
Page 06-6
Informatica PowerCenter Workflow and Session Log
Page 06-7
Informatica PowerCenter Workflow and Session Log
While creating a user defined work flow variable verify that the name of a
user defined workflow variable does not have a $ since single $ is reserved
for system variables. Use $$ instead.
Page 06-8
Informatica PowerCenter Workflow and Session Log
Page 06-9
Informatica PowerCenter Workflow and Session Log
Page 06-10
Informatica PowerCenter Workflow and Session Log
Page 06-11
Informatica PowerCenter Workflow and Session Log
Page 06-12
Informatica PowerCenter Workflow and Session Log
Schedule Options
Run Once ‐ The Integration service runs the Workflow once, as
scheduled in the scheduler
Run Every ‐ The Integration service runs the Workflow at regular
intervals, as configured
Customized Repeat ‐ The Integration service runs the Workflow on
the dates and times specified in the Repeat dialog box
Page 06-13
Informatica PowerCenter Workflow and Session Log
Page 06-14
Informatica PowerCenter Workflow and Session Log
Page 06-15
Informatica PowerCenter Workflow and Session Log
Page 06-16
Informatica PowerCenter Workflow and Session Log
Command line mode: You invoke and exit pmcmd each time you issue a
command. You can write scripts to schedule workflows with the command
line syntax. Each command you write in command line mode must include
connection information to the Integration Service.
Interactive Mode: You establish and maintain an active connection to the
Integration Service. This lets you issue a series of commands.
Page 06-17
Informatica PowerCenter Workflow and Session Log
When you run pmcmd in command line mode, you enter connection
information such as domain name, Integration
To run pmcmd commands in command line mode:
At the command prompt, switch to the directory where the pmcmd
executable is located.
Enter pmcmd followed by the command name and its required
options and arguments:
• pmcmd command_name [‐option1] argument_1 [‐
option2] argument_2...
Service name, user name and password in each command. For example, to
start
t t the
th workflow
kfl “wf_SalesAvg”
“ f S l A g” in i
folder “SalesEast,” use the following syntax:
D:\Informatica\powercenter8.5.1\server\bin>pmcmd startworkflow ‐sv
INTIM0045 ‐d Informatica8 ‐u INF1 ‐p INF1 ‐f INF1FLD wf_SalesAvg
Page 06-18
Informatica PowerCenter Workflow and Session Log
Page 06-19
Informatica PowerCenter Workflow and Session Log
Page 06-20
Informatica PowerCenter Workflow and Session Log
The Session Log contains informational, warning, and error messages from
the session processes.
The session log includes a load summary that reports the number of rows
inserted, updated, deleted, and rejected for each target as of the last
commit point. The Integration service reports the load summary for each
session by default.
Page 06-21
Informatica PowerCenter Workflow and Session Log
Session Logs options are configured in the session properties. The following
information can be configured for a session log:
• Location ‐ The directory where the session log should be created. By
default, the Integration service creates the session log in the
directory configured for the $PMSessionLogDir server variable. A
different directory can be entered, but if the directory does not exist
or is not local to the Integration service that runs the session, the
session fails
• Name ‐ The session log can be named or the default name can be
accepted. The default name for the session log is s_mapping [Link]
• Archive ‐ By default, the Integration service does not archive session
logs. It creates one session log for each session and overwrites the
existing log with the latest session log. We can specify the number of
l g fil
log files to
t be
b created
t d by
b alterating
lt ti g the
th properties‐
ti Save
S session
i llogg
for these runs, in Task properties‐Config objects‐log options
• Tracing levels ‐ Setting a tracing level for the session can control the
type of information the Integration service includes in the session log.
By default, the Integration service uses tracing levels configured in
the mapping
The name and location of the session log can be configured on the
Properties tab of the session properties in the Workflow Manager.
Page 06-22
Informatica PowerCenter Workflow and Session Log
The amount of detail in the session log depends on the tracing level set.
Tracing levels can be defined for each transformation or for the entire
session. By default, the Integration service uses tracing levels configured in
the mapping.
Setting a tracing level for the session overrides the tracing levels configured
for each transformation in the mapping. If a normal tracing level or higher is
selected, the Integration service writes row errors into the session log,
including the transformation in which the error occurred and complete row
data.
Page 06-23
Informatica PowerCenter Workflow and Session Log
Generally the tracing level is kept at Normal. For debugging purpose, the
tracing level is set to Verbose Data to get a row by row data loading status.
Page 06-24
Informatica PowerCenter Workflow and Session Log
Session logs are text files that can be opened with any text editor. The
Integration service saves session logs in the directory specified in the
Session Log File Directory field in the session properties.
Session logs can be viewed through the Workflow Monitor. The Workflow
Monitor creates a temporary file that stores the session log. A session log
file can be viewed even if the session fails.
The Integration service generates the session log based on the Integration
service code page. The language of the session log can be specified based
on the locale of the machine hosting the Integration service .
Page 06-25
Informatica PowerCenter Workflow and Session Log
Page 06-26
Informatica PowerCenter Workflow and Session Log
To control how rows are flagged for insert, update, delete, or reject within
a mapping, add an Update Strategy transformation to the mapping. The
update strategy can be also be defined when a session is configured. All
rows can be flagged for insert, delete, or update. Alternatively the data
driven option can be selected, where the Integration service follows
instructions coded into Update Strategy Transformations within the
session mapping.
Page 06-27
Informatica PowerCenter Workflow and Session Log
Example:
The following expression marks items with an ID number of 1001 for
deletion, and all
other items for insertion:
IIF( ITEM_ID = 1001, DD_DELETE, DD_INSERT )
Page 06-28
Informatica PowerCenter Workflow and Session Log
Page 06-29
Informatica PowerCenter Workflow and Session Log
Page 06-30
Informatica PowerCenter Workflow and Session Log
Page 06-31
Informatica PowerCenter Workflow and Session Log
Page 06-32
Informatica PowerCenter Additional Transformations
Page 07‐1
Informatica PowerCenter Additional Transformations
Page 07‐2
Informatica PowerCenter Additional Transformations
Page 07‐3
Informatica PowerCenter Additional Transformations
Router Transformation tests data for one or more conditions and gives the
option to route rows of data that do not meet any of the conditions to a
default output group.
Page 07‐4
Informatica PowerCenter Additional Transformations
The Sorter Transformation can sort data from relational tables or flat files.
Sort takes place on the Integration service machine. Multiple sort keys are
supported. The Sorter Transformation is often more efficient than a sort
performed on a database with an ORDER BY clause.
The Sorter Transformation can also be used to sort data passing through
an Aggregator Transformation configured to use sorted input.
Page 07‐5
Informatica PowerCenter Additional Transformations
Page 07‐6
Informatica PowerCenter Additional Transformations
Page 07‐7
Informatica PowerCenter Additional Transformations
The stored procedure must exist in the database before creating a Stored
Procedure Transformation, and the stored procedure can exist in a source,
target, or any database with a valid connection to the Integration service.
Page 07‐8
Informatica PowerCenter Additional Transformations
Page 07‐9
Informatica PowerCenter Additional Transformations
1. Create the stored procedure in the database and test it through the
provided database client tools.
2. Import or create the Stored Procedure Transformation, by providing
ports for any necessary input/output and return values.
3. Determine whether to use the transformation as connected or
unconnected. Determine how the stored procedure relates to the
mapping before configuring the transformation.
4. If connected, map the appropriate input and output ports. Click and
drag the appropriate input flow ports to the transformation, and create
mappings from output ports to other transformations.
5. If unconnected, configure it to run from an expression in another
t
transformation.
f ti The
Th expression
i can contain
t i variables,
i bl and d may or may
not include a return value.
6. Configure the session. The session properties in the Workflow Manager
includes options for error handling when running stored procedures
and several SQL override options.
Page 07‐10
Informatica PowerCenter Additional Transformations
A Sequence Generator Transformation can be used to generate numeric values for the
following:
• Create keys
• Replace missing values
• Cycle through a sequential range of numbers
NEXTVAL
The NEXTVAL port is used to generate a sequence of numbers by connecting it to a
transformation or target.
It is used to connect to a downstream transformation to generate the sequence based on
the Current Value and Increment By properties. It can be connected to multiple
transformations to generate unique values for each row in each transformation.
For example, NEXTVAL can be connected to two target tables in a mapping to generate
unique primary key values. The Integration service creates a column of unique primary key
values for each target table. The figure above illustrates connecting NEXTVAL to two target
tables in a mapping.
Approximately two billion primary or foreign key values can be created with the Sequence
G
Generatort by
b connecting
ti g the
th NEXTVAL portt to
t the
th desired
d i d transformation
t f ti or target
t g t and
d
using the widest range of values (1 to 2147483647) with the smallest interval (1).
CURRVAL
CURRVAL is the NEXTVAL value plus one or NEXTVAL plus the Increment By value. When a
row enters the transformation connected to the CURRVAL port, the Integration service
passes the last‐created NEXTVAL value plus one.
Page 07‐11
Informatica PowerCenter Additional Transformations
Page 07‐12
Informatica PowerCenter Additional Transformations
Page 07‐13
Informatica PowerCenter Additional Transformations
Page 07‐14
Informatica PowerCenter Additional Transformations
Page 07‐15
Informatica PowerCenter Additional Transformations
Page 07‐16
Informatica PowerCenter Additional Transformations
Page 07‐17
Informatica PowerCenter Additional Transformations
Page 07‐18
Informatica PowerCenter Additional Transformations
Page 07‐19
Informatica PowerCenter Workflow Tasks
Page 08‐1
Informatica PowerCenter Workflow Tasks
Page 08‐2
Informatica PowerCenter Workflow Tasks
Any valid UNIX command or shell script can be used for UNIX servers, or any
valid DOS command or batch file for Windows servers.
The status of the command (success or failure) is stored in the pre‐defined
variable @command_Task_name.STATUS.
For example, a command Task may be used to copy a file from one directory
to another. For a Windows Server the following DOS command will be used
t copy a file
to fil [Link]
SALES DAT from
f the
th source directory,
di t C:\SALES
C \SALES to
t the
th target
t g t
directory E:\MARKETING
COPY C:\SALES\[Link] E:\MARKETING
For a UNIX server, the following command will be used to perform a similar
operation:
Cp sales/[Link] /marketing
Each command runs in the same environment (UNIX or Windows) as the
Integration service.
Page 08‐3
Informatica PowerCenter Workflow Tasks
Page 08‐4
Informatica PowerCenter Workflow Tasks
Page 08‐5
Informatica PowerCenter Workflow Tasks
Email variables and format tags can be used in an email message for
post‐session emails.
Page 08‐6
Informatica PowerCenter Workflow Tasks
In the above figure you see a sample email text, which gives the following
details
• Name of the session and mapping
• Session completion time
• Number of records loaded
Page 08‐7
Informatica PowerCenter Workflow Tasks
Page 08‐8
Informatica PowerCenter Workflow Tasks
When a Timer Task is used in a Workflow, the next Task in the Workflow
(after the timer Task) can be started at an exact time and date. After the
start time of another Task, a wait period can be set in the Workflow, or
Worklet before starting the next Task.
For example, if there are two sessions in a Workflow and the second
i should
session h ld start
t t 1 minute
i t after
ft th
the fi
firstt session
i completes;
l t A Ti
Timer
Task can be used after the first session.
Page 08‐9
Informatica PowerCenter Workflow Tasks
When all the Tasks in the branch from the Start Task to the Event‐Raise
Task complete, the Event‐Raise Task triggers the event. The Event‐Wait
Task waits for the Event‐Raise Task to trigger the event before continuing
with the rest of the Tasks in its branch.
Page 08‐10
Informatica PowerCenter Workflow Tasks
If the Event Wait Task has to wait for a user‐defined event then, it has to be
triggered by the Event‐Raise Task. The user‐defined event has to be
specified in this Task.
Page 08‐11
Informatica PowerCenter Workflow Tasks
One decision condition can be specified per Decision Task. After the
Integration service evaluates the Decision Task, the pre‐defined condition
variable can be used in other expressions in the Workflow to develop the
Workflow.
You can use the Decision task instead of multiple link conditions in a
workflow. Instead of specifying multiple link conditions, use the pre‐
defined Condition variable in a Decision task to simplify link conditions.
Page 08‐12
Informatica PowerCenter Workflow Tasks
Page 08‐13
Informatica PowerCenter Workflow Tasks
Page 08‐14
Informatica PowerCenter Workflow Tasks
Page 08‐15
Informatica PowerCenter Workflow Tasks
Page 08‐16
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐1
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐2
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐3
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Use the following guidelines when you enter pre‐ and post‐session SQL
commands in the Source Qualifier transformation or target instance:
•You can use any command that is valid for the database type.
However, the Integration Service does not allow nested comments, even
though the database might.
•You can use mapping parameters and variables in the source pre‐ and
post‐session SQL commands.
•Use a semi‐colon (;) to separate multiple statements.
•The Designer does not validate the SQL.
Page 09‐4
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐5
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
• Manually enter the entire query: The resulting query overrides all other
options configured in the transformation
Page 09‐6
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Steps:
1. Open the Source Qualifier transformation, and click the Properties tab.
2. Click the Open button in the SQL Query field. The SQL Editor dialog box
appears.
3. Click Generate SQL.
The Designer displays the default query it generates when querying rows
from all sources included in the Source Qualifier transformation.
4. Enter your own query in the space where the default query appears.
Every column name must be qualified by the name of the table, view, or
synonym in which it appears. For example, if you want to include the
ORDER_ID column from the ORDERS table, enter ORDERS.ORDER_ID. You
can double‐click column names appearing in the Ports window to avoid
typing the name of every column.
5 Select
5. S l t the
th ODBC data
d t source containing
t i i g the
th sources included
i l d d in
i the
th
query.
6. Enter the user name and password to connect to this database.
7. Click Validate.
The Designer runs the query and reports whether its syntax was correct.
9. Choose Repository‐Save.
Page 09‐7
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐8
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
General Rules:
Use the following rules and guidelines when you enter target update
queries:
• When you save a mapping, the Designer verifies that you have
referenced valid port names. It does not verify the accuracy of the SQL.
• A WHERE clause that does not contain any column references updates
all rows in the target table, or no rows in the target table, depending on
the WHERE clause and the data from the mapping.
For example, the following query sets the EMP_NAME to 'MIKE SMITH'
for all rows in the target table if any row of the transformation has
EMP_ID > 100.
UPDATE T_SALES set EMP_NAME = 'MIKE SMITH' WHERE :TU.EMP_ID >
100
• If the
th WHERE clause
l contains
t i no portt references,
f the
th mappingi g
updates the same set of rows for each row of the mapping.
For example, the following query updates all employees with EMP_ID >
100 to have the EMP_NAME from the last row in the mapping.
• UPDATE T_SALES set EMP_NAME = :TU.EMP_NAME WHERE EMP_ID >
100
Page 09‐9
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐10
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐11
Informatica PowerCenter Pre‐Post SQL , SQL Override, Update override
Page 09‐12
Informatica PowerCenter Indirect Files
Page 10‐1
Informatica PowerCenter Indirect Files
Page 10‐2
Informatica PowerCenter Indirect Files
To use multiple source files, you create a file containing the names and
directories of each source file you want the Integration service to use.
This file is referred to as a file list.
When you configure the session properties, enter the file name of the
file list in the Source Filename field and enter the location of the file list
in the Source File Directory field. When the session starts, the
Integration service reads the file list, then locates and reads the first file
source in the list. After the Integration service reads the first file, it
locates and reads the next file in the list.
The Integration service writes the path and name of the file list to the
session log. If the Integration service encounters an error while
accessing a source file, it logs the error in the session log and stops the
session.
Page 10‐3
Informatica PowerCenter Indirect Files
The source file type option in the Session properties enables you to select
whether the source file is direct or Indirect. The Direct or Indirect option
indicates whether the source file contains the source data, or whether it
contains a list of files with the same file properties. Choose Direct if the
source file contains the source data. Choose Indirect if the source file
contains a list of files.
Page 10‐4
Informatica PowerCenter Indirect Files
Page 10‐5
Informatica PowerCenter Indirect Files
Page 10‐6
Informatica PowerCenter Indirect Files
Page 10‐7
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐1
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐2
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐3
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐4
Informatica PowerCenter Mapping Parameter And Mapping Variable
When the Integration Service needs an initial value, and you did not declare
an initial value for the parameter or variable, the Integration Service uses a
default value based on the data type of the parameter or variable.
The following table lists default Values for Mapping Parameters and
Variables Based on Data type
Data Default Value
String Empty string
Numeric 0
Datetime 1/1/1753 A.D. or 1/1/1
* when Integration Service is
configured for compatibility with 4.0.
Page 11‐5
Informatica PowerCenter Mapping Parameter And Mapping Variable
For example, you want to use the same session to extract transaction
records for each of your customers individually. Instead of creating a
separate mapping for each customer account, you can create a mapping
parameter to represent a single customer account. Then you can use the
parameter in a source filter to extract only data for that customer
account. Before running the session, you enter the value of the
parameter in the parameter file.
To reuse the same mapping to extract records for other customer
accounts, you can enter a new value for the parameter in the parameter
file and run the session.
Page 11‐6
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐7
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐8
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐9
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐10
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐11
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐12
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐13
Informatica PowerCenter Mapping Parameter And Mapping Variable
Start Value
The start value is the value of the variable at the start of the session. The
Integration Service looks for the start value in the following order:
•Value in parameter file
•Value in pre‐session variable assignment
•Value saved in the repository
•Initial value
•Default value
For example, you create a mapping variable in a mapping or mapplet and enter an
initial value, but you do not define a value for the variable in a parameter file. The
first time the Integration Service runs the session, it evaluates the start value of
the variable to the configured initial value. The next time the session runs, the
Integration Service evaluates the start value of the variable to the value saved in
the repository.
Current Value
The current value is the value of the variable as the session progresses. When a
session starts, the current value of a variable is the same as the start value. As the
session progresses, the Integration Service calculates the current value using a
variable function that you set for the variable. The current value can change as
the Integration Service evaluates the current value of a variable as each row
passes through the mapping. The final current value for a variable is saved to the
repository at the end of a successful session. When a session fails to complete,
the Integration Service does not update the value of the variable in the
repository.
Page 11‐14
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐15
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐16
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐17
Informatica PowerCenter Mapping Parameter And Mapping Variable
Page 11‐18
Informatica PowerCenter FTP connection
Page 12‐1
Informatica PowerCenter FTP connection
Page 12‐2
Informatica PowerCenter FTP connection
Page 12‐3
Informatica PowerCenter FTP connection
Page 12‐4
Informatica PowerCenter FTP connection
Page 12‐5
Informatica PowerCenter FTP connection
Page 12‐6
Informatica PowerCenter FTP connection
Page 12‐7
Informatica PowerCenter Dynamic Lookup
Page 13‐1
Informatica PowerCenter Dynamic Lookup
Page 13‐2
Informatica PowerCenter Dynamic Lookup
Page 13‐3
Informatica PowerCenter Dynamic Lookup
Page 13‐4
Informatica PowerCenter Dynamic Lookup
Page 13‐5
Informatica PowerCenter Dynamic Lookup
When the Integration Service reads a row from the source, it updates the
lookup cache by performing one of the following actions:
•Inserts the row into the cache. The row is not in the cache and you
specified to insert rows into the cache. You can configure the
transformation to insert rows into the cache based on input ports or
generated sequence IDs. The Integration Service flags the row as insert
•Updates the row in the cache. The row exists in the cache and you
specified to update rows in the cache. The Integration Service flags the
row as update. The Integration Service updates the row in the cache based
on the input ports.
•Makes no change to the cache. The row exists in the cache and you
specified to insert new rows only. Or, the row is not in the cache and you
specified to update existing rows only. Or, the row is in the cache, but
b d on th
based the lookup
l k condition,
diti nothing
thi g changes.
h g The Th Integration
I t g ti Service
S i
flags the row as unchanged.
Page 13‐6
Informatica PowerCenter Dynamic Lookup
Page 13‐7
Informatica PowerCenter Dynamic Lookup
When the Integration Service reads a row, it changes the lookup cache
depending on the results of the lookup query and the Lookup
transformation properties you define. It assigns the value 0, 1, or 2 to the
NewLookupRow port to indicate if it inserts or updates the row in the
cache, or makes no change.
Page 13‐8
Informatica PowerCenter Dynamic Lookup
Page 13‐9
Informatica PowerCenter Dynamic Lookup
Page 13‐10
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐1
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐2
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Use this mapping when you do not you need to keep any previous
versions / history of dimensions in the table.
Page 14‐3
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐4
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐5
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐6
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐7
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐8
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐9
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐10
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
For example, in the data below, the versions are 0, 1, and 2. The highest
version number contains the current dimension data.
PM_PRIMARYKEY ITEM STYLES PM_VERSION_NUMBER
65000 Sandal 5 0
65001 Sandal 14 1
65002 Sandal 17 2
Page 14‐11
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐12
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐13
Informatica PowerCenter Creating a Type 2 Dimension/Version Data Mapping
Page 14‐14
Informatica Powercenter
Lab Book
Copyright © 2011 IGATE Corporation. All rights reserved. No part of this publication shall be
reproduced in any way, including but not limited to photocopy, photographic, magnetic, or other
record, without the prior written permission of IGATE Corporation.
IGATE Corporation considers information included in this document to be Confidential and
Proprietary.
Informatica Powercenter
Table of Contents
Table of Contents........................................................................................... 2
Lab 1‐1 Create a Folder ..................................................................................... 3
Lab 2‐1 Analyze Source Data ............................................................................... 7
Lab 2‐2 Design a Target Schema .......................................................................... 18
Lab 2‐3 Create a Mapping ................................................................................. 25
Lab 3‐1 Creating Workflow ................................................................................ 40
Lab 3‐2 Start and Monitor Workflows.................................................................... 51
Lab 4‐1 Sales Summary .................................................................................... 59
Lab 5‐1 New Customer .................................................................................... 66
Lab 6‐1 Flat File Join ....................................................................................... 74
Lab 7‐1 Create a Mapplet .................................................................................. 80
Lab 7‐2 Quarterly‐Sales Mapping ......................................................................... 85
Lab 7‐3 Annual Sales Mapping ............................................................................ 95
Lab 8‐1 Updating Current Items .......................................................................... 99
Lab 9‐1 Listing Order Details ............................................................................ 103
Lab 10‐1 Router Transformation ........................................................................ 107
Lab 11‐1 Sequence Generator Transformation ......................................................... 113
Lab 12‐1 Stored Procedure Transformation ............................................................ 118
Lab 13‐1 Configure an Email Task ....................................................................... 124
Lab 14‐1 Configure a Command Task ................................................................... 128
Lab 15‐1 Event‐Wait task................................................................................. 130
Lab 16‐1 Pre‐SQL and Post‐SQL ......................................................................... 131
Lab 17‐1 Multiple Source Files(Indirect File) ........................................................... 132
Lab 18‐1 Mapping Parameter ........................................................................... 133
Lab 19‐1 Mapping Variable .............................................................................. 134
Lab 20‐1 FTP Connection ................................................................................ 135
Lab 21‐1 Dynamic Lookup ............................................................................... 136
Lab 22‐1 Using Mapping Wizard for SCD Type1 ........................................................ 138
Lab 23‐1 Using Mapping Wizard for SCD Type2........................................................ 144
Appendix A – Sources and Targets used in the Mappings ........................................... 148
Page 2 of 158
Informatica Powercenter
Time 15 Minutes
iii. Select the repository and click the connect icon in the toolbar.
Page 3 of 158
Informatica Powercenter
Note: The Add Domain Name,Gateway Host,Gateway Port are required when you
connect to the repository for the first time. Subsequent connections to the repository
require only the Username and Password.
Create a Folder
Page 4 of 158
Informatica Powercenter
Page 5 of 158
Informatica Powercenter
Page 6 of 158
Informatica Powercenter
Time 15 Minutes
28
Getting connected to PowerCenter Designer
1. START PROGRAMS | INFORMATICA POWERCENTER CLIENT | DESIGNER.
You can connect to the repository in the following ways:
i. Double click on the repository, or
ii. Select the repository and select the menu option REPOSITORY | CONNECT, or
Page 7 of 158
Informatica Powercenter
8. To open the folder, right click on the folder and select Open.
Note : An open folder is required in order to add, delete or modify objects. All of the
work is performed in the Workspace Window, to the right of the Navigator Window (i.e. ‐
Where the tools such as the Source Analyzer, Warehouse Designer, Mapplet Designer,
etc., are active). The objects created in the Workspace, will appear in the Navigator
Window.
1. In the Designer’s Navigator Window, highlight your TRGx folder and select TOOLS |
SOURCE ANALYZER or open the folder. This opens the Source Analyzer window. You
can also click on the Source Analyzer button shown below to open Source Analyzer :
Page 8 of 158
Informatica Powercenter
2. Notice the folder name and the repository names are displayed in the application title
bar and Open Folders drop‐down list.
Page 9 of 158
Informatica Powercenter
Page 10 of 158
Informatica Powercenter
Page 11 of 158
Informatica Powercenter
Page 12 of 158
Informatica Powercenter
iv. Select the DataDirect 5.2 Oracle Wire Protocol and enter the Data Source Name,
Description and Server Name.
Page 13 of 158
Informatica Powercenter
10. In the Select Tables box, expand the owner name until you see a TABLES listing. Select the
EMPLOYEES table.
HINT: To select multiple tables, press the Ctrl key while selecting each table with a
single mouse click.
Page 14 of 158
Informatica Powercenter
11. Click OK. The source table definition now appear in the Source Analyzer workbook.
Note: Using Designer’s Navigator Window, notice the source definition has also been
added to the Source section, or node, in your folder
1. In the Source Analyzer workbook, for the source definition, expand the Key Types
column.
Page 15 of 158
Informatica Powercenter
HINT: When the source definitions are in normal mode, hold the mouse over the
separator between the Key Types column and the Name column. When the mouse
turns into a bold double‐arrow, click and drag the mouse to the right to expand the
column.
1. In the Source Analyzer workbook, double‐click on the EMPLOYEES table. The Edit
Tables dialog box appears.
2. Select the Table tab.
3. In the Description Window, enter:
“This is the EMPLOYEES source table containing data of employees in the company”
Page 16 of 158
Informatica Powercenter
7. If you want to enter comments for additional columns, repeat the above steps.
8. Click on OK to save the comments and close the Edit Tables dialog box.
9. Select REPOSITORY | SAVE to save your folder in the repository.
Page 17 of 158
Informatica PowerCenter Lab 2-2
Time 10 Minutes
28
Understand TARGET Designer
1. Select TOOLS | TARGET DESIGNER to open the TARGET Designer or click on the TARGET
Designer button as shown below.
2. Make sure you are in the Workbook mode, by selecting VIEW | WORKBOOK. You should
see the workbook tab.
Page 18 of 158
Informatica PowerCenter Lab 2-2
Page 19 of 158
Informatica PowerCenter Lab 2-2
3. Click on the Source Analyzer button. The tab now displays the Source Analyzer icon as
shown below.
Page 20 of 158
Informatica PowerCenter Lab 2-2
6. If you need to switch back and forth between the tools, you can click on the
appropriate workbook tab, or select WINDOW | WINDOWS and select the window.
1. Select TARGETS | CREATE. The Create Target Table dialog box appears.
2. Enter the name of the target, Tgt_Employees_x.
3. Select the database type for the target table, i.e. Oracle.
4. Click on Create and Done.
5. The new table definition appears in the Target Designer workbook.
6. The target schema definition has also been added to your folder’s Targets section, or
node.
7. Double‐click on the Tgt_Employees_x table. The Edit Tables dialog box appears.
Page 21 of 158
Informatica PowerCenter Lab 2-2
ii. Once the table has been defined, close the Edit Tables dialog box
iii. Save the newly designed schema to the repository.
Page 22 of 158
Informatica PowerCenter Lab 2-2
7. Double‐click on the Tgt_Employees_x table. The Edit Tables dialog box appears. Click on
Rename under the Table tab.
8. Click on the Columns tab and note the columns in the table.
9. Save the newly designed schema to the repository.
Create the physical target in the database
Page 23 of 158
Informatica PowerCenter Lab 2-2
3. In the Filename entry box, accept the default script file name, [Link].
4. Select the Selected tables radio button.
Note: Selecting the All tables radio button will write the code for all tables, which are in
the Warehouse Designer workspace window.
5. Under Generation options, make sure the Create Table, Primary Key, Foreign Key and
Drop Table options are checked.
6. Click on the Connect button.
7. Log in to the target database, using the proper ODBC connect string.
8. Click the Generate and Execute button.
9. If you receive a prompt asking if you want to overwrite the contents of the
[Link] file, click on OK.
10. The [Link] containing the DDL script to create the Tgt_Employees_x table is
created and runs against the target database.
11. Scroll through the contents of the Output Window to verify that the table was
successfully created.
12. Click on the Close button.
Page 24 of 158
Informatica PowerCenter Lab 2-3
Time 30 Minutes
Solution
Create a relational target table that contains the Name as a concatenation of First
Name and Last Name
Page 25 of 158
Informatica PowerCenter Lab 2-3
Mapping Layout
1. Select TOOLS | MAPPING DESIGNER, or click on the icon. The workbook changes
to the Mapping Designer.
Page 26 of 158
Informatica PowerCenter Lab 2-3
2. Select MAPPINGS | CREATE, or click the Create Mapping icon from the Mapping
toolbar.
3. Enter M_Employee_Name_x for the new mapping name
4. Click on OK.
5. Drag the source from the navigator to the Mapping Designer. Designer creates the
Source Qualifier by default, and connects it to the source as shown below:
6. If the Source Qualifier transformation does not appear by default, Select TOOLS |
OPTIONS and click on the TABLES tab. Ensure automatic creation by checking the
Create Source Qualifiers When Opening Sources checkbox.
Page 27 of 158
Informatica PowerCenter Lab 2-3
7. Drag the source again into the workspace. The Source Qualifier transformation
automatically appears and is connected to the source. Delete the previously dragged
source from the workspace by pressing the delete key.
Note: Use the automatic Source Qualifier creation when you want to create one Source
Qualifier for each source in your mapping and disable the automatic creation when you
want to join data from different sources.
Page 28 of 158
Informatica PowerCenter Lab 2-3
Page 29 of 158
Informatica PowerCenter Lab 2-3
the pointer, which now appears as crosshairs , into the Workspace window to the
right of the Source Qualifier transformation
3. Select TRANSFORMATION | CREATE.
Page 30 of 158
Informatica PowerCenter Lab 2-3
i. In the Create Transformation Dialog box, select the type of transformation from
the pull‐down list. Enter a name for the transformation.
4. Link the following ports from the SQ_Employees_x to the new expression
transformation using any of the methods:
HINT : Hold down the Ctrl or Shift key and select the ports in the SQ_Employees_x.
Drag them to an empty line on the expression transformation. When the mouse is
released, not only will the port names (including data types, precision and scale) will
be copied from SQ_Employees_x, but links connecting the ports between the two
transformations will also be created.
Page 31 of 158
Informatica PowerCenter Lab 2-3
1. Double click on the header of the Expression transformation to enter Edit mode.
2. Click the Rename button under the Transformation tab.
3. Rename the transformation as Exp_Employee_Name_x.
Note: If the transformation was created via the TRANSFORMATION | CREATE menu
instead of the transformation toolbar, the object will have a name.
4. Click on the Ports tab.
5. Disable the output ports for FIRSTNAME and LASTNAME by removing the checkmark in
the ‘O’ (output) column – this will define the port as input only.
6. Select the FIRSTNAME port and click on the icon to add a new port and rename it
to Name. This will cause the new port to be positioned immediately after FIRSTNAME.
7. Verify whether the data type is string and increase the precision to 51.
8. Disable the input port for NAME by removing the checkmark in the ‘I’ (input) column‐
this will define the port as output only.
9. The Edit Transformations box should look as shown below:
Page 32 of 158
Informatica PowerCenter Lab 2-3
1. Click the down arrow in the expression column of the NAME port. Add Port
Icon
2. Delete the text NAME in the Formula field in the Expression Editor.
Page 33 of 158
Informatica PowerCenter Lab 2-3
4. Double‐click on the port LASTNAME and note its presence in the Formula field. Based
on which port is selected, the port details appear under the ‘Instance Name:’ section of
the ports tab.
Page 34 of 158
Informatica PowerCenter Lab 2-3
Page 35 of 158
Informatica PowerCenter Lab 2-3
1. Drag the target definition from Navigator Window into the workspace.
2. Link columns of the Expression Transformation to the target definition:
i. Select LAYOUT | AUTOLINK.
ii. In the Autolink dialog box, select the From Transformation and To
Transformation.
Page 36 of 158
Informatica PowerCenter Lab 2-3
4. The mapping is now complete and should look like the figure shown below:
Page 37 of 158
Informatica PowerCenter Lab 2-3
6. Select REPOSITORY | SAVE or press Ctrl‐S to save the changes to the repository.
Note : Every time a repository save is executed, a series of validation checks are
performed on what has been changed.
Page 38 of 158
Informatica PowerCenter Lab 2-3
7. View the results of the Validation by locating Save tab of the Output window, at the
bottom of Designer.
Note: If the Validation results show ‘INVALID’, locate the last time stamp when the save
repository was executed and scan for the first error. The series of validation checks will
display all of the errors. Rectify the errors and validate the mappings again, until the
mapping is valid.
Page 39 of 158
Informatica PowerCenter Lab 3-1
Time 30 Minutes
Page 40 of 158
Informatica PowerCenter Lab 3-1
5. Select the database type from the dropdown and click on New.
6. In the Connection Object Definition box, enter the name db_src_x, username, password
and connection string to connect to the source database.
Note : Use the same login information used for creating the source definition in
Designer.
Page 41 of 158
Informatica PowerCenter Lab 3-1
7. To create a target database connection, repeat steps 1 and 2 and in the Connection
Object Definition box, enter the name db_tgt_x, username, password and connection
string to connect to the target database db_tgt_x.
Note: Use the same login information used for creating the target definition in
Designer.
Page 42 of 158
Informatica PowerCenter Lab 3-1
Create a Workflow
Page 43 of 158
Informatica PowerCenter Lab 3-1
4. Click on the OK button. The Start Task is added to each new workflow by default
5. Select Repository | Save or Ctrl‐S to save.
Page 44 of 158
Informatica PowerCenter Lab 3-1
1. Click on TASKS | CREATE and In the Create task dialog box enter a name for the task as
S_Employee_Name_x
2. Associate a mapping with the task. The mapping is M_Employee_Name_x, which you
just created.
Page 45 of 158
Informatica PowerCenter Lab 3-1
3. Click on OK in Mappings dialog box and Done in Create Task Dialog box.
4. A Session Task appears in the Workspace. Select REPOSITORY |SAVE.
Page 46 of 158
Informatica PowerCenter Lab 3-1
3. In the Relational Connection Browser, select the database type from the dropdown and
select the source database connection just created, from the Objects box.
Page 47 of 158
Informatica PowerCenter Lab 3-1
4. Under the Target folder, click on the down arrow to open the Relational Connection
Browser and select the target database connection.
5. Under Properties, Select Normal for the Target load type.
Page 48 of 158
Informatica PowerCenter Lab 3-1
1. Locate the Link icon on the right side of the Task Toolbar .
2. Link the Start_Employee_Name and the S_Employee_Name_x tasks.
Page 49 of 158
Informatica PowerCenter Lab 3-1
3. Toggle off the ‘link mode’ by clicking again on the Link icon or single click on one of the
objects.
4. Save changes to the repository.
5. Select WORKFLOW | VALIDATE to validate the workflow.
6. Locate the save tab in the Output Window at the bottom of the Workflow Manager and
view the results of the validation checks.
7. If there are any errors fix them and perform the WORKFLOW | VALIDATE command
from the main menu. The results will be located in the Output Window’s Validate tab.
8. Repeat the process until the Workflow is valid.
Page 50 of 158
Informatica PowerCenter Lab 3-2
Time 15 Minutes
i.
Start and Monitor The Workflow
1. If the Workflow is valid, it is ready for execution. In the Workflow Designer, use one of
the following methods to start the wf_Employee_Name_x Workflow:
i. Select WORKFLOWS | START WORKFLOW.
ii. Right‐click in the Workspace and select Start Workflow or
iii. Right‐click on the wf_Employee_Name_x Workflow in the Navigator Window and
select Start Workflow.
Page 51 of 158
Informatica PowerCenter Lab 3-2
Page 52 of 158
Informatica PowerCenter Lab 3-2
5. Select the Gantt View tab. This view displays details about workflow runs in
chronological format. It displays the following information as shown below:
Page 53 of 158
Informatica PowerCenter Lab 3-2
6. Select the Task View. This view displays details about workflow runs in a report format.
The Status column gives the following information:
Page 54 of 158
Informatica PowerCenter Lab 3-2
8. The Properties tab of the S_Employee_Name_x dialog box opens. The Session should
display the number of Target Success Rows as shown below:
Page 55 of 158
Informatica PowerCenter Lab 3-2
9. Click on the Source/Target Statistics tab in Properties window. More detail on the
number of rows handled by the Server are shown here:
i. Applied rows are rows the Informatica Server successfully produced and applied
to the target without errors.
Page 56 of 158
Informatica PowerCenter Lab 3-2
ii. Affected rows are generated by the Server and ‘affected to’ (or accepted by) the
target.
iii. Rejected rows are either those read rows that the Server dropped during the
transformation process, or, the rows that were rejected when writing to the
target.
10. View Session Log to determine what occurred during the system run. To view detailed
Session information, do one of the following:
i. Right‐click on the Session in the Name column and select Get Session Log.
Page 57 of 158
Informatica PowerCenter Lab 3-2
Final Output
Page 58 of 158
Informatica PowerCenter Lab 4-1
Goals Create a mapping that gives the summary of all sales by item
description, state, and month
Use multiple sources
Create and use Expression and Aggregator transformations in the
mapping
Use functions in the Expression transformation
Group columns in the Aggregator transformation
Lab Setup Informatica PowerCenter Client and login details for connecting to Model
repository
ii.
Background
The Inventory system maintains details of items, stock available, orders placed and customer
related information. There are various requirements related to sales of an item. The company
requires sales summary information.
Solution
SQ_SALES_SUMMARY_x Source Qualifier Data source qualifier for all source tables
Page 59 of 158
Informatica PowerCenter Lab 4-1
AGG_SALES_SUMMARY_x Aggregator Link all ports except the DATE_ENTERED into the
Aggregator. Create ports to hold the TOTAL_SOLD
and TOTAL_PRICE. Create expressions in those ports
to calculate the total quantity sold and the total
price. You will want to select Group By for
ITEM_DESC, STATE, MONTH, AND YEAR.
Mapping Layout
Page 60 of 158
Informatica PowerCenter Lab 4-1
Final Output
Page 61 of 158
Informatica PowerCenter Lab 5-1
Problem Solution
1. Import the tables ITEMS, ORDERS, ORDER_ITEMS, and STORES tables .
2. Observing the key relationships indicated by link lines between the tables, shown
below.
Page 62 of 158
Informatica PowerCenter Lab 5-1
HINT: Select the Link Columns icon in the toolbar for Auto‐link.
Note : The order of GroupBy ports should be in the sequence as given above.
Page 63 of 158
Informatica PowerCenter Lab 5-1
iii. Enter appropriate value for Creation_Date [using the syntax = mm/dd/yyyy] and
Author.
22. Create a Session task by name s_SalesSummary_x task and Select the
M_SalesSummary_x mapping from the list of valid mappings.
23. Enter the appropriate description for the session in the General tab.
24. Under the Properties tab, you can enter session log file name, session log file directory,
and other general session settings.
Page 64 of 158
Informatica PowerCenter Lab 5-1
25. Select the appropriate Source Database Connection and Target Database Connection
26. Run and monitor the Workflow.
27. Verify the results.
Page 65 of 158
Informatica PowerCenter Lab 5-1
Goals Create a mapping which reads from a flat file and creates a relational
table consisting of new customers
Analyze a fixed width flat file
Configure a Connected Lookup transformation
Use a Filter transformation to exclude records from the lookup
transformation pipeline
Background
The Marketing department is holding a special promotion for potential customers. The company
has purchased an industry listing from the Nielsen Research Company of their target market,
which includes potential new customers as well as many of their current customers.
Because this promotion is extended to new customers only, the company must first exclude
existing customers from this listing before the promotional mailing is sent.
Solution
Build a new target table that will contain data only for the new customers
Use the Informatica tools to import and analyze the source files and create a target
database table
Use a Lookup Transformation to compare the Customer_ID from the flat file and the
relational table
Use a Filter transformation to test the result of the lookup and filter out matches. When
no match is found for a given CUSTOMER_ID, the filter allows the potential customer
record into the relational table
The relational table will contain the list of potential customers, which can now be used for
the promotional mailing
Page 66 of 158
Informatica PowerCenter Lab 5-1
Mapping Layout
FIL_NEW_CUST_X Filter Pass through all records from NIELSEN that do not
match up with the CUSTOMER table (CUST_ID has
no corresponding CUSTOMER_ID)
Page 67 of 158
Informatica PowerCenter Lab 5-1
Final Output
Page 68 of 158
Informatica PowerCenter Lab 5-1
Problem Solution
Page 69 of 158
Informatica PowerCenter Lab 5-1
2. Change field name St to State and Code to Postal_Code and click finish.
NOTE: The physical data file will be present on the Server. At runtime, when the Server
is ready to process the data (which is now defined by this new source definition called
[Link]) it will look for the flat file that contains the data in [Link].
3. Name the new source definition NIELSEN. This is the name that will appear as metadata
in the repository, for the source definition.
4. Create a target definition based on the structure of the source file definition with name
Tgt_New_Cust_x.
Hint: From the Edit table properties in Target designer, change the database type to
oracle.
5. Create a new mapping with the name M_New_Customer_x
6. Create Lookup transformation with name Lkp_New_Customer_x.
7. Identify the Lookup table in the Lookup transformation. Use the CUSTOMERS table
from the source database to serve as the Lookup table and import it from the database.
Page 70 of 158
Informatica PowerCenter Lab 5-1
Page 71 of 158
Informatica PowerCenter Lab 5-1
11. Create a Filter transformation that will filter through those records that do not match
the lookup condition and name it Flt_New_Cust_x.
12. Drag / drop all the ports from Source Qualifier to the new Filter and CUSTOMER_ID port
from Lkp_New_Customer_x .
13. Enter the filter condition: ISNULL(CUSTOMER_ID). This condition will allow only those
records whose value for CUSTOMER_ID is = null, to pass through the filter.
14. Link all ports except CUSTOMER_ID from the Filter to the Target table.
15. Given below is the final mapping.
Page 72 of 158
Informatica PowerCenter Lab 5-1
Page 73 of 158
Informatica PowerCenter Lab 7-1
Time 60 minutes
Background
The Sales Department wants to use data contained in flat files to build a table summarizing the
revenue on each product by Product Code, Product Name, and Product Category. The weekly
orders from each store are consolidated into one orders file, and the IT organization has
downloaded from the Mainframe a flat file listing of each product sold by the company.
Solution
Build a new target table that will contain only top ten selling items ranked by sales
revenue
Use PowerCenter tools to import and analyze the source files and create a target
database table
Use an Aggregator transformation to group
Use a Rank transformation object to identify only top ten items to be sent to the target
tables
Page 74 of 158
Informatica PowerCenter Lab 7-1
Mapping Layout
SQ_ORDERS, SQ_PRODUCTS Source Qualifier Data source qualifiers for flat file sources
iii.
Page 75 of 158
Informatica PowerCenter Lab 7-1
Final Output
Problem Solution
1. Import the [Link] and [Link] flat files definition into the repository.
2. Set the following options in the Flat File Wizard:
i. Select the Delimited radio button.
Page 76 of 158
Informatica PowerCenter Lab 7-1
3. Create the target table with name Tgt_ProductRevenue_x .It should have following
columns:
ITEM_NO,ITEM_NAME,PRODUCT_CATEGORY,PRICE,TOTAL_QUANTITY,TOTAL_REVEN
UE.
4. Create mapping with the name M_Product_Revenue_x.
5. DRAG the ORDERS and PRODUCTS source definitions.
6. Drag the Tgt_ProductRevenue_x target definition
7. Create the Joiner transformation Jnr_Orders_Products_x.
8. Link the ITEM_NO, ITEM_NAME, and PRODUCT_CATEGORY ports from SQ_Products
and ITEM_NO, QTY, and PRICE ports: from SQ_ORDERS (Source Qualifier) into
Jnr_Orders_Products_x (Joiner).
9. Identify all the ports from PRODUCTS as Master ports.
HINT: Check the M column checkbox for any one of the ports, which flow originally
from the PRODUCTS source definition.
Page 77 of 158
Informatica PowerCenter Lab 7-1
Page 78 of 158
Informatica PowerCenter Lab 7-1
21. Create a Workflow by name wf_ProductRevenue_x and a session task by the name
s_ProductRevenue_x
22. Run and monitor the Workflow.
23. Verify the results for target table Tgt_ProductRevenue_x.
Page 79 of 158
Informatica PowerCenter Lab 7-1
Time 60 minutes
Background
The Sales Department is interested in getting both the quarterly and yearly sales. The Data Mart
server has a high CPU usage, so you would like to pre‐calculate these amounts and put them in
summary tables.
Solution
SQ_SALESBYQTR_X Source Qualifier Data source qualifier to join the source tables and
sort the data
AGG_ SALESBYQTR_X Aggregator Extract the month from the Date_Entered into a
variable port. Call to that variable port when
aggregating the quarterly sales
Page 80 of 158
Informatica PowerCenter Lab 7-1
Mapplet Layout
Page 81 of 158
Informatica PowerCenter Lab 7-1
Mapplet output
Problem Solution
1. Create a Mapplet with the name MPLT_QtrSales_x. Import the tables ITEMS,
ORDER_ITEMS, and ORDERS.
2. Manually create a Source Qualifier SQ_SalesByQtr_x to pull in data from the above
three source definitions.
3. Create an Aggregator transformation and name it Agg_SalesByQtr_x. Copy and link
ITEM_ID and ITEM_NAME from the Source Qualifier (SQ_SalesByQtr_x) into the
aggregator (Agg_SalesByQtr_x). On the Columns tab, add the following ports:
Page 82 of 158
Informatica PowerCenter Lab 7-1
4. Build the expressions for the Variable and Output ports as follows:
Page 83 of 158
Informatica PowerCenter Lab 7-1
Page 84 of 158
Informatica PowerCenter Lab 7-2
Time 60 minutes
Background
The Sales Department wants to run queries on sales by quarter. The Data Mart server has a high
CPU usage, so you would like to pre‐calculate these amounts and put them in summary tables.
Solution
28
Mapping Layout
Page 85 of 158
Informatica PowerCenter Lab 7-2
Page 86 of 158
Informatica PowerCenter Lab 7-2
Final Output
Page 87 of 158
Informatica PowerCenter Lab 7-2
Page 88 of 158
Informatica PowerCenter Lab 7-2
8 4
9 1 76.5
9 2 82
9 3
9 4
10 1
10 2 281
10 3
10 4 83.5
11 1
11 2 64.9
Page 89 of 158
Informatica PowerCenter Lab 7-2
17 4 1174.5
18 1
18 2 269.5
18 3
18 4 1115
19 1
19 2 71.5
19 3
19 4 30.5
20 1
20 2
20 3
20 4 310.7
21 1 30.5
21 2
21 3
21 4 112.5
Page 90 of 158
Informatica PowerCenter Lab 7-2
Problem Solution
Page 91 of 158
Informatica PowerCenter Lab 7-2
Page 92 of 158
Informatica PowerCenter Lab 7-2
Page 93 of 158
Informatica PowerCenter Lab 7-2
Page 94 of 158
Informatica PowerCenter Lab 7-3
Time 60 minutes
Background
The Sales Department wants to run queries on sales by quarter. The Data Mart server has a high
CPU usage, so you would like to pre‐calculate these amounts and put them in summary tables.
Solution
Page 95 of 158
Informatica PowerCenter Lab 7-3
Mapping Layout
Final Output
Problem Solution
Page 96 of 158
Informatica PowerCenter Lab 7-3
Page 97 of 158
Informatica PowerCenter Lab 7-3
Page 98 of 158
Informatica PowerCenter Lab 8-1
Lab Setup Successful connection to the repository using PowerCenter Designer and
Workflow Manager
Background
The operational source system that supplies data to your data mart tracks all items that your
company has ever sold, even if they have since been discontinued. Your Sales Department wants
to run queries against a Data Mart table that contains only currently selling items. They don’t want
to use views or SQL, and they want this table updated on a regular basis.
Solution
Use the operational source table ITEMS to build a new Data Mart table, CURRENT_ITEMS,
which will contain only current selling items
Create an Unconnected Lookup transformation object to match source items against
current items in the Data Mart.
Create an Update Strategy transformation to test the result of the lookup and
determine the appropriate row action to take on the first and subsequent runs of the
session.
New current items will be inserted, discontinued items will be rejected, current items
already in the target will be updated and current items already in the target but
discontinued since the last session run will be deleted.
Page 99 of 158
Informatica PowerCenter Lab 8-1
Mapping Layout
Final Output
Problem Solution
Time 30 minutes
Background
Company requires a report, which will show all order details in descending order of order amount.
Solution
SQ_ORDERLISTING_X Source Qualifier Data source qualifier for all source tables
Mapping Layout
Final Output
28
28
Problem Solution
1. Import all the sources from the database (Orders, Items, Order_Items).
2. Create target table with ports:
Order_Id(Primary key, Not Null), Date_Entered(Not Null), Customer_Id(Not Null) and
Order_Amount(Not Null).
3. Create a Source Qualifier transformation and name it SQ_OrderListing_x.
4. Create an Aggregator transformation and group on the Order_id column. Link ports
ORDER_ID, DATE_ENTERED, CUSTOMER_ID, QUANTITY, PRICE, DISCOUNT into the
Aggregator. Make QUANTITY, PRICE, DISCOUNT only input ports.
5. Add a new output port Order_Amount with the expression:
SUM(PRICE * QTY – DISCOUNT).
6. Create the Sorter Transformation and name it Srt_OrderListing_x.
7. Check the Key column of the Order_Amount port and select Descending.
8. Connect the Sorter Transformation to target table.
9. Your mapping should look like the one as given below:
Time 60 mins
Background
Solution
SQ_STOREORDERS_X Source Qualifier Data source qualifier for all source tables
TGT_KAUAIFRANCHISE_X Relational Target Three target tables that will contain the order amount
Tables details for 3 different stores
TGT_MAUIFRANCHISE_X
TGT_OAHUFRANCHISE_X
Mapping Layout
Final Output
Problem Solution
1. Import source tables from the database (Items, Orders, Order‐Items and Stores).
2. Create three target tables as shown below and name them as follows:
Tgt_KAUAIFRANCHISE_x , Tgt_MAUIFRANCHISE_x and Tgt_OAHUFRANCHISE_x.
3. The ports in all three target tables are as shown below:
4. Drag all columns from Source qualifier into the Aggregator transformation and group
on Store_id and Order_id.
5. Create an output port ORDER_AMOUNT with the expression:
SUM(PRICE * QUANTITY ‐ DISCOUNT).
6. Change PRICE, QUANTITY and DISCOUNT to input ports only.
7. Create a Router transformation with the name Rtr_StoreOrder_x. Link all the output
ports from Aggregator to Router.
8. Select the Groups tab and enter the values under Group Name and Group Filter
Condition as shown in the figure below:
9. The router transformation will generate three groups : Kauai, Maui, Oahu and a
default group.
10. Link columns from each group to the respective targets. For example, the ports
under the Kauai group are linked to the Tgt_KAUAIFRANCHISE_x target. This target
table contains the order details for the store where store id = 2014.
11. The final mapping will look like one given below:
Time 60 minutes
Background
Customer source data arrives at each store in a flat file. Each file contains the customer name and
other customer details. However, there is no unique id to identify each customer. The unique id for
each customer will be generated through the mapping.
Solution
SEQ_CUSTID_X Sequence Generator Used for generating a sequence id for each customer
Mapping Layout
28
Final Output
Problem Solution
1. Import source definition for Customers, which is a flat file uploaded on the server.
2. Create a target table and name it as Tgt_Customer_x, which is similar to the source.
Add the CUSTOMER_ID port as a Primary Key.
3. Create a mapping and name it as M_Custid_x.
4. Create the Sequence Generator transformation and name it as Seq_Custid_x.
5. Set the Start Value, End Value, Increment Value and other attributes as shown below.
Check the Reset box.
Time 60 mins
Background
Customer source data arrives in a flat file from each store. At times, the customer names may
contain some invalid data. All customer names should be validated to check for spaces, digits,
special characters, etc. so that there is valid customer data in the Data Mart.
Solution
FLT_CHECKCUSTNAME_X Filter Allows rows with valid names to pass to the target
SEQ_CUSTOMERID_X Sequence Generator Used for generating a sequence id for each customer
Mapping Layout
Final Output
Problem Solution
Connected Procedure
1. Using the same mapping, remove the existing Stored Procedure transformation.
2. Create the Stored Procedure transformation again. Do not link it to any other
transformation.
3. In the same mapping, create an Expression transformation before the Filter
transformation. Link relevant Ports.
4. To call the Stored Procedure from the Expression transformation, enter the
expression for the FLAG column, the newly added output port as:
5. :SP.SP_CheckCustName_x(FirstName, Proc_result).
6. FirstName is passed as a parameter to the Stored Procedure and the value returned
by the Stored Procedure will be available in the PROC_RESULT variable.
7. The final mapping is shown as below:
Time 20 minutes
Background
People, who are authorized to receive the session status, get an email, once the session has
completed. The email gives details of number of rows loaded, rejected, time taken to complete,
etc. An email task can be configured for a session. The Email Task gives information about the start
time, completion time of the session, notification about the workflow status.
Solution
3. Select the Properties tab and enter the Email User Name and Email Subject details.
9. Click on the icon and select On_Success_Mail from the drop down list.
11. Enter the email text. Here you can select any post‐session built‐in Email variables,
useful for including important session information.
12. Select the reusable Email task for On Failure E‐Mail. Enter the details required.
13. Run the Workflow.
14. Verify the results.
Note: The concerned people will receive an email regarding the status of the
Workflow, subject to mail server configuration.
Time 10 minutes
Background
Solution
A Command Task can be configured to specify shell or DOS commands, to delete reject
files, copy a file, or archive target files.
Use the Command Task to delete reject files.
Workflow Layout
28
Note: Check out the actual path for the reject files with the instructor.
4. Open the Workflow wf_Employee_Name_x create in Lab 3‐1.
5. Run the Workflow.
6. Verify the results.
Note: The commands specified in the Command Task are executed on the Informatica
Server. To verify the execution of the commands given in the Command Task you
need to have privileges to login to the Informatica Server and view the BadFiles
directory that has all the reject files.
Time 20 minutes
Time 30 minutes
Note: Index may be required to be created on the source table before reading data, to
increase access speed, but it may be dropped in Post‐SQL since it might reduce
performance.
Time 20 minutes
Note: The paths mentioned above must be local to the PowerCenter Server machine.
The data present in all the above files is similar to the dept table in oracle.
Time 45 minutes
Time 45 minutes
Note: The target table contains customer_id whose value ranges from 1 to 7. If the
same session is run again the values generated wil be from 8 onwards.
Right click on the session and click on view persistent values. It shows the value of
$$rownum which is 7. We can click on Reset values to reset the value.
Time 20 minutes
I. Create a Mapping
1. Import a flat file(stored on your local machine) in the source analyzer. Create a
target table in oracle with the same definition as that of source.
2. Drag the ports of the Source Qualifier transformation to the Target table.
Time 45 minutes
NewLookupRow = 1 OR NewLookupRow = 2
10. Create an update strategy transformation. Drag all the ports from filter
transformation to update strategy transformation.
11. Open update strategy transformation. Go to properties tab and in Update Strategy
Expresion put following expression:
IIF(NewLookupRow=1, DD_INSERT,DD_UPDATE)
12. Connect ACC_KEY, ACC_NO and BALANCE columns to target.
13. Create workflow and session.
14. Ensure that in the session properties Data Driven is selected.
15. In session go to mapping tab. Click on target instance.
16. Check Insert and Update as update. Uncheck delete.
17. Save the workflow and execute it.
18. Verify the result in Tgt_Accounts_x table.
Note:
1. When you check Dynamic lookup cache option in lookup property
NewLookupRow port is automatically created.
2. When you change datatype of ACC_KEY from decimal to interger, Sequence‐Id
automatically comes in Associated port pulldown list.
3. New sequence number is not generated for rows where matching account
number is found. New sequence number is generated only for rows that are
inserted.
4. New sequence number always starts from ‘maximum value for key in table’+1.
Time 45 minutes
5. Select the column Customer ID to use as a lookup condition from the Target Table
Fields list and click Add.
Note: The wizard adds selected columns to the Logical Key Fields list.
6. Select the columns City and Address. Click on Add to add in the list of compare for
changes.
Note: The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the workflow containing the session, the PowerCenter Server
compares the columns in the Fields to Compare for Changes list between source rows
and the corresponding target (lookup) rows. If the PowerCenter Server detects a
change, it marks the row changed
7. Click Finish.
8. To save the mapping, choose Repository‐Save.
V. LookUp Transformation
1. The IN_CUSTOMERID field is the field from the source table which is taken from the
SQ_Customers.
1. The ADDRESS and CITY fields are connected from the SQ_Customers, the
PM_PREV_ADDRESS,PM_PREV_CITY,PM_PRIMARYKEY are connected from the
Lookp Up transformation.
4. The field ADDRESS and CITY of this transformation are connected through the
Source Qualifier transformation. The field Changed flag is connected through
Expression transformation. The field PM_PRIMARYKEY is conncted through the
LookUp transformation.
Time 45 minutes
2. Use the flat file customers from the Srcfiles folder to populate data in the Customers
relational table.
3. Create a Mapping to perform the above mentioned task.
4. Create a Workflow, task to execute the mapping.
5. The Customers table contains the following data.
3. Select the Logical Key Fields and the Fields to compare for changes.
Relational Tables
STORES
ITEMS
ORDER_ITEMS
ORDERS
MANUFACTURERS
DISTRIBUTORS
EMPLOYEES
Tgt_Customer_x
Tgt_CURRENTITEM_x
Tgt_ItemMaster_x
Tgt_SalesByQtr_x
Tgt_ItemSalesByYr_x
Tgt_OrderListing_x
Tgt_KAUAIFRANCHISE_x
Tgt_MAUIFRANCHISE_x
Tgt_OAHUFRANCHISE_x
Flat Files
Nielson : Structure
NIELSEN
CUST_ID Numeric 18
COMPANY_NAME Text 50
ADDRESS1 Text 72
ADDRESS2 Text 72
CITY Text 30
ST Text 2
CODE Text 10
Orders : Structure
ORDERS
ORDER_NO Numeric 6
LINE_NO Numeric 8
ITEM_NO Numeric 10
ITEM_NAME Text 23
QTY Numeric 8
Orders
Products Structure
PRODUCTS
ITEM_NO Numeric 10
ITEM_NAME Text 23
CAT Text 5
CUST_PRICE Numeric 9, 2
VENDOR_PRICE Numeric 9, 2
PRODUCT_CATEGORY Text 21
Products
Item No Item Name Cat Cust Price Vendor Price Product Category
12340 Under Water Dive cat6 7000 7500 Vehicle
12343 Under water Metal cat1 5000 5500 Misc Equipment
12344 Stabilizing vest cat1 5000 5500 Misc Equipment
12345 Air Compressor cat1 5000 5500 Misc Equipment
Customers
SE S‐958 22 0921‐12 34 65
US 68306 0621‐08460
FR 67000 [Link]
FR 13008 [Link]