+ All Categories
Home > Documents > PC8x L1D StudentGuide 20081124g

PC8x L1D StudentGuide 20081124g

Date post: 08-Nov-2014
Category:
Upload: ksknrindian
View: 60 times
Download: 10 times
Share this document with a friend
Description:
informatica 9
Popular Tags:
264
1 PowerCenter 8.x Level I Developer Student Guide Version – L1D_20081124G
Transcript
Page 1: PC8x L1D StudentGuide 20081124g

1

PowerCenter 8.x Level I Developer

Student Guide Version – L1D_20081124G

Page 2: PC8x L1D StudentGuide 20081124g

PowerCenter 8.x Level I Developer Student Guide

Version 04

April2008

Copyright (c) 2008 Informatica Corporation.

All rights reserved. Printed in the USA.

This software and documentation contain proprietary information of Informatica Corporation and are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright law. Reverse engineering of the software is prohibited. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation.

Use, duplication, or disclosure of the Software by the U.S. Government is subject to the restrictions set forth in the applicable software license agreement and as provided in DFARS 227.7202-1(a) and 227.7702-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988), FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable.

The information in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Informatica Corporation does not warrant that this documentation is error free. Informatica, PowerMart, PowerCenter, PowerChannel, PowerCenter Connect, MX, and SuperGlue are trademarks or registered trademarks of Informatica Corporation in the United States and in jurisdictions throughout the world. All other company and product names may be trade names or trademarks of their respective owners.

Portions of this software are copyrighted by DataDirect Technologies, 1999-2002.

Informatica PowerCenter products contain ACE (TM) software copyrighted by Douglas C. Schmidt and his research group at Washington University and University of California, Irvine, Copyright (c) 1993-2002, all rights reserved.

Portions of this software contain copyrighted material from The JBoss Group, LLC. Your right to use such materials is set forth in the GNU Lesser General Public License Agreement, which may be found at http://www.opensource.org/licenses/lgpl-license.php. The JBoss materials are provided free of charge by Informatica, “as-is”, without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose.

Portions of this software contain copyrighted material from Meta Integration Technology, Inc. Meta Integration® is a registered trademark of Meta Integration Technology, Inc.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/). The Apache Software is Copyright (c) 1999-2005 The Apache Software Foundation. All rights reserved.

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit and redistribution of this software is subject to terms available at http://www.openssl.org. Copyright 1998-2003 The OpenSSL Project. All Rights Reserved.

The zlib library included with this software is Copyright (c) 1995-2003 Jean-loup Gailly and Mark Adler.

The Curl license provided with this Software is Copyright 1996-2007, Daniel Stenberg, <[email protected]>. All Rights Reserved.

The PCRE library included with this software is Copyright (c) 1997-2001 University of Cambridge Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel. The source for this library may be found at ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre.

InstallAnywhere is Copyright 2005 Zero G Software, Inc. All Rights Reserved.

Portions of the Software are Copyright (c) 1998-2005 The OpenLDAP Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License, available at http://www.openldap.org/software/release/license.html.

This Software is protected by U.S. Patent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775 and other U.S. Patents Pending.

DISCLAIMER: Informatica Corporation provides this documentation “as is” without warranty of any kind, either express or implied, including, but not limited to, the implied warranties of non-infringement, merchantability, or use for a particular purpose. The information provided in this documentation may include technical inaccuracies or typographical errors. Informatica could make improvements and/or changes in the products described in this documentation at any time without notice.

Page 3: PC8x L1D StudentGuide 20081124g

iii

Preface

Welcome to the PowerCenter 8 Level I Developer course.

Data integration is a large undertaking with many potential areas of concern. The PowerCenter infrastructure will greatly assist you in your data integration efforts and alleviate much of your risk. This course will prepare you for that challenge by teaching you the most commonly used components of the product.

You will build a small operational data store (ODS) using PowerCenter to extract from Source tables and files, transform the data, load it into a staging area, and finally into the operational data store. The Instructor will teach you about Mappings, transformations, Sources, Targets, Workflows, Sessions, Workflow tasks, Connections, and the Velocity methodology.

Page 4: PC8x L1D StudentGuide 20081124g

About This Guide

Course Objectives After completing this course, you should be able to:

• Use PowerCenter 8 Designer to build mappings that move data from sources to targets

• Use PowerCenter 8 Workflow Manager to build and run a workflow that runs a session based on a mapping

• Design mappings and workflows based on business needs • Perform basic troubleshooting of PowerCenter mappings and transformaitons • Use Informatica Support options to resolve questions and problems about

Informatica PowerCenter 8

Audience This course is designed for data integration and data warehousing implementers. You should be familiar with data integration and data warehousing terminology, and in using Microsoft Windows software.

Document Conventions This guide uses the following formatting conventions:

If you see… It means… Example

� Indicates a submenu to navigate to. Click Repository � Connect. In this example, you should click the Repository menu or button and choose Connect.

boldfaced text Indicates text you need to type or enter. Click the Rename button and name the new source

definition S_EMPLOYEE.

UPPERCASE Database tables and column names are shown in all UPPERCASE.

T_ITEM_SUMMARY

italicized text Indicates a variable you must replace with specific information.

Connect to the Repository using the assigned login_id.

Note: The following paragraph provides additional facts.

Note: You can select multiple objects to import by using the Ctrl key.

Tip: The following paragraph provides suggested uses or a Velocity best practice.

Tip: The m_ prefix for a mapping name is…

Page 5: PC8x L1D StudentGuide 20081124g

v

Other Informatica Resources

In addition to the student guides, Informatica provides these other resources:

• Informatica Documentation

• Informatica Customer Portal

• Informatica web site

• Informatica Developer Network

• Informatica Knowledge Base

• Informatica Professional Certification

• Informatica Technical Support

Obtaining Informatica Documentation You can access Informatica documentation from the product CD or online help.

Visiting Informatica Customer Portal As an Informatica customer, you can access the Informatica Customer Portal site at http://my.informatica.com. The site contains product information, user group information, newsletters, access to the Informatica customer support case management system (ATLAS), the Informatica Knowledge Base, and access to the Informatica user community.

Visiting the Informatica Web Site You can access Informatica’s corporate web site at http://www.informatica.com. The site contains information about Informatica, its background, upcoming events, and locating your closest sales office. You will also find product information, as well as literature and partner information. The services area of the site includes important information on technical support, training and education, and implementation services.

Visiting the Informatica Developer Network The Informatica Developer Network is a web-based forum for third-party software developers. You can access the Informatica Developer Network at the following URL:

http://devnet.informatica.com

The site contains information on how to create, market, and support customer-oriented add-on solutions based on interoperability interfaces for Informatica products.

Visiting the Informatica Knowledge Base As an Informatica customer, you can access the Informatica Knowledge Base at http://my.informatica.com. The Knowledge Base lets you search for documented solutions to known technical issues about Informatica products. It also includes frequently asked questions, technical white papers, and technical tips.

Obtaining Informatica Professional Certification You can take, and pass, exams provided by Informatica to obtain Informatica Professional Certification. For more information, go to:

http://www.informatica.com/services/education_services/certification/default.htm

Page 6: PC8x L1D StudentGuide 20081124g

Providing Feedback Email any comments on this guide to [email protected].

Obtaining Technical Support There are many ways to access Informatica Technical Support. You can call or email your nearest Technical Support Center listed in the following table, or you can use our WebSupport Service.

Use the following email addresses to contact Informatica Technical Support:

[email protected] for technical inquiries

[email protected] for general customer service requests WebSupport requires a user name and password. You can request a user name and password at http://my.informatica.com.

North America / South America Europe / Middle East / Africa Asia / Australia

Informatica Corporation

Headquarters 100 Cardinal Way Redwood City, California 94063 United States Toll Free 877 463 2435

Standard Rate United States: 650 385 5800

Informatica Software Ltd. 6 Waltham Park Waltham Road, White Waltham Maidenhead, Berkshire SL6 3TN United Kingdom

Toll Free 00 800 4632 4357

Standard Rate Belgium: +32 15 281 702 France: +33 1 41 38 92 26 Germany: +49 1805 702 702 Netherlands: +31 306 022 797 United Kingdom: +44 1628 511 445

Informatica Business Solutions

Pvt. Ltd. 301 & 302 Prestige Poseidon 139 Residency Road Bangalore 560 025 India

Toll Free Australia: 00 11 800 4632 4357 Singapore: 001 800 4632 4357

Standard Rate India: +91 80 5112 5738

Page 7: PC8x L1D StudentGuide 20081124g

vii

Table of Contents

Module Page 0. Course Introduction 0-1 1. PowerCenter Overview 1-1 2. Mapping Fundamentals 2-1 3. Workflow Basics 3-1 4. Expression and Filter Transformations 4-1 5. Joining and Merging Data 5-1 6. Lookup Transformations 6-1 7. Sorter and Aggregator Transformations 7-1 8. Using the Debugger 8-1 9. Updating Target Tables 9-1 10. Mapping Techniques 10-1 11. Mapplets and Worklets 11-1 12. Controlling Workflows 12-1 13. Mapping Design Workshop 13-1 14. Workflow Design Workshop 14-1

Page 8: PC8x L1D StudentGuide 20081124g
Page 9: PC8x L1D StudentGuide 20081124g

Course Introduction 0.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

PowerCenter 8.xLevel 1 Developer

L1D_20081124G

0

Page 10: PC8x L1D StudentGuide 20081124g

Course Introduction 0.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction

Page 11: PC8x L1D StudentGuide 20081124g

Course Introduction 0.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 3 of 28

Introductions

• Logistics/Site Information

• Introductions

• About you

• How do you expect to benefit from this course?

0

Page 12: PC8x L1D StudentGuide 20081124g

Course Introduction 0.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 4 of 28

Course Audience

• PowerCenter 8.x Level I Developer is designed for Developers and Consultants

• This course enables participants to use the principal features of Informatica PowerCenter 8 for integrating data between disparate applications

• This material assumes familiarity with database concepts and technology

Page 13: PC8x L1D StudentGuide 20081124g

Course Introduction 0.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 5 of 28

Course Objectives

• When you have completed this course, you should be able to:

• Use PowerCenter 8 Designer to build mappings that move data from sources to targets

• Use PowerCenter 8 Workflow Manager to build and run a workflow that runs a session based on a mapping

• Design simple mappings and workflows based on business needs

• Perform basic troubleshooting of PowerCenter mappings and transformations

• Use Informatica Support options to resolve questions and problems about Informatica PowerCenter 8

0

Page 14: PC8x L1D StudentGuide 20081124g

Course Introduction 0.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 6 of 28

Course Agenda

1. PowerCenter Overview

2. Mapping Fundamentals

3. Workflow Basics

4. Expression and Filter Transformations

5. Joining and Merging Data

6. Lookup Transformations

7. Sorter and Aggregator Transformations

Page 15: PC8x L1D StudentGuide 20081124g

Course Introduction 0.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 7 of 28

Course Agenda Continued

8. Using the Debugger

9. Updating Target Tables

10.Mapping Techniques

11.Mapplets and Worklets

12.Controlling Workflows

13.Mapping Design Workshop

14.Workflow Design Workshop

0

Page 16: PC8x L1D StudentGuide 20081124g

Course Introduction 0.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 8 of 28

Other Informatica Resources

• In addition to the student guides, Informatica provides these other resources:

• Corporate Website

• Global Education Services

• Customer Portal

• Product Documentation

• Knowledge Base

• Technical Support

• Informatica Product Certification

Page 17: PC8x L1D StudentGuide 20081124g

Course Introduction 0.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 9 of 28

• Can be accessed at www.informatica.com

• Website provides:

• Corporate informationand background

• Upcoming events and access to Informatica Communities, Blogs and Tech Net

• Nearest sales office location

• Product information, literature and partner information

• Information on technical support, training, education and implementation services

Informatica Corporate Website 0

Page 18: PC8x L1D StudentGuide 20081124g

Course Introduction 0.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 10 of 28

Informatica Education Services

• Products + Services � Education Services

• www.informatica.com/products_services/education_services

• Discover new training offerings

• New courses added regularly

• Learn aboutInformaticaCertification

Page 19: PC8x L1D StudentGuide 20081124g

Course Introduction 0.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 11 of 28

Informatica Customer Portal

• Available to Informatica customers and partners at http://my.informatica.com

• Website provides:

• Product documentation

• Access to ATLAS Support system

• Knowledge Base

• Access to the Informatica User Community

• User Group info / Newsletters

• Debugging Tools

• Velocity

0

Page 20: PC8x L1D StudentGuide 20081124g

Course Introduction 0.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 12 of 28

Accessing the Customer Portal

• Use your company email id to register

• Provides default access to:

• Most recent documentation

• Knowledge base

• Default does not provide online support access

• Request using Project ID

• Once approved you can create Service Requests

• Available for 11 countries

Page 21: PC8x L1D StudentGuide 20081124g

Course Introduction 0.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 13 of 28

Informatica Documentation

• Can be accessed via:

• Product CD or Download link

• Online help

• Documentation Center

0

Page 22: PC8x L1D StudentGuide 20081124g

Course Introduction 0.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 14 of 28

• Can be accessed via the Customer Portal http://my.informatica.com

• Contains

• Documented solutions to known technical issues

• Answers to frequently-asked questions (FAQs)

• White papers

• Technical tips

• Perform generic- or specific-searches

Informatica Knowledge Base

Page 23: PC8x L1D StudentGuide 20081124g

Course Introduction 0.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 15 of 28

Informatica Technical Support

• Preferred Support access via:

• Online using the Web Support Service using http://my.informatica.com username and password

• Alternative Support access via:

• Call / email your nearest Technical Support Center

• See Student Note

• Email Technical Support directly (may be delay in response):

[email protected]

[email protected]

0

Page 24: PC8x L1D StudentGuide 20081124g

Course Introduction 0.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 16 of 28

Creating a Service Request

• Check the Knowledge Base to see if a solution exists

• If a solution exists, a Service Request is not required

• On the Online Support page, navigate to the Service Requests tab

• Click the New button

Page 25: PC8x L1D StudentGuide 20081124g

Course Introduction 0.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 17 of 28

Creating a Service Request Continued

• On the service request form, fill out all required fields

• Provide as much relevant detail as possible so engineers can recreate the problem, if necessary

0

Page 26: PC8x L1D StudentGuide 20081124g

Course Introduction 0.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 18 of 28

v

PowerCenter 8.x

New FeaturesPowerCenter 8

Data Migration

PowerCenter 8.5

Unified Security

Additional Recommended Training

PowerCenter 8.x

PowerCenter 8.x

UpgradePowerCenter 8

Team-Based

Development

PowerCenter 8

XML SupportPowerCenter 8

Data Cleanse

and Match

PowerCenter 8.x

Level I Developer

PowerCenter 8.5+

Administrator

PowerCenter 8

Quickstart

PowerCenter 8

High Availability

PowerCenter 8.x

Level II Developer

B2B Data

Transformation

PowerCenter Education and Certification Path

Page 27: PC8x L1D StudentGuide 20081124g

Course Introduction 0.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 19 of 28

Introduction

to PowerExchange

PowerExchange

Basics

PowerCenter 8.5

Level I

Administrator

PowerCenter 8

High Availability

PowerCenter 8

Team-Based

Development

Additional Recommended Training

PowerExchange Education Path0

Page 28: PC8x L1D StudentGuide 20081124g

Course Introduction 0.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 20 of 28

Informatica

Data Quality 8.6

Workbench Level I

Data Quality

Assessment

Using IDE

Data Quality

Assessment

Using IDQ

Informatica Data

Quality 8.5 Cleansing

Workshop

Informatica Data

Quality 8.5 Matching

Workshop

Informatica

Data Explorer 8.6

Level I

Additional Recommended Training

Data Quality

Assessment

Using IDQ

Informatica Data

Quality 8.6 New

Features

Data Quality Education and Certification Path

Page 29: PC8x L1D StudentGuide 20081124g

Course Introduction 0.21

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 21 of 28

Data Integration Certification Path

Level Certification Title Recommended Training Required Exams

»Architecture & Administration;

»Advanced Administration

Informatica Certified

Administrator

Informatica Certified

Developer

Informatica Certified

Consultant

» PowerCenter QuickStart (eLearning)

» PowerCenter 8.5+ Administrator (4 days)

» PowerCenter QuickStart (eLearning)

» PowerCenter 8.5+ Administrator (4 days)

» PowerCenter Developer 8.x Level I (4 days)

» PowerCenter Developer 8 Level II (4 days)

»Architecture & Administration;

»Advanced Administration

»Advanced Mapping Design

» PowerCenter QuickStart (eLearning)

» PowerCenter 8.5+ Administrator (4 days)

» PowerCenter Developer 8.x Level I (4 days)

» PowerCenter Developer 8 Level II (4 days)

» PowerCenter 8 Data Migration (4 days)

» PowerCenter 8 High Availability (1 day)

»Architecture & Administration;

»Advanced Administration

»Advanced Mapping Design

»Advanced Admistration

»Enablement Technologies

Additional Training:

» PowerCenter 8.5 New Features

» PowerCenter 8.6 New Features

» PowerCenter 8 Upgrade

» PowerCenter 8 Team-Based Development

» PowerCenter 8.5 Unified Security `

0

Page 30: PC8x L1D StudentGuide 20081124g

Course Introduction 0.22

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 0: Course Introduction 22 of 28

Data Quality Certification Path

Level Certification Title Recommended Training Required Exams

Informatica Certified

Specialist: Data Quality

Informatica Certified

Specialist: Data Explorer

Informatica Certified

Professional

» Informatica Data Quality 8.6 Level I (4 days)

» Informatica Data Explorer 8.6 Level I (2 days)

»Data Quality 8.6

»Data Explorer 8.6

» Informatica Data Quality 8.6 Level I (4 days)

» Informatica Data Explorer 8.6 Level I (2 days)

»Data Quality 8.6

»Data Explorer 8.6

Additional Training:

» Data Quality Assessment Using Informatica Data Explorer

» Data Quality Assessment Using Informatica Data Quality

» Informatica Data Quality 8.5 Cleansing Workshop

» Informatica Data Quality 8.5 Matching Workshop

» Informatica Data Quality 8.6 New Features

Page 31: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview

1

Page 32: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 2 of 32

Module Objectives

After completing this module you will be able to:

• Explain the purposes of PowerCenter

• Define terms used in PowerCenter

• Name major PowerCenter components

Why you need

Page 33: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 3 of 32

The Problem

• Large organizations have a lot of data

• The data can be stored in many formats, including databases and unstructured files

• This data must be collated, combined, compared, and made to work as a seamless whole

• But the different databases don’t talk to each other!

Accounting

(SAP)

Marketing

(ORCL)

Billing

(Sybase)

Sales

(SalesForce)Manufacturing

(DB2) Resource

Planning

(PSFT)Inventory

(SQL Server)

1

Page 34: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 4 of 32

The Problem Continued

• Many organizations have implemented connectors between these databases

• Every pair of databases requires a unique connector

Accounting

(SAP)

Marketing

(ORCL)

Sales

(SalesForce)

Manufacturing

(DB2)

Resource

Planning

(PSFT)

Inventory

(SQL Server)

Billing

(Sybase)

A connector is a piece of custom software that performs two functions: it

converts data from the format of one application to the format of another

application, and it transports the data between the two applications.

Connector

To be precise, to connect n databases fully requires (1+2+…+(n-1))

connectors.

Technical Note

Page 35: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 5 of 32

The Problem Continued

• If you change one database, many connectors have to be upgraded

Marketing

(ORCL)

Sales

(SalesForce)

Manufacturing

(DB2)

Resource

Planning

(PSFT)

Inventory

(SQL Server)

Billing

(Sybase)

Accounting

(upgraded)

1

Page 36: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 6 of 32

The Solution: Data Integration

• Data Integration technologies allow applications using different databases and formats to communicate with each other using one connection each

Accounting

(SAP)

Marketing

(ORCL)

Sales

(SalesForce)

Manufacturing

(DB2)

Resource

Planning

(PSFT)

Inventory

(SQL Server)

Billing

(Sybase)

Data

Integration!

Page 37: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 7 of 32

Informatica PowerCenter

• Informatica PowerCenter is the premium data integration solution available today

• “Database neutral” – will communicate with any database

• Powerful data transformations convert one application’s data to another’s format

Accounting

(SAP)

Marketing

(ORCL)

Sales

(SalesForce)

Manufacturing

(DB2)

Resource

Planning

(PSFT)

Inventory

(SQL Server)

Billing

(Sybase)

Informatica

PowerCenter

1

Page 38: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 8 of 32

Example: Data Migration

• A company purchases a new accounts payable application

• PowerCenter can move the existing account data to the new application

• Preserves data lineage for tax, accounting, and other legally mandated purposes

Accounting

(old)

Informatica

PowerCenterAccounting

(new)

Page 39: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 9 of 32

Example: Application Integration

• Company A purchases Company B

• To achieve the benefits of consolidation, Company B’s billing system must be integrated into Company A’s billing system

Billing AInformatica

PowerCenter Billing B

1

Page 40: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 10 of 32

Example: Data Warehousing

• Data warehouses put information from many sources together for analysis

• Data is moved from many databases to the warehouse

Accounting

(SAP)

Marketing

(ORCL)

Billing

(Sybase)

Sales

(SalesForce)Manufacturing

(DB2) Resource

Planning

(PSFT)Inventory

(SQL Server)

Informatica

PowerCenterData

Warehouse

In addition to the examples given on these slides, PowerCenter is deployed

for:

• Data Synchronization – ongoing exchange of data between disparate

applications

• Data Hubs – master data management; reference data hubs; single view

of customer, product, supplier, employee, etc.

• Business Activity Monitoring – business process improvement, real-time

reporting

Additional Examples

of Data Integration

Page 41: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 11 of 32

Data Integration Methodology: ETL

•Extract the data from a source system

•Transform it as needed

•Load it to a target system

Source(s)

Target(s)

Data

Integration!

1

Page 42: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 12 of 32

ETL for Data Warehousing

• Transaction data

• Optimized for transaction

response time

• Current

• Normalized or

De-normalized data

Operational Systems

RDBMS Other

• Aggregated data

• Historical data

Decision Support

Data

Warehouse

ETL Load

Transform

Extract

• Aggregate data

• Cleanse data

• Consolidate data

• Apply business rules

• De-normalize data

Mainframe

Page 43: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 13 of 32

ETL: Extract

• PowerCenter reads data, row by row, from a table (or group of related tables) in a database, or from a file

• This database or file is referred to as the source

• The structure of the source is contained in a source definition object.

SourceInformatica

PowerCenter

Extract

1

Page 44: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 14 of 32

ETL: Transform

• PowerCenter converts the rows into a format the second (target) system will be able to use

• The logic for this conversion is defined in transformationobjects

SourceInformatica

PowerCenter

Extract Transform

Page 45: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 15 of 32

ETL: Load

• PowerCenter writes data, row by row, to a table (or group of related tables) in a database, or to a file

• This database or file is referred to as the target

• The structure of the target is contained in a target definition object

SourceInformatica

PowerCenter Target

Extract LoadTransform

1

Page 46: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 16 of 32

Mapping

• A set of transformations, in sequence or in parallel, that move and transform data from one or more source(s) to one or more target(s)

• Mappings exist entirely inside PowerCenter

Source(s)

Informatica PowerCenter

Target(s)

transformationsmapping

A mapping logically defines the ETL process. It reads data from sources,

applies transformation logic to the data, and writes the transformed data to

targets.

Mappings

Page 47: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 17 of 32

Transformations

• Transformations receive data and transform it

• Generate new fields

• Modify data

• Select and pass data

Transformations

1

Page 48: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 18 of 32

Session

• The object that runs a mapping

Transformation

Mapping

Session

Page 49: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 19 of 32

Workflow

• An ordered set of one or more sessions and other tasks, designed to accomplishan overall operationalpurpose

Transformation

Mapping

Session

Workflow

Other Tasks

A task is an executable set of actions, functions, or commands. A session is

a task that runs a mapping. Other tasks include:

• Command – runs a shell script

• Email – sends an email

• Decision – branches a workflow conditionally

• Timer – waits for a defined period

Tasks

1

Page 50: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 20 of 32

Metadata

• Defines data and processes

• Examples:

• Source and target definitions

• Type (flat file, database table, XML file, etc)

• Datatype (character string, integer, decimal, etc)

• Other attributes (length, precision, etc.)

• Mapping logic

• Workflow logic

• Stored in a metadata repository

Repository

PowerCenter uses metadata to define sources, targets, transformations,

mappings, and workflows

Metadata in

PowerCenter

The word metadata literally means “data about data.” It is the information that

describes data. Common contents of metadata include the source of a

dataset, how it should be accessed, and its limitations.

Metadata

The repository is implemented as a schema, which may reside in any of a

number of supported relational database management systems.

Note

Page 51: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.21

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 21 of 32

PowerCenter 8.5 Architecture

Sources Targets

Repository

Integration Service

Repository Service Process

Repository Service

Domain

Administration Console

PowerCenter Client Native drivers

TCP/IP

TCP/IP

ODBC

Native drivers/

ODBC

Native drivers/

ODBC

ODBC

TCP/IP

HTTPS

Security Domain

Domain

Metadata

Native drivers

Desktop tools used to populate the repository with metadata, execute

workflows on the Integration Service, monitor the workflows, and manage the

repository

Client Tools

Contains all the metadata needed to run the ETL processRepository

Multithreaded process that retrieves, inserts, and updates repository

metadata

Repository Service

Process

Manages connectivity to metadata repositories that contain mapping and

workflow definitions

Repository Service

The engine which performs all the ETL logicIntegration Service

Can be relational tables or heterogeneous files (such as flat files, VSAM files,

or XML)

Sources and Targets

1

Page 52: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.22

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 22 of 32

PowerCenter Client Applications

Designer

Create ETL

mappings

Workflow

Manager

Create and start

workflows

Workflow

Monitor

Monitor and

control workflows

Development

Repository Manager

Manage repository

• connections

• folders

• objects

• users and groups

(in PowerCenter 8.1)

Administration Console

(browser-based)

Perform domain and repository

service tasks:

• Create/configure nodes and

repository services

• Upgrade/delete

• Start/stop

• Backup/restore

• Manage users and groups

(In PowerCenter 8.5)

Administration

Administration

Console

Designer and Repository Manager access the repository through the

Repository Service.

Workflow Manager and Workflow Monitor connect to the Integration Service.

Each client has its own user interface. The UIs typically have toolbars, a

navigation window to the left, a workspace to the right, and an output window

at the bottom.

Note

Page 53: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.23

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 23 of 32

Transformation

toolbar

Output

Window

Navigator

Window

Workspace

Status

Bar

Designer

Tools

Client

Apps*

Designer: Create Mappings, Sources, Targets

* Single login to client applications – click on icons to open other

tools – they are already connected to repository

1

Page 54: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.24

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 24 of 32

Designer Tools

Source

Analyzer:

create source

objects

Target

Designer:

create target

objects

Transformation

Developer:

create reusable

transformations

Mapplet

Designer:

create

mapplets

Mapping

Designer:

create

mappings

Page 55: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.25

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 25 of 32

Transformation Views

� Iconized – shows the transformation

in relation to the rest of the mapping

� Normal – shows the flow of data

through the transformation

� Edit – shows transformation ports

and properties; allows editing

Ports represent table columns or file fields

1

Page 56: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.26

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 26 of 32

Workflow Manager: Create and Run Workflows

Connections

Output

Window

Navigator

Window

Workspace

Status

Bar

Workflow

Manager

Tools

Client

Applications Tasks

Page 57: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.27

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 27 of 32

Workflow Manager Tools

Create reusable tasks Create worklets Create workflows

1

Page 58: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.28

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 28 of 32

Session Tasks: Run a Single Mapping

� Iconized view – shows the task in

relation to the rest of the workflow

� Edit view – shows task

properties, allows editing

� Two or more Sessions can

point to a single mapping

Page 59: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.29

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 29 of 32

Workflow Monitor: View Workflow Progress

Navigator

Window

Gantt Chart

ViewTask

View

Output

Window

Time

Window

1

Page 60: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.30

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 30 of 32

Repository Manager: Administer Folders

Navigator

Window

Main

Window

Output

Window

Status

Bar

Page 61: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.31

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 31 of 32

Business Function:

Staging

Data format similar

to OLTP, used

for populating ODS

DB Schema:

STGxx

Business Function:

OLTP

Data in an online

Transaction

processing system

DB Schema:

SDBU

Class Scenario

Business Function:

ODS/EDW

Operational Data

Store or Electronic

Data Warehouse is

normalized data in

an enterprise data

Model that aligns

data from various

OLTP Systems

DB Schema:

ODSxx

Business Function:

DDW

Dimensional Data

Warehouse uses Fact

and Dimension

tables in second

normal form to speed

report generation

and allow for

historical data

Covered in Level two

Developer class

In the labs for this course, we are simulating part of the creation of a (very

simple) Dimensional Data Warehouse. In these labs, you will begin with data

in OLTP tables and flat files, bring data to Staging, and from Staging (STG) to

the Operational Data Store (ODS).

Because creation of Staging tables is fairly trivial, you will do more work on

moving data from STG to ODS. This will provide more realistic uses of the

capabilities of PowerCenter.

Note

1

Page 62: PC8x L1D StudentGuide 20081124g

PowerCenter Overview 1.32

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 1: PowerCenter Overview 32 of 32

Summary

This module showed you how to:

• Explain the purposes of PowerCenter

• Define terms used in PowerCenter

• Name major PowerCenter components

Page 63: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals2

Page 64: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 2 of 22

Module Objectives

After completing this module you will be able to

• Create source and target definitions from flat files and relational tables

• Create a mapping using existing source and target definitions

• Use links to connect ports

Why you need

Page 65: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 3 of 22

PowerCenter Transformations (partial list)

Source Qualifier: reads from data sources

Expression: performs row-level calculations

Filter: uses a condition statement to select rows for inclusion

Sorter: sorts data

Aggregator: performs aggregate calculations

Joiner: joins heterogeneous sources

Lookup: looks up values and passes them to other objects

Update Strategy: tags rows for insert, update, delete, reject

Router: routes rows conditionally

Union: Performs a union-all join between two data streams

2

Page 66: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 4 of 22

Specialized PowerCenter Transformations

Transaction Control: allows data-driven commits and rollbacks

Java: allows Java code to be used within PowerCenter

Midstream XML Parser: parses XML anywhere in a mapping

Midstream XML Generator: creates XML anywhere in a mapping

More Source Qualifiers: read from XML, message queues

and applications

Page 67: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 5 of 22

PowerCenter Designer

• Provides tools to define and manipulate

• Sources

• Targets

• Transformations

• Mappings

• Other objects

2

Page 68: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 6 of 22

Repositories

• Objects are stored as metadata in repositories

• Within a repository, objects are organized in folders

Repository

Folder

Sub folders

Do not confuse repository folders with the directories visible in Windows

Explorer. The folders are PowerCenter repository objects and are not

related to Windows directories.

Technically, all folders are “shared” with all users who have the appropriate

folder permissions, regardless of the “blue arm” icon. The “blue arm” icon

indicates that the folder permits shortcuts, dynamic links to the objects

contained in that folder used by mappings in other folders.

Shortcut Folders

Folders are created and managed in the Repository Manager application.Folder Management

Repositories are not created and managed in the Designer application. They

are created in the Administration Console application, and managed in the

Repository Manager application.

Repository

Management

Page 69: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 7 of 22

Source Definitions

• Defines the structure of a data source such as a relational database table or a flat file

• Created using the Source Analyzer in the PowerCenter Designer application

• Enables you to preview the data in the source

Flat file

sources

Relational

Database

Connections

Tables in

DB source

OLTP

Two sources from different systems may use the same name. Placing each

source in a folder based on its connection type avoids confusion when this is

the case.

Note

2

Page 70: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 8 of 22

Source Analyzer

• The Designer tool for creating source definitions

• Import source definitions from:

• Relational databases

• Flat files

• XML sources

• Cobol sources

• Applications suchas SAP, Siebel, andPeopleSoft

• PowerExchange

• Mainframes

Page 71: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 9 of 22

Source Qualifier Transformation

• Selects records from flat file and relational table sources and

converts to PowerCenter internal datatypes

Represent table columns or file fields. All ports are input/output.Ports

Mandatory for all flat file and relational sources in a mapping. Selects

records from flat file and relational table sources. For relational tables,

creates a SQL SELECT statement. Converts native source datatypes to

PowerCenter transformation datatypes.

Description

ActiveType

2

Page 72: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 10 of 22

Lab 2-1 – Creating Source Definitions

In the lab you will:

• Use wizards to import Source definitions from a flat file and a relational database table

• Preview the data in the Sources

Page 73: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 11 of 22

Target Definitions

• Define the structure of a target such as a relational database table or a flat file

• Created using the Target Designer in the PowerCenter Designer application

• Can be

• Copied from a source object

• Imported from relational database

• Imported from flat file

• A shortcut to a target in another folder

2

Page 74: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 12 of 22

Target Designer

• The Designer tool for creating targets

• Wizards import target definitions from

• Flat files

• Relational database tables

• XML

• Applications suchas SAP BF andMQ Series

Page 75: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 13 of 22

Lab 2-2 – Creating Target Definitions

In the lab you will:

• Create a Target definition from scratch

• Create a Target definition from a Source definition and change the Target type

2

Page 76: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 14 of 22

Shortcuts

• A shortcut is a dynamic link to the original object

• Usually a target or source definition

• The original object must be in a shortcut folder

• Not all folders permit creation of shortcuts

• Shortcut folders display with a “hand” (similar to a shared folder in Windows Explorer)

• To create a shortcut drag the object to another open folder or any workspace where the object type is allowed

• Shortcuts appear in the Navigator window with a small curved arrow

Page 77: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 15 of 22

Datatypes

• PowerCenter must “know” the data types used internally by both source and target systems

• These are called native datatypes

• The Source Qualifier converts the source data to a standard format used internally by PowerCenter

• This is the integration or transformation datatype

• The target definition object converts it to the native datatype of the target system

Integration datatypes are sometimes referred to as “ASCII Neutral”Note

The integration datatype standardizes transformations, and is easily

translated from and to the native datatypes of application databases

Note

2

Page 78: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 16 of 22

Datatype Conversion

� Transformation datatypes allow mix and match of source and target database types

� When connecting ports, native and transformation datatypes must be compatible

(or must be explicitly converted)

Display in transformations within Mapping Designer

Display in source and target tables within Mapping Designer

PowerCenter internal datatypesSpecific to the source and target database types

TRANSFORMATION DATATYPESNATIVE DATATYPES

Source DB native

datatypes

Target DB native

datatypes

Transformation

datatypes

Datatypes can be converted by

• Passing data between ports with different datatypes

• Passing data from an expression to a port

• Using transformation functions

• Using arithmetic operators

The following type conversions are supported:

• Numeric datatypes ↔ other numeric datatypes

• Numeric datatypes ↔ string

• Date/Time ↔ date or string

For further information, in the PowerCenter client, consult Help � Content

� Index � port-to-port data conversion

Datatype Conversion

Page 79: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 17 of 22

Transformation Ports

• Data passes into and out of transformations through input and output ports

Input Ports Output Ports

2

Page 80: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 18 of 22

Passive transformations

• One row comes in, one row goes out – one-for-one input to output

• Same number of rows output as input

• Example: a transformation that converts character data to numerical data

“(510) 555-7283”

“(613) 382-2929”

“(650) 385-5000”

5105557283

6133822929

6503855000

3 rows in 3 rows out

Passive

Transformation

Examples of passive transformations include Expression and Lookup

transformations.

Examples

The transformation is considered “passive” regardless of what

transformations take place within a row, provided only that the rows going

out are a one-for-one match with the rows going in.

Note

Page 81: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 19 of 22

Active Transformations

• Many rows in, many rows out

• May not be the same number output as input

• Example: a transformation that discards rows with bad data

“(510) 555-7283”

(613) 382-299

(650) 385-5000

5105557283

6503855000

3 rows in 2 rows out

Active

Transformation

Examples of active transformations include Filter, Router, and Sorter

transformations.

Examples

2

Page 82: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 20 of 22

Velocity Methodology

Informatica’s Velocity methodology includes:

• Templates

• Mapping specification templates

• Source to target field matrix

• Naming conventions

• Object type prefixes: m_, exp_, agg_, wfl_, s_, …

• Best practices

In Velocity, the standard is to begin the names of all Source Qualifier objects

with “SQ_”, followed by the name of the source. The Mapping Designer

automatically names the Source Qualifier this way when you drag a Source

object onto the Mapping canvas.

Note

We do not use the Velocity templates in this courseNote

Velocity covers the entire data integration project lifecycle:

Phase 1: Manage

Phase 2: Architect

Phase 3: Design

Phase 4: Build

Phase 5: Deploy

Phase 6: Operate

For more information, see http://devnet.informatica.com

Velocity Phases

Page 83: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.21

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 21 of 22

Lab 2-3 – Creating Mappings

• In the lab you will:

• Create shortcuts to objects in the shortcut (SC) folder

• Create a pass-through Mapping that brings data from a single Source to a single Target

2

Page 84: PC8x L1D StudentGuide 20081124g

Mapping Fundamentals 2.22

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 2: Mapping Fundamentals 22 of 22

Summary

This module showed you how to

• Create source and target definitions from flat files and relational tables

• Create a mapping using existing source and target definitions

• Use links to connect ports

Page 85: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics

3

Page 86: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 2 of 13

Module Objectives

After completing this module you will be able to:

• Create a basic Workflow and link its tasks

• Run a Workflow, monitor its execution, and verify the results

Why you need

Page 87: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 3 of 13

PowerCenter Tasks

Session: Run the logic of a mapping

Command: Run external commands

Email: Send an email to a defined recipient

Decision: Choose between paths in a Workflow

Assignment: Assign values to variables

Timer: Wait or pause for specified time

Control: Terminate or fail a Workflow

Event Wait: Wait for an event

Event Raise: Cause an Event Wait task to trigger

3

Page 88: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 4 of 13

Workflow Object

• Executes a series of Mappings (as Sessions) and other tasks

Page 89: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 5 of 13

Workflow Manager

• The Workflow Manager is the PowerCenter application that enables designers to build and run workflows

• Can be launched from Designer by clicking the “W” icon

3

Page 90: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 6 of 13

Workflow Designer

• The tool in Workflow Manager where you create Workflow objects

Page 91: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 7 of 13

Start Task

• Is always the first task in a Workflow

3

Page 92: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 8 of 13

Session Task

• Implements the execution of a Mapping

Page 93: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 9 of 13

Links in Workflows

• Indicate the flow of control from one task to the next

• The flow may branch either:

• Unconditionally (multiple links are followed from a single task)

• Using Decision tasks (only one branch is followed)

3

Page 94: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 10 of 13

Running a Workflow

• Right-click in the Workflow and select “Start Workflow”

• Passes control to Workflow Monitor

Page 95: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 11 of 13

Workflow Monitor

• Displays all Workflows and tasks in real time

• Provides access to logs and results

3

Page 96: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 12 of 13

Lab 3-1: Create and Run Workflows

• In this lab you will…

• Create and run Workflows that run the Mappings you created in Lab 3

Page 97: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 3: Workflow Basics 13 of 13

Summary

This module showed you how to:

• Create a basic Workflow and link its tasks

• Run a Workflow, monitor its execution, and verify the results

3

Page 98: PC8x L1D StudentGuide 20081124g

Workflow Basics 3.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Page 99: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations

4

Page 100: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 2 of 19

Module Objectives

After completing this module you will be able to:

• Use Expression transformations to perform calculations on a row-by-row basis

• Use Filter transformations to pass rows based on user-defined conditions

Why you need

Page 101: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 3 of 19

Expression Transformation

Performs row-level calculations (no aggregate functions)

Click here to

invoke the

Expression Editor

Use the logical and arithmetic operators and built-in functions for:

• Character manipulation (concatenate, truncate, etc.)

• Datatype conversion (to char, to date, etc.)

• Data cleansing (check nulls, replace strings, etc.)

• Data manipulation (round, truncate, etc.)

• Numerical calculations

• Scientific calculations

• Special functions (lookup, decode, etc.)

• Testing (for spaces, number, etc.)

Business Purpose

Modifies individual ports (columns) within a single row. Can add and

suppress ports. Cannot perform aggregation across multiple rows.

Description

PassiveType

4

Page 102: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 4 of 19

Uses of Expression Transformation: Examples

• Adjust employee salaries

• Concatenate first and last names

• Convert strings to numbers

• Arithmetic – add, subtract, multiply, divide numeric values

• Test conditional statements and pass the results to target tables or other transformations

Page 103: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 5 of 19

Expression Editor

• An expression is a calculation or conditional statement for a specific port

• Can contain other ports, functions, operators, variables, constants and return values from other transformations

Comments can be added to

expressions by prefacing them with

//. This allows later developers to

understand the logic behind an

expression.

Comments

4

Page 104: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 6 of 19

Functions Provided

Character manipulation e.g. CONCAT, LTRIM, UPPER

Datatype conversion e.g. TO_CHAR, TO_DECIMAL

Detect & correct errors e.g. ISNULL, REPLACECHR

Manipulate dates e.g. GET_DATE_PART, DIFF_DATES

Mathematical operations e.g. LOG, POWER, SQRT

More mathematical operations e.g. SIN, COS, TAN

Special constructs, e.g. IIF, DECODE

Test values e.g. ISNULL, IS_DATE, IS_NUMBER

Update variables e.g. SETVARIABLE, SETMINVARIABLE

All expressions resolve to a single value of a specific datatype. For example,

the expression LENGTH (“HELLO WORLD”) / 2 returns the numerical value

5.5.

Note

Highlighting a function and pressing F1 will launch the online help at the

selected function section.

Tip

Page 105: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 7 of 19

Variable Ports

� Use to:

� Simplify complex expressions

� Example: extract month from a date for use in several output ports

� Provide storage for temporary values

� Improve efficiency

� Variable ports are not visible in Normal view, only in Edit view

A transformation variable is created by creating a port and selecting the V

check box. When V is checked, the I and O checkboxes are unavailable

(grayed out), indicating that a variable port can not be used for input or

output.

Creating

Variable ports cannot be output directly. To output the contents of a variable

port, create an output port whose value is the variable.

Note

4

Page 106: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 8 of 19

Variable Ports (Continued)

� Variables are initialized (numeric to 0, string to “”) when the Mapping logic is

processed

When a record is processed, the expression is evaluated and the result is

assigned to the variable port. The result must be compatible with the port’s

datatype.

The variable persists across the set of records, and may be used or modified

anywhere in the set of records.

Note

Page 107: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 9 of 19

Order of Evaluation

• PowerCenter evaluates ports in the following order:

• Input and Input/Output ports

• Variable ports

• Output ports

• Variable ports are evaluated in the order they appear in the Ports tab

• Order of evaluation is critical when one variable refers to another

• Reference to a variable that has not yet been evaluated will usethe value from the previous row

• This is always Null for the first row in the datastream – can cause errors!

4

Page 108: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 10 of 19

Expression Validation

The Validate and OK buttons in the Expression Editor both parse the current expression to:

� Resolve references to ports in other transformations

� Parse default values

� Check spelling, correct number of arguments in functions, other syntactical errors

Page 109: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 11 of 19

Expression Example 1

• Check, Clean, and Record Errors

• Clean up item name

• Some item names are in UPPERCASE, some in lower case, some in MiXEd

• They should all be in Title Case

• Missing data

• Some records are incomplete

• Invalid dates

• Sometimes dates are input in an invalid format

• Invalid numbers

• Certain numeric fields sometimes contain nonnumeric data

• Reporting

• Need a count of the changes to item names

• Incorrect and missing data should be tagged and a report generated

4

Page 110: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 12 of 19

Expression Example 1 Solution

• Item names can be set to title case using the INITCAP function

• The ISNULL function will detect null values

• The IS_DATE and IS_NUMBER functions can check for correct formatting

• Variables can be used to count the number of errors detected or corrected

Page 111: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 13 of 19

Expression Example 2

• Calculate Sales Discounting and Inventory Days

• Discount tracking

• Compare the suggested sale price to the actual sale price to determine the level of discounting

• Create a field that tracks this comparison for reporting

• Days in Inventory

• Determine how long a given item has been in inventory

4

Page 112: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 14 of 19

Performance Considerations for Expressions

• Avoid multiple conversions of the same data

• Decimal � String � Decimal

• Integer � Decimal � Integer

• Date � String � Date

• Strings are more ‘expensive’ for the server to process than mathematical calculations

• Avoid default data type/size for new ports (string, 10) unless applicable

Page 113: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 15 of 19

Filter Transformation

Passes rows conditionally

A business may choose not to process records which do not meet a data

quality criterion.

Business Purpose

Allows rows which meet the filter condition are passed through to the next

transformation. Rows which do not meet the filter condition are skipped.

Description

ActiveType

4

Page 114: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 16 of 19

Filter Example

• Existing customer records need to be updated to reflect changes to columns such as address

• However, only existing customer records are to be updated – not new customer records

• Use a Filter transformation to pass only customer records with a legitimate master customer ID number

Page 115: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 17 of 19

Lab 4-1 – Using Filters and Expressions

• In this lab you will…

• Move data from the Customer staging table to the ODS database

• Use an Expression transformation to reformat data

• Use a Filter transformation to pass only valid records

4

Page 116: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 18 of 19

Lab 4-2 – Features and Techniques

• In this lab you will…

• Learn some features and techniques that will increase your efficiency as a PowerCenter Developer

Page 117: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Module 4: Expression and Filter Transformations 19 of 19

Summary

This module showed you how to:

• Use Expression transformations to perform calculations on a row-by-row basis

• Use Filter transformations to pass rows based on user-defined conditions

4

Page 118: PC8x L1D StudentGuide 20081124g

Expression and Filter Transformations 4.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level 1 Developer

Page 119: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data

5

Page 120: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 2 of 22

Module Objectives

After completing this module you will be able to:

• Use pipeline branches in Mappings

• Join homogeneous Sources using a Source Qualifier

• Define heterogeneous joins using the Joiner transformation

• Merge records from multiple places into one record set using the Union transformation

• Create and use reusable transformations

Why you need

Page 121: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 3 of 22

Source Pipelines

• Each Source Qualifier transformation starts a single Source pipeline

• A single Mapping can have multiple Source pipelines

• Each pipeline must terminate with at least one Target

• Transformations can split one source pipeline into multiple pipeline branches

Source pipeline

2 pipeline branches

T

T

T T

T T

T

SQ

1 mapping

5

Page 122: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 4 of 22

Multiple Pipelines

• A single Mapping may contain more than one pipeline

2 source pipelines

1 mapping

T T T T

T T T T

SQ

SQ

Page 123: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 5 of 22

Homogeneous Joins

• Homogeneous joins combine data from tables in the same database related by a common field

• The join is specified in the Source Qualifier transformation

• The join is performed on the Source database at runtime

• When SQL generated by the SQ transformation executes

TSQSource 1

Source 2

5

Page 124: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 6 of 22

Defining Homogeneous Joins

• If the tables have a Primary/Foreign Key relationship in the database, a join condition is automatically created

• You can enter a join condition, such as tablea.employee_id=tableb.employee_id

• Default is inner join

Page 125: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 7 of 22

Example of Homogeneous Join

• A business updates its Product ODS table regularly

• This requires a join of Product and Product-Cost

• The two tables

• Are in the same database

• Have a primary/foreign key relationship based on Product_ID

5

Page 126: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 8 of 22

Heterogeneous Joins

• Heterogeneous joins are joins using dissimilar sources, such as

• Oracle table and DB2 table

• Flat file and database table

• Two flat files

• Use a Joiner transformation (performs the join within the mapping)

• One source is designated the Master, the other Detail

• The Joiner selects rows from the two sources based on a join condition, such as a matching ID field

Master Source

Detail Source

Joiner Join Results

Join Condition: Master.CustomerID= Detail.CustomerID

A Joiner transformation combines two pipelines into a single transformation.

Specifically, the pipeline from the Detail source ends at the Joiner, flowing

into the pipeline from the Master source.

Pipelines

Page 127: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 9 of 22

Joiner Transformation

Performs heterogeneous joins on two data flows

Ports

• Input or Input/Output

• One Source is

designated Master, the

other Detail

• M property indicates

ports from the Master

Source when checked

Enables data from different systems to be combined to achieve desired

structure and results

Business Purpose

Combines fields from two data sources into a single combined data source,

based on one or more common fields called the join condition

Description

ActiveType

5

Page 128: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 10 of 22

Joiner Example

• Sales transaction data resides on a flat file

• Product data resides on a relational table

• Sales transactions require product data

Page 129: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 11 of 22

Join Types

• Normal (inner) join – keeps only matching rows based on the condition

• Master outer join - keeps all rows from Detail and matching rows from Master

• Detail outer join - keeps all rows from Master and matching rows from Detail

• Full outer join - keeps all rows from both Master and Detail

5

Page 130: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 12 of 22

Specify Join Type

Page 131: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 13 of 22

Specify Join Condition

5

Page 132: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 14 of 22

Joiner Cache

• Two types of cache memory: index cache and data cache

• All rows from the master Source are read into cache

• Index cache contains values for all ports from the master Sourcewhich are part of the join condition

• Data cache contains those port values not specified in the join condition

• After the cache is loaded, each row in the detail Source is compared to the values in the index cache

• Upon a match, the rows from the data cache are included in the outgoing data stream

Page 133: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 15 of 22

Enable Automatic Memory Settings

• Configure values for:

• Maximum Memory Allowed for Automatic Memory Attributes –numeric value

• Maximum Percentage of Total Memory Allowed for Automatic Memory Attributes - %ile value

• Must set for both values

• The Integration Service compares the two and uses the lower value as the maximum memory limit

• If this value is set to 0 for either attribute, the Integration Service disables automatic memory settings and uses default values.

5

Page 134: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 16 of 22

Union Transformation

• Merges row sets from multiple pipelines

One output

port group

One or

more input

port groups

Enables you to convert data from multiple sources into a single rowsetBusiness Purpose

Merges data from multiple pipelines or pipeline branches to a single pipeline

branch, similar to the SQL statement UNION ALL. Does not remove

duplicate rows.

Description

ActiveType

Page 135: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 17 of 22

Union Groups

• Create groups on the Groups tab

• Each group has an identical set of ports

5

Page 136: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 18 of 22

Group Ports

• Create on the Group Ports tab

Page 137: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 19 of 22

Union Ports

• Each group port created appears in the Output group (i.e., “PRODUCT_ID”

• Copies of each port appear in the Input groups (i.e., PRODUCT_ID2, PRODUCT_ID3)

5

Page 138: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 20 of 22

Reusable Transformations

• Create in Transformation

Developer

• Or create in Mapping

Designer and ‘promote’

• Listed in Transformations node of navigator

• Drag and drop into any

mapping

To make a non-reusable copy of a reusable transformation, hold the Ctrl key

while dragging and dropping.

Note

Instance of reusable transformations inherit any changes to the reusable

transformation. As a result, changing a reusable transformation may

invalidate the mappings containing instances of the transformation.

Warning

Page 139: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.21

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 21 of 22

Lab 5-1 Joining Data

• In this lab you will…

• Create a Mapping with two data flows

• Create a homogeneous join using a Source Qualifier

• Make a transformation reusable

• Create a heterogeneous join using a Joiner transformation

5

Page 140: PC8x L1D StudentGuide 20081124g

Joining and Merging Data 5.22

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 5: Joining and Merging Data 22 of 22

Summary

This module showed you how to:

• Use pipeline branches in Mappings

• Join homogeneous Sources using a Source Qualifier

• Define heterogeneous joins using the Joiner transformation

• Merge records from multiple places into one record set using the Union transformation

• Create and use reusable transformations

Page 141: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations

6

Page 142: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 2 of 12

Module Objectives

After completing this module you will be able to:

• Use Lookup transformations to bring in additional data related to a row

Why you need

Page 143: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 3 of 12

Lookup Functionality

LookupData

Lookup Transformation

Output with Lookup values

Input value

Input value

Lookup value(s)

Lookup condition:ITEM_ID = IN_ITEM_IDPRICE <= IN_PRICE

6

Page 144: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 4 of 12

Lookup Transformation

Ports

• Mixed

• Check L column for

lookup values to be

looked up

Usage:

• Returns related values

(if value not found

returns null)

Returns values from a database table or flat file

associated with a given input value

Allows data from external sources such as product codes, dates, names,

etc., to be brought into the row being processed.

Business Purpose

Allows the inclusion of additional information in the transformation process

from an external database or flat file source. In SQL terms, may be thought of

as a “subquery.” May be connected, unconnected, or dynamic.

Description

PassiveType

Page 145: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 5 of 12

Lookup Condition

• Compares one or more input fields with fields in the lookup source

• Similar to a SQL “WHERE” clause

• The Lookup transformation returns values that match the condition

6

Page 146: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 6 of 12

Lookup Cache

• Uses index and data cache

• Index cache contains values from all ports which are part of thelookup condition

• Data cache contains values from all output ports which are not part of the lookup condition

• After the cache is loaded, values from the Lookup input port(s) that are part of the lookup condition are compared to the index cache

• When a match is found, the rows from the cache are included in the stream

Caching for lookup tables is an option. When the lookup references a flat

file, caching is always performed.

Note

Page 147: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 7 of 12

Lookup Caching Properties

Persistent cache can improve performance, but stale data may pose a problem

• Lookup caching enabled

• Lookup table cached on Server

• For relational lookup tables, performance gain because only one, local SQL SELECT

• Lookup cache persistent

• Cache stored on Server hard drive and used next session unless …

• Re-cache from lookup source

• Reload lookup table each session

6

Page 148: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 8 of 12

Caching Options

The lookup cache is divided into an index cache and a data cache. The

cache sizes represent upper boundaries on how much of the index and data

caches will reside in memory. Any overflows are written to disk.

Lookup Data and Index

Cache Size

The location on disk where files associated with the lookup cache are stored.Lookup Cache

Directory Name

Overrides default SQL to query the lookup table – only with caching enabledLookup SQL Override

DescriptionAttribute

Page 149: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 9 of 12

Other Lookup Transformation Properties

Detail to include in the session logTracing level

Relational or flat fileSource type

Specifies the database containing the lookup table. Can use exact

connection information or the $Source and $Target variables.

Connection information

Displays the condition set in the Condition tab.Lookup condition

What to do when the transformation finds multiple rows that match the lookup

condition: first row, last row, any value, or error.

Lookup Policy on

Multiple Match

The name of the table from which the transformation looks up valuesLookup Table Name

DescriptionAttribute

6

Page 150: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 10 of 12

Other Lookup Transformation Properties (Continued)

Indicates whether the lookup file data is sorted. If it is, then checking this box

makes the lookup more efficient.

Sorted Input

Determines whether null values are considered high or low. Defaults to high.Null Ordering

If selected, the Integration Service differentiates between upper and lower

case when matching lookup conditions.

Case-Sensitive String

Comparison

Defaults to period (full stop). Can be set to a comma.Decimal Separator

Defaults to no separator. Can be set to a comma or a period (full stop).Thousand Separator

Defaults to MM/DD/YYYY HH24:MI:SSDatetime Format

DescriptionAttribute

Page 151: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 11 of 12

Lab 6-1 – Using the Lookup Transformation

• Use a Lookup transformation to import date information

• Use a variable port to calculate net and gross profit

6

Page 152: PC8x L1D StudentGuide 20081124g

Lookup Transformations 6.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 6: Lookup Transformations 12 of 12

Summary

This module showed you how to:

• Use Lookup transformations to bring in additional data related to a row

Page 153: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations

7

Page 154: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 2 of 12

Module Objectives

After completing this module you will be able to:

• Calculate values based on data in a set of records using the Aggregator transformation

• Order a set of records based on one or more fields using the Sorter transformation

Why you need

Page 155: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 3 of 12

Sorter Transformation

Sorts data on one or more ports

Ports

• Input/Output

• Define one or more

sort keys

• Define sort order for

each key

Sort Keys

Sort Order

Use before an Aggregator transformation to improve overall performance.

The Sorter transformation is often more efficient than adding an ORDER BY

clause to the Source Qualifier.

Business Purpose

Sorts incoming data based on one or more key values. Sort order may be

ascending, descending, or mixed.

Description

ActiveType

7

Page 156: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 4 of 12

Sorter Transformation Properties

DescriptionProperty

Transaction: Applies transformation logic to all rows in a transaction.

All Input: Applies the transformation logic on all incoming data, regardless of

incoming transaction boundaries.

Transformation Scope

Deal with caching - see next slideOther Properties

If selected, treat nulls as lower values than any other.Null Treated Low

Treats output rows as distinct. If this is selected, all ports are considered as

part of the sort key.

Distinct

A directory where the Integration Service will create temporary files when

sorting data.

Work Directory

Determines whether the Sorter differentiates between upper and lower case

characters.

Case Sensitive

Page 157: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 5 of 12

Sorter Cache

• All the incoming data is passed into cache memory before the sort operation is stored in cache memory

• Size of the cache memory is set by the Sorter Cache Size property

• May be from 1 MB to 4 GB

• If the cache size is larger than the available amount of memory,the Integration Service fails the session

• If the size of the incoming data is greater than the cache size, PowerCenter uses temporary files

• The location of these files is set using the Work Directory property

7

Page 158: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 6 of 12

Aggregator Transformation

Ports

• Mixed I/O ports allowed • Variable ports allowed• Group By allowed

Create aggregate

expressions in

non-input ports

Usage• Standard aggregations

Performs aggregate calculations

Enables calculation of gross profits or margins, summaries by period,

average values, etc.

Business Purpose

Calculates aggregates such as sums, averages, minimums and maximums,

across multiple groups of rows.

Description

ActiveType

Page 159: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 7 of 12

Aggregator Properties

DescriptionAttribute

Index cache size for the transformation. Default cache size is set to Auto.Aggregator Index

Cache Size

Transaction: applies transformation logic to all rows in a transaction.

All input: applies the transformation logic on all incoming data.

Transformation Scope

Data cache size for the transformation. Default size is set to Auto.Aggregator Data

Cache Size

Indicates input data is presorted by group. Use only if the mapping passes

sorted data to the Aggregator.

Sorted Input

Amount of detail displayed in the session log for this transformationTracing Level

Local directory for the index and data cache fileCache Directory

7

Page 160: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 8 of 12

Aggregator Cache

• Two types: Index and Data

• Index contains group by port values

• Data cache contains all port values, including variable and connected output ports

• Non “group by” input ports used in non-aggregate output expressions

• Non “group by” input/output ports

• Local variable ports

• Ports containing aggregate function (multiply by three)

• One output row is returned for each unique occurrence of the “group by” ports”

• If there is not enough memory specified in the index and data cache

properties, overflow is written to disk

• No rows are returned until all rows are aggregated

• Checking the “sorted input” attribute bypasses caching, as well as the sort

operation that occurs implicitly in an Aggregator

Key Points

Page 161: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 9 of 12

Aggregate Expressions

Conditional Aggregate

expressions are supported: Conditional SUM format: SUM(value, condition)

Aggregate

functions

AVG

COUNT

FIRST

LAST

MAX

MEDIAN

MIN

PERCENTILE

STDDEV

SUM

VARIANCE

7

Page 162: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 10 of 12

Data Concatenation

• Determines whether some ports (data flow arrows) can bypass a transformation

• Works only if:

• Combining branches of the same source pipeline

• AND neither branch contains an active transformation

DISALLOWED

TT

Active

ALLOWED

T

Passive

T

Page 163: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 11 of 12

Lab 7-1 – Using Aggregators and Sorters

• In this lab you will…

• Split a pipeline into two branches to feed two Aggregator transformations and write out data to two separate tables

• Use Sorter transformations to improve the efficiency of the Mapping

7

Page 164: PC8x L1D StudentGuide 20081124g

Sorter and Aggregator Transformations 7.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 7: Sorter and Aggregator Transformations 12 of 12

Summary

This module showed you how to:

• Calculate values based on data in a set of records using the Aggregator transformation

• Order a set of records based on one or more fields using the Sorter transformation

Page 165: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger

8

Page 166: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 2 of 9

Module Objectives

After completing this module you will be able to:

• Use the Debug wizard and toolbar to debug a mapping

Why you need

Page 167: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 3 of 9

Debugger

• The Debugger is a wizard-driven tool that runs a test session

• Allows you to

• Follow a record across a mapping from transformation to transformation

• Set and modify breakpoints within a mapping

• Change data and variable values

• The Debugger only works with valid mappings

• Use the Designer Output Window to determine why a mapping is not valid

8

Page 168: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 4 of 9

Debugger User Interface

Target Instance

Window

Transformation

Instance

Data Window

Current

Source

Qualifier

Indicator

Output Window –

Debugger or

Session Log

Debugger

Toolbar

Page 169: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 5 of 9

Using the Debugger

1. Press F9 to start the Debugger

• Stops when the Integration Service is ready

2. Choose an existing session or define a one-time debug session

• Options:

• Load or discard target data

• Save debug environment for later use

3. Monitor the Debugger windows

• Output window – view Debug or Session log

• Transformation Instance Data window – view transformation data

• Target Instance window – view target data

8

Page 170: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 6 of 9

Using the Debugger Continued

4. Move through the session

• Menu options include

• Next instance – examine a row as it progresses through the transformations in the mapping

• Step to instance– select a transformation and ‘step’ through the rows that flow through it

• Show current instance

• Continue

• Break now

5. Modify data and breakpoints

• When the Debugger pauses you can:

• Change data

• Change variable values

• Add or change breakpoints

Page 171: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 7 of 9

Set Breakpoints

6. Continue (to next breakpoint)

1. Edit breakpoint

2. Choose global or specific transformation

3. Choose to break on data condition or error –optionally skip rows

4. Add data conditions for breakpoint

5. Add breakpoint(s)

8

Page 172: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 8 of 9

Lab 8-1 – Using the Debug Wizard

• In this lab you will…

• Use the Debug Wizard

• Use the Debug toolbar

Page 173: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 8: Using the Debugger 9 of 9

Summary

This module showed you how to:

• Use the Debug wizard and toolbar to debug a mapping

8

Page 174: PC8x L1D StudentGuide 20081124g

Using the Debugger 8.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Page 175: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables

9

Page 176: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables 2 of 7

Module Objectives

After completing this module you will be able to:

• Use an Update Strategy transformation to determine how the Target should handle records (insert, update, delete)

Why you need

Page 177: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables 3 of 7

Update Strategy Transformation

Specifies how each row updates target tables (insert,

update, delete, or reject) based on an expression

Ports• All input / output• Specify the Update

Strategy Expression –IIF or DECODE logic determines how to handle the record

Example• Updating Slowly

Changing Dimensions

A target table may require historical information dealing with existing entries.

Rows written to a target table, based on one or more criteria, may need to

be inserted, updated, or deleted. The Update Strategy transformation meets

this requirement.

Business Purpose

“Tags” a row with the appropriate DML (Data Manipulation Language) for

PowerCenter’s writer to apply to the relational target. Each row can be

“tagged” with one of the tags shown on the following slide.

Description

ActiveType

9

Page 178: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables 4 of 7

Update Strategy Flags

• The Update Strategy transformation sets one of the following flags for each row:

• DD_INSERT – tags the row for insertion to the target table

• DD_UPDATE – tags the row for updating in the target table

• DD_DELETE – tags the row for deletion from the target table

• DD_REJECT – tags the row for rejection, no action to be taken on the target table

For the row tags DD_DELETE and DD_UPDATE, the table definition in the

mapping must have a key identified. Otherwise, the session created from

the mapping will fail.

If the “Forward Rejected Rows” attribute is checked (default), then rows

tagged with DD_REJECT will be passed on to the next transformation or the

Target, and subsequently placed in the appropriate “bad file”. If the attribute

is unchecked, then the reject rows will be skipped.

Note

Page 179: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables 5 of 7

Update Strategy Expression Example

IIF (high_value_client_score > 75, DD_INSERT,DD_REJECT)

� Expression is evaluated for each row

� Rows are tagged according to the logic of the expression

� Appropriate SQL is submitted to the target database: insert, delete or update

� DD_REJECT means the row will not have SQL written for it. Rejected rows may be forwarded through the mapping

Update Strategy performance can vary depending on the number of updates

and inserts. In some cases there may be a performance benefit to splitting a

mapping with updates and inserts into two mappings and sessions, one

performing the inserts and one the updates.

Performance

Considerations

9

Page 180: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables 6 of 7

Lab 9-1: Updating Target Tables

• In this lab you will…

• Use a single Source definition to read two files and combine their data in a single data stream

• Remove duplicate rows

• Create logic that

• Rejects records if the incoming CUSTOMER_ID is missing

• Inserts the record if the customer does not already exist in ODS_CUSTOMERS

• Updates the record if the customer already exists in ODS_CUSTOMERS

Page 181: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 9: Updating Target Tables 7 of 7

Summary

This module showed you how to:

• Use an Update Strategy transformation to determine how the Target should handle records (insert, update, delete)

9

Page 182: PC8x L1D StudentGuide 20081124g

Updating Target Tables 9.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Page 183: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques

10

Page 184: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 2 of 24

Module Objectives

After completing this module you will be able to:

• Set and use system and Mapping variables and parameters

• Use unconnected Lookup transformations to provide values on an as-needed basis

• Use a Router transformation to divide a single set of records into multiple sets of records

Why you need

Page 185: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 3 of 24

System Variables

SESSSTARTTIME

$$$SessStartTime

� Returns the system date value on the PowerCenter Server• Used with any function that accepts

transformation date/time datatypes • Not to be used in a SQL override• Has a constant value

� Returns the system date value as a string. Uses system clock on machine hosting PowerCenter Server• Format of the string is database type

dependent• Used in SQL override • Has a constant value

SYSDATE� Provides current datetime on the

PowerCenter Server machine

• Not a static value

System variables provide consistency to program execution. Business Purpose

System variables hold information derived from the system. The user cannot

control the content of the variable but can reference the information

contained within the variable.

Description

10

Page 186: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 4 of 24

Example

• The developer needs to set the value of a port to indicate when the record was last updated by PowerCenter

• Create a port called LAST_UPDATED and set its value to the expression SYSDATE

Page 187: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 5 of 24

Mapping Parameters and Variables

• Represent declared values:• Variables can change in value during run-time

• Parameters remain constant during run-time

• Apply to all transformations within a Mapping

• Declared in Mappings menu• Format is $$VariableName or $$ParameterName

• Value is initialized by the specification that defines it• Parameter values can be set to a different value in a parameter

file, specified for the session task

• Provide increased development flexibility

• Can be used in pre and post-SQL

Mapping variables and parameters are used:

• To simplify Mappings by carrying information within or between

transformations

• To improve maintainability by allowing quick changes to values in a

Mapping

Business Purpose

A Mapping can utilize parameters and variables to store information during

execution. Each parameter and variable is defined with a specific datatype.

Parameters are different from variables in that parameters are fixed for the

run of the Mapping, while variables can change (vary). Both can be

accessed from anywhere in the Mapping.

Description

10

Page 188: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 6 of 24

Declaring Mapping Parameters and Variables

Mappings – Declare Parameters and Variables menu option

Set aggregation type

Set optional initial value

User-defined ($$name)

Set datatype

See Note

IsExpVar determines how the Integration Service expands the parameter in

an expression string. If true, the IS expands the parameter after parsing the

expression. Default is false. If this is true and the parameter type is not

String, the IS fails the session.

IsExpVar

The PowerCenter Server uses the aggregation type of a mapping variable to

determine the final current value of the mapping variable. In a session with

multiple partitions, the PowerCenter Server combines the variable value

from each partition and saves the final value into the repository. Aggregation

types include Count (for integer datatype), Max, and Min.

Aggregation Type

Parameters and variables can be used only inside the object in which they

are created. A Mapping variable created for Mapping_1 is available only

within that Mapping and cannot be used by another Mapping or Mapplet in

the same workflow. A parameter or variable’s scope is the object in which it

was created.

Scope

Page 189: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 7 of 24

Using Mapping Parameters and Variables

Use parameters or variables in expression

10

Page 190: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 8 of 24

Functions to Set Mapping Variables

• SETVARIABLE($$Variable,value)• Sets the variable to the value specified

• Executes only for rows marked Insert or Update

• SETCOUNTVARIABLE($$Variable)• Increments a counter variable

• If the row is marked for Insert, add 1; if it is marked for Delete, subtract 1; otherwise, do not change

• SETMAXVARIABLE($$Variable,value)• Sets the variable to the larger of its current value and the value

passed to the function

• SETMINVARIABLE($$Variable,value)• Sets the variable to the smaller of its current value and the value

passed to the function

User-defined variable and parameter names always begin with $$ (i.e.,$$ParamName or $$VariableName).

Naming Convention

At the end of a successful session, the values of variables are saved to the repository. The SetVariable function writes the final value of a variable to the

repository based on the Aggregation Type selected when the variable was defined.

The final value written to the repository for a variable that has an Aggregate type of MAX will be whichever is greater, the current value or the initial value. Similarly, the final value for a variable with an Aggregate type of MIN

will be whichever is smaller, the current value or the initial value.

Variable Persistence

Page 191: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 9 of 24

Parameters & Variables – Initialization Priority

Parameters

1. Parameter file

2. Declared initial value

3. Default value

Variables

1. Parameter file

2. Repository saved value

3. Declared initial value

4. Default value

Set by the systemDefault Value

The initial value, as set by the user when creating the variable or parameterDeclared Initial Value

Values for variables that were saved in the Repository after successful

completion of a Session

Repository Saved

Value

A file that holds information about definitions of variables and parametersParameter File

10

Page 192: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 10 of 24

Examples of Variable/Parameter Usage

$$LAST_RUN_DTVariableSESSSTARTTIMETo perform an incremental extraction, track when a mapping was last executed using a mapping variable

$$YES_1_CHAR

$$NO_1_CHAR

Param

Param

'Y'

'N'

Ensure that everyone uses the same value in expressions. Create two parameters that represent “Yes” and “No.” Have all mappings use these values via a parameter file.

$$REG_PROC_LOCATIONVar'US'Set the value of the processing center where the session is executed, using a variable defined in the mapping and has its value set in a parameter file

$$MAX_NUM_DAYS_OPENParam100Expression that determines whether a support case has been open greater than 100 days

NameParam or Var

Potential Value

Reason/Goal

Page 193: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 11 of 24

Unconnected Lookup

Function in the Expression

calls the Unconnected Lookup

Unconnected Lookup

� Commonly used when a Lookup not needed for every record

� No links from/to other transformations

� Lookup data is called at the point in the Mapping that needs it

� Lookup function can be set within any transformation that supports

expressions

PassiveType

A source table may have a small percentage of records with incomplete

data. These “holes” in the data can be filled by performing a lookup to

another table or tables, on an as-needed basis.

Business Purpose

Unconnected Lookups allow the inclusion of additional information in the

transformation process from an external source when they are referenced

within any transformation that supports expressions.

Description

10

Page 194: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 12 of 24

Unconnected Lookup Example

• A small percentage of records are missing the CUST_ID field

Page 195: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 13 of 24

Calling the Unconnected Lookup

� Condition is evaluated for each row but Lookup function

is called only if condition is satisfied

IIF ( ISNULL(customer_id),:lkp.MYLOOKUP(order_no), customer_id)

Condition

Lookup function

Row keys

(passed to Lookup)

� Use Lookup function within a conditional statement

• Use the Lookup function (:lkp.lookupname) within a conditional expression

• The condition is evaluated for each row but the Lookup function is only

called when the record requires it

• Data from several input ports may be passed to the Lookup

transformation, but only one port may be returned, as designated by the

R(eturn) property in the Lookup transformation

• If no port is set as R the mapping will not be invalid, but the session may

fail at runtime

Key Points

10

Page 196: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 14 of 24

Unconnected Lookup Advantages

� Data lookup is performed only for those rows which

require it. Substantial performance can be gained

EXAMPLE: A Mapping will process 500,000 rows, each

representing one item in an order. For two percent of those

orders (10,000) the customer_id value is NULL. The customer_id

can be derived from the value of order_no.

Net savings = 490,000 lookups

IIF ( ISNULL(customer_id), :lkp.MYLOOKUP(order_no), customer_id)

Condition

(true for 2 percent of all rows)

Lookup

(called only when condition is true)

Page 197: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 15 of 24

Unconnected Lookup Functionality

One lookup port value may be returned for each lookup

Must select a

Return port in the

Ports tab, or

expression that

calls lookup is

invalid.

10

Page 198: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 16 of 24

Key Points

• An unconnected lookup can improve performance if the lookup table is static

• Use the lookup with a conditional statement

• The condition is evaluated only for those rows where the condition evaluates to TRUE

• The transformation is called using the expression :lkp.lookupname

• Data from several input ports may be passed to the Lookup transformation but only one port may be returned

• The port to be returned is designated by the Lookup transformation’s R (return) port

• If a port is not selected as the R port, the mapping will not beinvalidated but the session will fail at runtime

Page 199: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 17 of 24

Connected versus Unconnected Lookups

CONNECTED LOOKUP UNCONNECTED LOOKUP

Part of the mapping data flow Separate from the mapping data flow

Returns multiple values (by linking output ports to another transformation)

Returns one value - by checking the Return (R) port option for the output port that provides the return value

Executed for every record passing through the transformation

Only executed when the lookup function is called

More visible, shows where the lookup values are used

Less visible, as the lookup is called from an expression within another transformation

Default values are used Default values are ignored

10

Page 200: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 18 of 24

Joins versus Lookups

Source Qualifier Join Joiner Lookup

Advantages

Can join any number of tables

Full functionality of standard SQL

available

May reduce volume of data on

network

Disadvantages

Can only join homogeneous relational

tables

Can affect performance on the source

database

Advantages

Can join heterogeneous sources

Can join non-relational sources

Can join partially transformed data

Disadvantages

Can only join 2 input data streams per joiner

Only supports equijoin

Does not support “OR” conditions

Advantages

Can re-use cache across session runs

Can re-use cache w/in mapping

Can modify cache dynamically

Can choose to cache or not to cache

Can query relational table or flat file

Inequality comparisons are allowed

SQL override supported

Can be unconnected & invoked as needed

Disadvantages

Cannot output multiple matches

Unconnected can only have 1 return value

“OR” conditions not supported

Page 201: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 19 of 24

Router Transformation

Sends rows to different destinations based on filter

conditions

Ports

• All input/output

• Specify filter conditions

for each Group

Usage

• Link source data in

one pass to multiple

filter conditions

Allows you to write records from a single source into multiple targets based

on user-defined criteria.

Business Purpose

Passes row data to different groups based on filter-like conditions. A Router

transformation has one input group, and one or more output groups, each of

which has its own filter condition.

Description

ActiveType

10

Page 202: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 20 of 24

Router Groups

� Input group (always one)

� User-defined output groups

− Each group has one condition

− ALL group conditions are evaluated for each row

− One row can pass multiple conditions

� Unlinked Group outputs are ignored

� Default group (always one) capture rows that fail all Group conditions

A Router transformation is functionally equivalent to several Filter

transformations in parallel. However, performance can be substantially

better, because a row is read once into the input group but evaluated

multiple times, once for each condition.

Performance

Considerations

Page 203: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.21

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 21 of 24

Router Functionality

DATE_HIRED < 90 days ago

POSITION_CODE ≠ SALES

POSITION_CODE = SALES

Note: New employees

will be routed to two

Targets

In the diagram above, the record for a salesperson hired less than 90 days

ago will be routed to both STG_EMPLOYEES_NEW and

STG_EMPLOYEES_SALES.

If you wish to prevent single records from being routed to multiple Targets,

you must ensure that their filter conditions are mutually exclusive.

In the example above, you would prefix the conditions for the position-based

tables with “DATE HIRED >= 90 DAYS AGO AND”.

Note that multiple target objects can be instances of the same target table. If

this is the case, only one INSERT statement will be generated per record.

Note

10

Page 204: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.22

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 22 of 24

Lab 10-1 – Filling In Missing Data

• In this lab you will…

• Use a Unconnected Lookup to attempt to find in what city customers purchased their cars

• Use a Router to categorize customers based on income level, Postal code, and city into High-Income, Sub-Prime, and Uncategorized categories

• Override the relational writer to write out to a .CSV file so that the data can easily be loaded into a spreadsheet

Page 205: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.23

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 23 of 24

Lab 10-2 – Load Employee Staging Table

• In this lab you will…

• Use a persistent Repository variable to hold and increment the latest employee identification number

• Further leverage the reusable transformation re_exp_Format_Person

10

Page 206: PC8x L1D StudentGuide 20081124g

Mapping Techniques 10.24

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 10: Mapping Techniques 24 of 24

Summary

This module showed you how to:

• Set and use system and Mapping variables and parameters

• Use unconnected Lookup transformations to provide values on an as-needed basis

• Use a Router transformation to divide a single set of records into multiple sets of records

Page 207: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets

11

Page 208: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 2 of 18

Module Objectives

After completing this module you will be able to:

• Describe Mapplets

• Use a Mapplet in a mapping

• Describe Worklets

Why you need

Page 209: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 3 of 18

Mapplets

• A Mapplet contains transformations and may be embedded into a Mapping

Mapplets are reusable by nature – a Mapping uses an instance of a Mapplet.

These instances inherit all changes to the parent Mapplet, which may affect

the behavior of the Mappings that use the instances.

Note

Mapplets combine multiple mapping objects for reusability; they can also

simplify complex mapping maintenance. A Mapplet receives input data from

either an internal Source or the Mapping pipeline that calls the Mapping. A

Mapplet must pass data out to the Mapping via a Mapplet Output

transformation.

Description

Passive or ActiveType

11

Page 210: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 4 of 18

Mapplet Designer

Mapplet

Input & Output

transformations

(pass data from

or to mapping)

Mapplet Designer Tool

A business, as part of its daily sales, needs to apply discounts, performing a

number of lookups and aggregating the sales values.

This functionality is used in several types of feeds, so the Mapplet shown

here was created to provide this functionality, identically, in many Mappings.

Example

Page 211: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 5 of 18

Passes data from a Mapping into a Mapplet

Mapplet Input Transformation

Passive

Ports

• Output ports only

Usage

• Only those ports

connected from an

Input transformation

to another

transformation

will display in the

resulting Mapplet

• Connecting the same

port to more than one

transformation is

disallowed

• Pass to an Expression

transformation first

Transformation

Transformation

Acts as an input to a MappletDescription

PassiveType

11

Page 212: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 6 of 18

Mapplet Input Transformation Example

• The Mapplet Input transformation receives sales transactions for processing

Page 213: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 7 of 18

Mapplet Output Transformation

Passive

Ports

• Input ports only

Usage

• Only those ports connected to an Output transformation (from another transformation) will display in the resulting Mapplet

• One (or more) Mapplet Output transformations are required in every Mapplet

Passes data from a Mapplet into a Mapping

Acts as an output from a MappletDescription

PassiveType

11

Page 214: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 8 of 18

Mapplet Output Transformation Example

• The Mapplet Output transformation returns the processed transactions to the Mapping

Page 215: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 9 of 18

Mapplet with Multiple Output Groups

Can output to multiple instances of the same target table

11

Page 216: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 10 of 18

Unmapped Mapplet Output Groups

When the Mapplet is expanded at runtime, an unconnected output group

could result in a transformation having no output connections. If that is not

permitted, then the mapping will be invalid.

For example:

• If the Mapplet outputs are fed by an Expression transformation, the

mapping is invalid because an Expression requires a connected output.

• But if the Mapplet outputs are fed by a Router, the mapping is valid

because a Router can have unconnected output groups.

Warning

Page 217: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 11 of 18

Example: Data Sources Defined Inside Mapplet

Sources

define source

data within

Mapplet

Note: Mapplet must come first in mapping

Mapplet Output

transformationMapplet

Mapping

Mapplets cannot be nested – that is, you cannot use a Mapplet inside another

Mapplet.

Note

11

Page 218: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 12 of 18

Passive and Active Mapplets

contains only passive transformations

contains one or more active transformations

Passive Mapplet

Active Mapplet

Multiple passive

Mapplets can populate

the same target

instance

Active and passive

Mapplets cannot

populate the same

target instance

Multiple active

Mapplets cannot

populate the same

target instance

Page 219: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 13 of 18

Mapplet Parameters and Variables

• Similar to Mapping parameters and variables

• Defined by using the menu option Mapplets � Parameters and Variables

• A parameter or variable defined in a Mapplet is not visible in any parent mapping

• A parameter or variable defined in a Mapping is not visible in any child Mapplet

11

Page 220: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 14 of 18

Lab 11-1 – Creating a Mapplet

• In this lab you will…

• Create a Mapplet and use it in a Mapping

Page 221: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 15 of 18

Worklet

• An object representing a set or grouping of Tasks

• Can contain any Task available in the Workflow Manager

• Worklets expand and execute inside a Workflow

• A Workflow which contains a Worklet is called the “parent Workflow”

• Worklets CAN be nested (unlike Mapplets)

• Reusable Worklets – create in the Worklet Designer

• Non-reusable Worklets – create in the Workflow Designer

A Workflow may contain dozens of tasks. During Workflow design they will

develop naturally in “groupings” of meaningfully-related tasks, run in the

appropriate operational order. The Workflow can run as-is, from start to

finish, executing task-by-task, or the developer can place natural groupings

into Worklets.

A Worklet’s relationship to a Workflow is like that of a Mapplet to a Mapping.

Business Purpose

Worklets are optional processing objects inside Workflows. They contain

PowerCenter tasks that represent a particular grouping of, or functionally

related set of, tasks. They can be created directly in a Workflow (non-

reusable) or in the Worklet Designer (reusable)

Description

11

Page 222: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 16 of 18

Creating Worklets

� In the Worklet Designer, select Worklets | Create

Worklets

Node

Page 223: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 17 of 18

Using a Worklet in a Workflow

Worklet

used in a

Workflow

11

Page 224: PC8x L1D StudentGuide 20081124g

Mapplets and Worklets 11.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 11: Mapplets and Worklets 18 of 18

Summary

This module showed you how to:

• Describe Mapplets

• Use a Mapplet in a mapping

• Describe Worklets

Page 225: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows

12

Page 226: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 2 of 30

Module Objectives

After completing this module you will be able to:

• Set and use workflow variables

• Use link conditions and Decision tasks to control the execution of a workflow

• Use other workflow tasks: Email, Event Wait, Event Raise, Command

• Explain the purpose of the pmcmd utility

• Schedule workflows to run automatically

Why you need

Page 227: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 3 of 30

Link Conditions

• You can set conditions on workflow links:

• If the link condition is True, the next task is executed

• If the link condition is False, the next task is not executed

• To set a condition, right-click a link and enter an expression that evaluates to

True or false.

• You can use workflow variables in the condition (next slide)

Note: the words SUCCEEDED and

FAILED are reserved

for use in expressions

In addition to SUCCEEDED and FAILED, the words DISABLED, NOT

STARTED, STARTED, STOPPED and ABORTED are reserved for use in

link conditions.

Consult the Workflow Administration guide for valid values for all Predefined

variables.

Reserved Words

12

Page 228: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 4 of 30

Incoming Links

• OR – run the task as soon as any link condition is TRUE

• AND – run the task when all link conditions are TRUE

Page 229: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.5

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 5 of 30

Variables Used in a Workflow

Task-specific

variables

Built-in system

variables

User-defined variables

(next slides)Pre-defined variables

A workflow can contain multiple tasks and multiple pipelines. One or more

tasks or pipelines may be dependent on the status of previous tasks.

Workflow variables convey that information from one task to another.

Business Purpose

Workflow variables come in two types: user-defined and pre-definedTypes

12

Page 230: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.6

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 6 of 30

• To declare user-defined workflow variables

• Click Workflows � Edit and select the Variables tab

• Variables can persist across sessions in a workflow

• The value is saved in the repository

Declaring User-Defined Workflow Variables

Page 231: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.7

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 7 of 30

Pre-defined Workflow Variables

• Include system variables and task-specific variables

• System variables (SYSDATE and WORKFLOWSTARTTIME) can be usedfor calculating variable dates and times, e.g., in Assignment task link conditions

• Task-specific variables are available in Decision, Assignment, and Timer tasks and link conditions

Task-Specific

Variables

Predefined workflow variables are discussed in more detail in the Workflow

Administration Guide

Note

12

Page 232: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.8

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 8 of 30

Pre-defined Workflow Variable Example

• Session 2 depends on success of Session 1

• Defined as session status = successful and failed rows = 0

• Code the link from Session 1 to Session 2 so that Session 2 willnot run unless all criteria are true

• Use the task-specific workflow variables Status, SrcFailedRows, and TgtFailedRows in the Link condition expression

• Session 4 should not run if Session 3 takes more than one hour

• Test the system variable WORKFLOWSTARTTIME in the Link condition expression

Start

Session 1 Session 2

Session 3 Session 4

Page 233: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.9

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 9 of 30

Assignment Task – Setting User-Defined Workflow Variables

Expressions Tab

General Tab

Assigns a value to a user-defined workflow variable

Note: The variable must have been declared in the workflow Variables tab

Running a workflow task may depend on the results of other tasks or

calculations in the workflow. An Assignment task can do certain calculations

to establish the value for a workflow variable. This value may determine

whether other tasks or pipelines are run.

Business Purpose

Can establish the value of a Workflow Variable, whose value can be used at

a later point in the workflow, as testing criteria to determine if or when other

workflow tasks/pipelines should be run.

Description

12

Page 234: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.10

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 10 of 30

Assignment Task Example

• Session 4 should run at least one hour after Session 3 completes

• The Assignment Task is coded to set a time that the Timer will wait for

• To prevent the Assignment task from running until after Session 2 completes, use a Link Condition

Page 235: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.11

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 11 of 30

Decision Task

� Tests for a condition during the workflow and sets a flag based on the condition

� Use a link condition (or a Control task) downstream to test the flag and control execution flow

� Can use workflow variables in condition

Commonly, workflows have multiple paths. Some are simply concurrent

tasks. Others are pipelines of tasks that should only run if the previous tasks

are successful. Still others should be run only if those tasks are not

successful.

What determines the success or failure of a task or group of tasks is user-

defined, depending on the business-defined rules and operational rules of

processing.

The criteria are set as the decision condition in a Decision task, and

subsequently tested for a True or False condition

Business Purpose

Decision tasks enable workflow designers to set criteria by which the

workflow will or will not proceed to the next set of tasks, depending on

whether the set criteria is true or false

Description

12

Page 236: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.12

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 12 of 30

Decision Task Example

• If Session 3 is successful, run Session 4

• If Session 3 fails, send an email to the system administrator

Page 237: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.13

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 13 of 30

Email Task

� Sends an email within a workflow

Note: emails can also be sent post-session in a Session task

� Can be used with a link condition to notify success or failure of prior tasks

The PowerCenter domain must be configured to use a running, configured

email server. However, the impact of the Integration Service sending the

emails is minimal

Performance

Considerations

Various business and operational staff may need to be notified of the

progress of a workflow, the status of tasks (or combinations of tasks) within

it, or various metadata results of a session

Business Purpose

Email tasks enable PowerCenter to send email messages at various points

in a workflow. Users can define email addresses, a subject line, and the

email message text. When called from within a Session task, the message

text can contain variable Session-related metadata – for example, one

message for Session success and another for failure.

Description

12

Page 238: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.14

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 14 of 30

Event Wait Task

� Pauses processing of the pipeline until a specified event occurs

� Events can be:

� Pre-defined – file watch

� User-defined – created by an Event Raise task elsewhere in the workflow

An Event Wait task watching for a flat file by name is placed in a workflow

because some subsequent processing is dependent on the presence of the

file.

An Event Wait task waiting for the occurrence of a user-defined event will be

strategically placed so that the workflow should not proceed further until

some other set of tasks and conditions has occurred. It always works in

concert with an Event Raise task.

Business Purpose

Event Wait tasks wait for either the presence of a named flat file (a pre-

defined event) or some other user-defined event to occur in the workflow

processing. Note that the Workflow must be running in order to recognize a

pre-defined event.

Description

Page 239: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.15

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 15 of 30

Pre-defined Event Example

• Session 2 cannot run until the daily sales report file has been placed on the server

• The Event Wait task is configured to watch for the file to appear

• Session 2 does not run until the Event Wait task finds the file

12

Page 240: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.16

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 16 of 30

Event Wait Task (cont’d)

Events Tab

User-defined events must be declared in the workflow Events tab

Specify either a pre-defined

or user-defined event

Page 241: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.17

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 17 of 30

Event Raise Task

� Sets the location of a user-defined event in the workflow

� User-defined events are triggered when the PowerCenter Server executes the

Event Raise Task

� User-defined events must be declared in the workflow Events tab

Used with the Event Wait Task

This task allows signals to be passed from one spot in the workflow to

another that a particular series of predetermined events has occurred.

Business Purpose

Event Raise tasks are always used in conjunction with user-defined Event

Wait tasks. They send a signal to an Event Wait task that a set of pre-

defined events has occurred, along the pipeline from the Start task to the

Event Raise task.

Description

12

Page 242: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.18

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 18 of 30

User-Defined Event Example

• Session 5 should run after both Session 2 and Session 4 complete successfully

• The Event Raise task raises a user-defined event when Session 2 completes successfully

• The lower pipeline will not proceed beyond the Event Wait task until the event has been raised

For a user-defined event, the developer:

1. Defines an event in the workflow properties (prior to workflow

processing)

2. Includes an Event Wait task at a suitable point in the workflow, where

further processing must await some specific event

3. Includes an Event Raise task at a suitable point in the workflow, e.g.,

after a parallel pipeline has been completed.

User-Defined Events

Page 243: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.19

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 19 of 30

Command Task

� Specifies one or more UNIX command or shell script, DOS command or batch file for Integration Services to run during a workflow

Note: UNIX and DOS commands can also be run pre- or post-session in a Session task

� Command task status (success or failure) is held in the task-specific variable $command_task_name.STATUS

OS commands can be used for any operational or business unit related

procedure, and can be run at any point in a workflow. Command tasks can

be set to run one or more OS commands or scripts/batch files, before

proceeding to the next task in the workflow. If more than one command is

coded into a Command Task, the entire task can be set to fail if any one of

the individual commands fails. Additionally and optionally, each individual

command can be set not to run if a preceding command fails.

Business Purpose

Command tasks are inserted in workflows and worklets to enable the

Integration Service to run one or more OS commands of any nature. All

commands or batch files referenced must be executable by the OS login

that owns the Integration Service process.

Description

12

Page 244: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.20

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 20 of 30

Command Task (cont’d)

Add Cmd

Remove Cmd

A series of multiple concurrent or sequential Sessions can be followed by a

single Command task coded to copy or move all session logs created by the

workflow to a special daily backup directory.

A Session task that relies on a flat file as source data can be preceded by a

Command task that verifies the presence of the file, opens it and verifies

control totals or record counts with some external source of information.

A Session task that produces an output file can be followed by a Command

task that copies the file to another directory, or FTPs the file to another box

location. The command syntax is the same as that which would accomplish

this at the OS command prompt on the Integration Service machine.

Examples of

Command Tasks

Page 245: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.21

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 21 of 30

Timer Task

Waits for a specified period of time to execute the next task

General Tab

• Absolute Time

• Datetime Variable

• Relative Time

Timer Tab

12

Page 246: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.22

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 22 of 30

Control Task

Stops, fails,

or aborts the

Worklet or

Workflow

Page 247: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.23

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 23 of 30

Control Options

Note: Fail = Complete but set status to “failed”, Stop = Stop executing after orderly shutdown,Abort = Stop executing immediately

Aborts the workflow that is running.Abort Top-Level Workflow

Stops the workflow that is running.Stop Top-Level Workflow

Fails the workflow that is running.Fail Top-Level Workflow

Aborts the workflow or worklet that contains the Control task.Abort Parent

Stops the workflow or worklet that contains the Control task.Stop Parent

Marks the status of the workflow or worklet that contains the Control task as failed after the workflow or worklet completes.

Fail Parent

Marks the Control task as “Failed.” The PowerCenter Server fails the Control task if you choose this option.

Fail Me

DescriptionControl Option

The Control task can fail, stop, or abort either the parent Workflow or the

top-level Workflow. However, stopping or aborting the parent Workflow

means that no further progress takes place along that branch in the top-level

Workflow. This can cause the top-level Workflow to stop if there is no other

branch.

Note

12

Page 248: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.24

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 24 of 30

• Session, Email and Command tasks can be reusable

• Use the Task Developer to create reusable tasks

• Reusable tasks appear in the Navigator Tasks node and can be dragged and dropped into any workflow

In a workflow, a reusable task is indicated by a special symbol

Reusable Tasks

Use reusable session tasks sparingly. Retrieving the metadata for a

reusable session task and its child instances from the repository takes

longer than retrieving the metadata for a non-reusable session task.

Performance

Considerations

Occasionally, a certain mapping logic may be required to run in multiple

workflows. Since a mapping is reusable, the developer can code multiple

sessions, all based on the same mapping. However, it is simpler to create a

reusable session based on the mapping.

Once created in the Task Developer, an instance of the Reusable Session

can be placed in any workflow or Worklet.

Business Purpose

Page 249: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.25

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 25 of 30

pmcmd utility

• Line command utility providing most Workflow Manager operations, e.g. start workflow

• Example of syntax:pmcmd startworkflow -sv MyIntService -d MyDomain -u seller3 -p jackson -f SalesEast wf_SalesAvg

Note: The password can be provided through the PASSWORD environmental variable.

To do this, you can encrypt the password using the pmpasswd utility on the PowerCenter

Services machine and then enter the encrypted password in pmcmd.

The pmcmd command line utility allows the developer to perform most

Workflow Manager operations outside of the PowerCenter client tool. These

commands can be used in batch files.

Description

12

Page 250: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.26

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 26 of 30

Workflow Scheduler

• Set and customize workflow-specific schedule

Page 251: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.27

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 27 of 30

Workflow Scheduler (cont’d) 12

Page 252: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.28

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 28 of 30

Lab 12-1 – Using Assignment and Decision Tasks

• In this lab you will…

• Create a workflow that eliminates some types of bad data from getting into ODS_SALES

• Assign workflow variables to keep track of how many times the workflow has run

• Increment workflow variables using an Assignment task

• Branch in a workflow using Link conditions and a Decision task to choose to run the next session or report an error

Page 253: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.29

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 29 of 30

Lab 12-2 – Using Events and Timers

• In this lab you will…

• Create a workflow that raises and uses a User-Defined event

• Stop the workflow “nicely” if the tables load properly

• Set a timer to fail the workflow if it takes more than 15 minutes

• Schedule the workflow to run at a particular time

12

Page 254: PC8x L1D StudentGuide 20081124g

Controlling Workflows 12.30

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 12: Controlling Workflows 30 of 30

Summary

This module showed you how to:

• Set and use workflow variables

• Use link conditions and Decision tasks to control the execution of a workflow

• Use other workflow tasks: Email, Event Wait, Event Raise, Command

• Explain the purpose of the pmcmd utility

• Schedule workflows to run automatically

Page 255: PC8x L1D StudentGuide 20081124g

Mapping Design Workshop 13.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 13: Mapping Design Workshop

13

Page 256: PC8x L1D StudentGuide 20081124g

Mapping Design Workshop 13.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 13: Mapping Design Workshop 2 of 4

Module Objectives

After completing this module you will be able to:

• Follow best practices for mapping design

Why you need

Page 257: PC8x L1D StudentGuide 20081124g

Mapping Design Workshop 13.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 13: Mapping Design Workshop 3 of 4

Workshop 8-1: Mapping Design Workshop

• In this lab you will…

• Practice designing your own mappings 13

Page 258: PC8x L1D StudentGuide 20081124g

Mapping Design Workshop 13.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 13: Mapping Design Workshop 4 of 4

Summary

This module showed you how to:

• Follow best practices for mapping design

Page 259: PC8x L1D StudentGuide 20081124g

Workflow Design Workshop 14.1

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 14: Workflow Design Workshop14

Page 260: PC8x L1D StudentGuide 20081124g

Workflow Design Workshop 14.2

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 14: Workflow Design Workshop 2 of 4

Module Objectives

After completing this module you will be able to:

• Follow best practices for workflow design

Why you need

Page 261: PC8x L1D StudentGuide 20081124g

Workflow Design Workshop 14.3

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 14: Workflow Design Workshop 3 of 4

Workshop 14-1: Workflow Design Workshop

• In this lab you will…

• Practice designing your own workflows

14

Page 262: PC8x L1D StudentGuide 20081124g

Workflow Design Workshop 14.4

Copyright © 2008 Informatica CorpPowerCenter 8.x Level I Developer

Module 14: Workflow Design Workshop 4 of 4

Summary

This module showed you how to:

• Follow best practices for workflow design

Page 263: PC8x L1D StudentGuide 20081124g

Global Education Services Course Evaluation

9/5/2006

Required Information Optional Information

Course Title Your Name (print)

Course Start Date Company (print)

Location E-mail

Instructor

Phone

None Minimal Some Technical Advanced

1. What was your level of exposure to the product?

2. What was your level of exposure to SQL query tools?

3. What was your level of exposure to RDB concepts?

1 2 3 4 5

Strongly

Disagree

Disagree

Neutral

Agree

Strongly

Agree

Not

Applicable

Course Content and Materials

1. The course content met my expectations

2. The course met the stated objectives

3. The course length was long enough to cover the content

4. The time allotted for labs was long enough

5. The lab exercises helped in learning the course material

6. The visual aids used by the instructor were helpful

Instructor

7. The instructor was knowledgeable in the subject area

8. The instructor effectively used class time to enable me to learn the key concepts

9. The instructor encouraged students to ask questions

10. Student questions were answered clearly and completely

11. The instructor was available and helpful during labs

Facilities and Registration

12. The quality of the facilities was conducive to learning

13. Classroom equipment was an effective tool in my learning

14. Registration process made it easy to enroll

1 2 3 4 5 0

Overall

15. This training will improve my job performance

16. This training was a worthwhile investment for my employer 17. I am satisfied with the Training Overall

1 2 3 4 5 0

Page 264: PC8x L1D StudentGuide 20081124g

Global Education Services Course Evaluation

9/5/2006

What Units were the most valuable, least valuable for you and why?

Most:

Least:

What recommendations can you suggest for course improvement: materials and or presentation?

What topics require more coverage in class? Less coverage?

More:

Less:

Should the lab time be lengthened or shortened? Any lab in particular?

Should the course be made longer or shorter? Any unit in particular?

What suggestions would you offer the instructor to improve his/her delivery of the course?

What suggestions do you have for improving the classroom environment?

What follow up course(s) would you like to see?

What suggestions do you have that would make it easier to do business with us?

Would you recommend this course to others? No Yes

Please provide contact information for anyone you feel would benefit from one of our courses. Name Name Phone Number Phone Number e-mail e-mail

0 5


Recommended