Informatica® PowerCenter® 8 Level I Developer Student Guide

Version - PC8LID 20061113

Informatica PowerCenter 8 Level I Developer Student Guide Version 8.1 November 2006

Copyright (c) 1998–2006 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-200, Daniel Stenberg, <Daniel@haxx.se>. 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.

Table of Contents
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xx Course Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xx Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xx Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xx Other Informatica Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Obtaining Informatica Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Visiting Informatica Customer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Visiting the Informatica Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Visiting the Informatica Developer Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Visiting the Informatica Knowledge Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Obtaining Informatica Professional Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Providing Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii Obtaining Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii

Unit 1: Data Integration Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Lesson 1-1. Introducing Informatica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Lesson 1-2. Data Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Lesson 1-3. Mappings and Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Lesson 1-4. Tasks and Workflows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Workflows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Lesson 1-5. Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Unit 2: PowerCenter Components and User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Lesson 2-1. PowerCenter Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Lesson 2-2. PowerCenter Client Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Workflow Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Unit 2 Lab: Using the Designer and Workflow Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Step 1: Launch the Designer and Log Into the Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Step 2: Navigate Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Step 3: Navigating the Designer Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

i ii

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t n e t n o C f o el b aT

Step 4: Create and Save Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Step 5: Launch the Workflow Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Step 6: Navigating the Workflow Manager Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Step 7: Workflow Manager Task Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Step 8: Database Connection Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Unit 3: Source Qualifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Lesson 3-1. Source Qualifier Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Source Qualifier Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Datatype Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Lesson 3-2. Velocity Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Lab Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Architecture and Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Unit 3 Lab A: Load Payment Staging Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Section 1: Pass-Through Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Step 1: Launch the Designer and Review the Source and Target Definitions . . . . . . . . . . . . . . 38 Step 2: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Step 3: Create a Workflow and a Session Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Step 4: Run the Workflow and Monitor the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Lesson 3-3. Source Qualifier Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Unit 3 Lab B: Load Product Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Section 2: Homogeneous Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Step 1: Import the Source Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Step 2: Import the Relational Target Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Step 3: Create the Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Step 4: Create the Session and Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Step 5: Run the Workflow and Monitor the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Lesson 3-4. Source Pipelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Unit 3 Lab C: Load Dealership and Promotions Staging Table . . . . . . . . . . . . . . . . . . . . 59
Section 3: Two Pipeline Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Step 1: Import the Source Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Step 2: Import the Target Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Step 3: Create the Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Step 4: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

repoleveD I leveL 8 retneCrewoP acitamrofnI s t n e t n o C f o e l b aT

vi

Unit 4: Expression, Filter, File Lists, and Workflow Scheduler . . . . . . . . . . . . . . . . . . . . 67
Lesson 4-1. Expression Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Lesson 4-2. Filter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Lesson 4-3. File Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Lesson 4-4. Workflow Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Run Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Unit 4 Lab: Load the Customer Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Step 1: Create a Flat File Source Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Step 2: Create a Relational Target Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Step 3: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Step 4: Create a Filter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Step 5: Create an Expression Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Step 6: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Step 7: Schedule a Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Unit 5: Joins, Features and Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Lesson 5-1. Joiner Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Joiner Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Join Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Joiner Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Lesson 5-2. Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Unit 5 Lab A: Load Sales Transaction Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Step 1: Create a Flat File Source Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Step 2: Create a Relational Source Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Step 3: Create a Relational Target Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Step 4: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Step 5: Create a Joiner Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Step 6: Link the Target Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Step 7: Create a Workflow and Session Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Step 8: Start the Workflow and View Results in the Workflow Monitor . . . . . . . . . . . . . . . . 113 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

Unit 5 Lab B: Features and Techniques I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Open a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Feature 1: Auto Arrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Feature 2: Remove Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t n e t n o C f o el b aT

v

Feature 3: Revert to Saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Feature 4: Link Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Feature 5: Propagating Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Feature 6: Autolink by Name and Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Feature 7: Moving Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Feature 8: Shortcut to Port Editing from Normal View . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Feature 9: Create Transformation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Feature 10: Scale-to-Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Feature 11: Object Shortcuts and Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Feature 12: Copy Objects Within and Between Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Unit 6: Lookups and Reusable Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Lesson 6-1. Lookup Transformation (Connected) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Lesson 6-2. Reusable Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Unit 6 Lab A: Load Employee Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Step 1: Create a Flat File Source Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Step 2: Create a Relational Target Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Step 3: Step Three: Create a Reusable Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Step 4: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Step 5: Create a Lookup Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Step 6: Add a Reusable Expression Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Step 7: Link Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Step 8: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Unit 6 Lab B: Load Date Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Step 1: Create a Flat File Source Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Step 2: Create a Relational Target Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Step 3: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Step 4: Create a Workflow and a Session Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Step 5: Run the Workflow and Monitor the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Unit 7: Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Lesson 7-1. Debugging Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Unit 7 Lab: Using the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Step 1: Copy and Inspect the Debug Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Step 2: Step Through the Debug Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
repoleveD I leveL 8 retneCrewoP acitamrofnI s t n e t n o C f o e l b aT

iv

Step 3: Use the Debugger to Locate the Error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Step 4: Fix the Error and Confirm the Data is Correct . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Unit 8: Sequence Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Lesson 8-1. Sequence Generator Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Unit 8 Lab: Load Date Dimension Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Step 1: Create a Shortcut to a Shared Relational Source Table . . . . . . . . . . . . . . . . . . . . . . . 187 Step 2: Create a Shortcut to a Shared Relational Target Table . . . . . . . . . . . . . . . . . . . . . . . 187 Step 3: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Step 4: Create a Sequence Generator Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Step 5: Link the Target Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Step 6: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

Unit 9: Lookup Caching, More Features and Techniques. . . . . . . . . . . . . . . . . . . . . . . . 193
Lesson 9-1. Lookup Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Lookup Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

Unit 9 Lab A: Load Promotions Dimension Table (Lookup and Persistent Cache) . . . . 197
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Step 1: Create a Shortcut to a Shared Relational Source Table . . . . . . . . . . . . . . . . . . . . . . . 200 Step 2: Create a Shortcut to Shared Relational Target Table . . . . . . . . . . . . . . . . . . . . . . . . 200 Step 3: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Step 4: Create Lookups for the Start and Expiry Date Keys . . . . . . . . . . . . . . . . . . . . . . . . . 200 Step 5: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

Unit 9 Lab B: Features and Techniques II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Open a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Feature 1: Find in Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Feature 2: View Object Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Feature 3: Compare Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Feature 4: Overview Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

Unit 10: Sorter, Aggregator and Self-Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Lesson 10-1. Sorter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Sorter Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Lesson 10-2. Aggregator Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

iiv

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t n e t n o C f o el b aT

Aggregator Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Lesson 10-3. Active and Passive Transformations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 Lesson 10-4. Data Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Lesson 10-5. Self-Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

Unit 10 Lab: Reload the Employee Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Step 1: Copy an Existing Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Step 2: Examine Source Data to Determine a Key for Self-Join . . . . . . . . . . . . . . . . . . . . . . 232 Step 3: Prepare the New Mapping for Modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Step 4: Create a Sorter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Step 5: Create a Filter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Step 6: Create an Aggregator Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Step 7: Create a Joiner Transformation for the Self-Join . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Step 8: Get Salaries from the Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Step 9: Connect the Joiner and Lookup to the Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Step 10: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

Unit 11: Router, Update Strategy and Overrides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Lesson 11-1. Router Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 Lesson 11-2. Update Strategy Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Lesson 11-3. Expression Default Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Lesson 11-4. Source Qualifier Override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Lesson 11-5. Target Override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Lesson 11-6. Session Task Mapping Overrides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

Unit 11 Lab: Load Employee Dimension Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Step 1: Copy the Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Step 2: Edit the Expression Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Step 3: Create a Router Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Step 4: Create an Update Strategy for INSERTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Step 5: Create Lookup to DIM_DATES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Step 6: Link upd_INSERTS and lkp_DIM_DATES_INSERTS to Target DIM_EMPLOYEE_INSERTS 262 Step 7: Create an Update Strategy for UPDATES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Step 8: Create Second Lookup to DIM_DATES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Step 9: Link upd_UPDATES and lkp_DIM_DATES_UPDATES to Target DIM_EMPLOYEE_UPDATES 262 Step 10: Link ERRORS Router Group to DIM_EMPLOYEES_ERR . . . . . . . . . . . . . . . . . . 263 Step 11: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
repoleveD I leveL 8 retneCrewoP acitamrofnI s t n e t n o C f o e l b aT

ii i v

. . . . . . . . . . . . . . . . . . . . . . . 305 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . Mapplets . . . . 310 Step 4: Add Unconnected Lookup Test to Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Step 5: Create Aggregator Transformation . . . . . . . . . . . . . . . . . . . . Parameters and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Unit 12: Dynamic Lookup and Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mapping Parameters and Variables . . . . . . . . . . . . . . . . . . . . 309 Step 1: Create an Internal Relationship Between two Source Tables . . . . . . . . . . . . . . . . . . . . and Monitor the Second Run . . . . . . . . . . . . 284 Step 4: Create a Lookup Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unconnected Lookup Transformations . . . . . . . . . . . . . . . . 276 Error Log Types . . . . . . . . 319 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t n e t n o C f o el b aT xi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Mapplets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Unit 14: Mapplets .Step 12: Prepare. . . . . . . . . . . . . . . 293 Lesson 13-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Log Source Row Data . . . . . . . . . . 271 Lesson 12-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Step 1: Create a Relational Source Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Step 3: Create a Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Step 2: Create a Relational Target Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Unit 13: Unconnected Lookup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Lesson 13-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Unit 13 Lab: Load Sales Fact Table . . . . . . . . . . . . . . . . . . . 286 Step 7: Create and Run the Workflow . . . . . . 271 Lesson 12-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Reference . . . . . . . . . . . . . . . . . . . . . . . . 311 Step 6: Create and Run the Workflow . . . . . . . . . . . . . . . . 309 Step 3: Step Three: Create an Unconnected Lookup . . . . . . . . . . . . . . . 296 Joins versus Lookups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamic Lookup Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Lesson 14-1. . . . . . . 286 Step 6: Create an Update Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Lesson 13-3. . . . . . . . . . . . . 289 Error Log Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Step 2: Create a Mapping Parameter . . . . . . . . . . . . 279 Unit 12 Lab: Load Customer Dimension Table . . . . . 293 Connected versus Unconnected Lookup Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Data Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Step 5: Create a Filter Transformation . . . . . . 277 Log Row Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Designing Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Step 4: Create the Decision Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Step 6: Create the Email Task . . . . . . . . . . . . . 350 Unit 16 Lab: Load Product Weekly Aggregate Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 High Level Process Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 Mapping Output Transformation . . . . . . . . . . . . . . . . . . . . . 346 Lesson 16-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Link Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Mapping Input Transformation . . . . . . . . . . . . . . . 337 Workshop Details . . . . . . . . . . . . . . . . . . . 323 Unit 14 Lab: Create a Mapplet . . . . . . . . . . . . . . . . . . 349 Lesson 16-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Mapping Specifics. . . . . . . . 341 Run Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Instructions . . . . . . . 355 Step 2: Copy the Existing Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Email Task . . . . . . . . . . . . . . . . . . . . . . . 338 Sources and Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Step 2: Add Mapplet to Mapping . 345 Lesson 16-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 Step 1: Copy the Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 repoleveD I leveL 8 retneCrewoP acitamrofnI s t n e t n o C f o e l b aT x . . . . . . . . . . . . . . . . 345 Lesson 16-2. . . . . . . . . . . . . . . . . . . . . 365 Lesson 17-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Unit 15 Workshop: Load Promotions Daily Aggregate Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Wait Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Step 7: Start the Workflow and Monitor the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 Step 3: Create the Assignment Task . . . 361 Unit 17: More Tasks and Reusability . . . . . . . . . 333 Lesson 15-1. . . . . 330 Unit 15: Mapping Design . . . . . . . . . . . . . . . . . 342 Unit 16: Workflow Variables and Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Step 1: Create the Mapplet . . . . . . . . . . . . . . . . . . . . . . . 338 Workflow Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Step 5: Create the Session Task . . . . . . . . . . . . . . . . . . . . . Workflow Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assignment Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Step 3: Create and Run the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Lesson 16-4. . . Decision Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Pre-Defined Event . . . . . . . . . . 338 Mapping Details . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 Lesson 17-7. . . . . . . . . . . . . . . . 373 Unit 18: Worklets and More Tasks . . . . . . . . . . . . . . . . . . 385 Step 2: Create a Worklet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Step 4: Create an Email Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Lesson 18-2. . . . . . . . . 385 Step 3: Create a Timer Task . . . . . . . 378 Lesson 18-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Lesson 18-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 Workflow Specifics . . . . . . . . . . . Reusable Session Tasks . . . . . . . . . . . . . . . . 397 Workshop Details . . Worklets . . . . . . . . . . . . . . . . . . . . . . . . 394 Unit 19 Workshop: Load All Staging Tables in Single Workflow . 390 Unit 19: Workflow Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command Task . . . . . . . . . Designing Workflows . . . . 371 Lesson 17-6. . . . . . 386 Step 5: Create a Control Task . . . . . . . . . . . . .User-Defined Event . 383 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 Lesson 17-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 Unit 20: Beyond This Course. . . . Reusable Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Step 1: Copy the Mappings . . . . . . . . . . . . . . . . . . . . . . . . 369 Lesson 17-4. . . . . . . . . . 388 Step 7: Start the Workflow and Monitor the Results . . . . . . 387 Step 6: Create the Workflow . . . . . . . . . . . . . Timer Task . . . . . . . . pmcmd Utility . . . . . . . 393 Lesson 19-1. . . . . . . . Control Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Raise Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Workflow Overview . . . . . . . . . . . . 401 ix r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t n e t n o C f o el b aT . . . . . . . . . . . . . . . . . . . 368 Lesson 17-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reusable Session Configurations . . . . . . . . . . . . 379 Unit 18 Lab: Load Inventory Fact Table . . . . . . . . . . . . . . . . . . 371 Lesson 17-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

repoleveD I leveL 8 retneCrewoP acitamrofnI s t n e t n o C f o e l b aT iix .

. . . . . . Source Analyzer View of the customer_layout Flat File Definition . 63 . . . . . . . . . . . . Completed Schedule Options. . . . . . . . . . . . . . . . . . . . . . . . . . . 91 . . . . . . . General Properties for the Workflow . 44 . . . . . . . . . . . 3-9. . . . . . . . . 2-5. . . . . . . . 63 . . . . . . . . . . . . . . . . . 4-2. . . . . . . . . . . . . . . . . Mapping with Source and Target Definitions . . . . . . . . . . . . . . . 83 . . . . . . 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Properties Tab of the Filter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Normal View of the Completed Mapping . . . . . . . . . . . . . . . . . . . 3-20. . . . . . 38 . . . . . . . . 42 . . . . . . . . . . . . . . 85 . Properties for the Completed Session Run . . . . . . 21 . . . . . 64 . . . . . . . . . . . . . 4-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11. . . . . . . 92 . . . . . . . . . . . . . . . . . . . . . . . . . 2-7. . . . . . . . Successful Run of a Workflow Depicted in the Task View of the Workflow Monitor 3-7. . . . . . . . . . . . . . 4-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 . 3-21. . . . . 4-3. . . . . . Student folder with new objects . . . . . . . . 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Task Toolbar Default Position . . . . . . . 3-5. . . . Navigator Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Completed Properties Tab of the Filter Transformation . . 94 . . . . . . . . . . 3-4. . . . . . . . . . . . . . . . . . . . 44 . . Source/Target Statistics for the Completed Session Run . Relational Connection Browser . . . . . . . . . 4-9. . . Source/Target Statistics for the Completed Session Run . . . . . . . Task Toolbar After Being Moved . . . . . . . . . . . Generated SQL for the m_Stage_Product Mapping . . . . . . . . . . . . . . . . . . . . . . . Sample Expression . . . . . . . . . . Application Toolbar . . 19 . . . . Properties of the Completed Session Run . . . . . . . . . . . . . . . . . . . . . . . . . . 93 . . . . . 2-6. . . . . . . . . . . . . 2-9. . . 65 . . . . . 3-13. . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . 91 . . . . . Contents of the customer_list. . . . . . 4-13. . . . . . . . . . 3-3. . . . 4-15. . . . . 2-3. . . . . . . DEV_SHARED Target subfolder . . . 4-14. . . . . . . . . . . . . . . . 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . 54 . Source Definitions with a PK/FK Relationship Displayed in the Source Analyzer . . . . . . . . . . . . . . . . . . . 4-12. .List of Figures Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure 2-1. . . . . . . . . . 95 ii i x r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I serugiF fo tsiL . . . . . . . . . . . . . . . . . . . Completed Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 . . . . . . 22 . . . . . Mapping with Source and Target Definitions . 64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mapping with Newly Added Filter Transformation . . . . . . . . . . . . . . . . . . . . . . . . . Completed Session Task Target Properties . . . . 39 . . . . . 85 . . . . 45 . . . . . . . . 3-1. . . . . . Properties of the Completed Session Run . . . . Data Preview of the STG_DEALERSHIP Target Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .txt File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 . . . . . . . . Filter Transformation Linked to the Expression Transformation . . . . 3-2. . . . . . . . . . . . . . . . . . . . . 3-10. . . . . . . . . . . . . . . Source/Target Statistics for the Completed Session Run . . . . . . . . 3-12. . 95 . . . . . . . . . . . . . 56 . . . . . . 3-15. 3-6. . . . DEV_SHARED Folder and Subfolders . . . . . . . . . . . 3-19. . . . . . 82 . . . . . . . Data Preview of the STG_PROMOTIONS Target Table . . . . . . . . . . . . . Data Preview of the STG_CUSTOMERS Target Table . . . . Data Preview of the STG_PRODUCT Target Table . 25 . . . . . . . 4-4. . . . . . . . . . . . . . . . . . . 83 . . . . . Customized Repeat Selections . . Data Preview of the STG_PAYMENT Target Table . . . . . . 18 . . . . . . . . . 56 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 . . Designer Tools . . . . . . . . . . . . . . . . . . . . . 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 . . . 4-17. 4-7. . . . . . . . . . . . . . . . . . . . . . . . 22 . . . . . . . . . . . . . 4-10. . . . . Session Task Source Properties . . . . . . . . Iconic View of the Completed Mapping . . . . . . . . . . 3-18. . . . . . Normal view of the completed mapping . . 4-5. . . . . . . . . . . . . . . . 4-6. 4-11. . . . . . . . Normal view of the promotions flat file definition displayed in the Source Analyzer 3-17. . . . . . . Target Designer View of the STG_CUSTOMERS Table Relational Definition . . . . . . . Properties for the Completed Session Run . . . 88 . . . . . . . . . . . . . . . . Normal view of the payment flat file definition displayed in the Source Analyzer . . . . . 43 . . . . . . . . . . . . . . . 3-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . Source/Target Statistics for the Completed Session Run . . . 62 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4. . . . . . . . . . . . . . . . . . 3-8. Iconic View of the Completed Mapping . . 4-1. . . . . . . . . . . . . . . . . . . . . . 40 . . . . 54 . 84 . . . . . . . . . . . . . . 86 . . . . 3-16. . . . . . . . . . . . . . . .

. . . 5-20. . . . . . Normal view of the newly created Lookup Transformation . . . . . . . . . . . . . . . . Selecting the forward link path . . . . . . . Task Details of the completed session run . . . . . . . . . . . . Partial mapping with source and target . . . 6-9. . . . 6-19. . . . . . . . . 146 . . . . . . 144 . . . . View of an Unorganized Mapping . . . Autolink dialog box . . . Mapping with Source and Target definitions . . . 110 . . . . . 5-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 . . . . . . . . . . . . . . . . 6-21. Task Details of the Completed Session Run . . . . . . . . . . . . . . . . . . . . . . . . . . 127 . . . . . . . . . . . . . . . . . . 5-12. 145 . . . . . . . . . . . . . . . . . . . . . . . . . . . Joiner Transformation Button . . . . . . . . . . . . . 5-26. . Edit View of the Condition Tab for the Joiner Transformation with Completed Condition . . . . . . . . . . . . . . . . 148 . . . Selecting to propagate the attributes . . . . . . . . . . . . . . . . . . 162 . . . . . . . . . 6-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 . . . . . Selecting Multiple Links . Task Details of the completed session run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25. . . . . . . . . . . . . . . . . 119 . . . . . 6-10. . Source properties for the employee_list file list . . . . . . . . . . . . . . . . . . . . . . . 5-4. . . . . . Completed Mapping . . . . . . 5-3. . . . . . . . . . . . . . . 5-14. Normal View of the Heterogeneous Sources. . . . 5-23. . . . 109 . Creating a transformation using the menu . 6-2. . . . . . . . . . . . 124 . . . . . . . . . . . . . . . . . . . 6-8. . . . . . . . . . 120 . . 160 . . . . 121 . . 109 . . . 149 . . . . . .screen 1 . . . . . . . . . . . . Dialog box 1 of the 3 step Flat File Import Wizard . . . . . 5-2. . . . . . . . . . . . . 5-13. . 5-16. . . . . 5-5. . . . . . . . . . . . . . . 108 . . . . . . . . . . . . . . . . 6-14. . . . . . . . . Arranged View of a Mapping . . . . . . . Lookup Transformation table location dialog box . . . . . . . . . . . . Data preview of the STG_DATES table . . . . . . 113 . . 6-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5. . . . . . . . . . 6-17. . . . . . . . . . . . . . . . . . . . 5-22. . . . . . . . . . . . . . . . . . . Normal View of Completed Mapping Heterogeneous Sources Not Displayed . . 6-15. . . 127 . . . 111 . . . . . 6-1. . . . . . . . . . . . . .Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure 5-1. . . . . . . . . . . . . Highlighted link path going forward and backward . . . . . . . . . . . . . . . 145 . . . . . . . . . . . Lookup Transformation condition box . . . . . . . . . . . . . . . . . Data Preview of the STG_TRANSACTIONS Table . . . . . . . . . 122 . . . . . . . . . . . . . . . . . . . . . . . . . . 128 . . . . . . . . . . 5-21. . . . . . . . . . . . . . Transformation edit dialog box showing how to make a transformation reusable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zoom options . . . . . . . . . . . . . . . . . Designer Warning Box . . . . . . . . . . . . . . 110 . . . . . . . . . . . . . . . . . . Target Designer view of the STG_EMPLOYEES relational table definition . . . . 5-9. . . . . . . . . . . . . . . Highlighted forward link path . . . . . . . . . . . . . . . . 6-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 . . . . Source Qualifiers and Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 . . . . Navigator window in the Designer . 122 . . . . . . . . . . . . . . . . . . . . . . . . 6-16. . . . . . 5-6. 6-3. . . . . . . . 125 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 . . . . . . . . . . . . . . 6-4. . . . . . . . . . . . . . . . . . . Normal View of Heterogeneous Sources Connected to a Joiner Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 . . . . . . . . . 161 . . 113 . . Source Analyzer view of the employees_layout flat file definition . . . . . . . . . . . . . . . . . . . . . . . 146 . . . . . . . . . Question box letting you know the action is irreversible . Edit View of the Ports Tab for the Joiner Transformation . . . 5-10. . . . . . . . . . . . . . . . . 145 . . . Source/Target Statistics for the session run . . . . . . . . . . . 5-29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expression after the AGE port has been moved . . . . . . . . Defining a prefix in the autolink dialog box . . . 159 . . . . . . . . . . . . . . . . . Click and drag method of moving ports . . . . . . . 6-6. . . . . . . . . Edit View of the Condition Tab for Joiner Transformation Without a Condition . . . . . . . . 118 . . . . . . . . . . . . . 114 . . . . . . 129 . . . . . . . 147 . . . 119 . 123 . . . . . 5-24. . . . . . . . . . . . . . . . . . . . . Source/Target Statistics for the Session Run . . . . . . . . . . Data Preview of the STG_EMPLOYEES target table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12. . . . . 128 . Transformation Toolbar . . Iconic View of an Arranged Mapping . . . . 147 . . . . 5-11. . 118 . . . . . . . . . . . . . . . . . 5-7. . . . . 5-27. . 5-28. . . . . . . . . . . . . . . . 6-7. . . . . . . . . . . . . . . . . . . . Normal View of the Newly Created Aggregator Transformation . . . Create Transformation dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8. . . . . . . . . . . . . . Transformation edit dialog box of a reusable transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 . . . . . . . . . . . . . . . . . . Navigator window depicting the Transformations node . . . . . . . . . . Propagation attribute dialog box . . . . . . . 151 . . . . . 126 . . 5-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11. . . . . 5-15. . . . . . . . . . . . . . 163 repoleveD I leveL 8 retneCrewoP acitamrofnI serugiF fo tsiL vix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19. . . . 150 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Source/Target Statistics of the completed session run . . . . . . . . .

. . . . . . . . . . . . m_DIM_POROMOTIONS_LOAD completed mapping . . ... . . . . . . . . . . . . . . . . Employee_central. . . . . . . . . . . . . . . . . . . . . . . . . . Split data stream joined back together . . . . . . . . . . . . . . . . . . . . . . . . . . Column differences between two target tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preview files created when Persistent Cache is set on Lookup Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 9-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 8-5. . . . .. . . . . 265 vx r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I serugiF fo tsiL . . . 174 7-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Preview of the DIM_DATES table . 233 10-4. . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . .. . . . . . 205 9-10. . . . . . . . . . . . . Task Details of the completed session run . . . . . . . .. . . . . 236 10-9. . . . . . . . . . . . . . . . . . . . . . . . . Data Preview of the DIM_PROMOTIONS target table . . . . . . . . . . . . . . . . 212 10-1. . . . . . . . . 190 8-7. . . . . . . . . . . . 11-6. . . . . . 11-2. . 261 . . . . . . . . . . . . . . . . . . . . . . . . . Compare Transformation objects Properties details . . . 188 8-2. . . . . .. . . . . . . . . 238 10-10. . .. . 264 . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . Source Filter Value . . . . . . . . . . . . . . . 235 10-7. .. . . . . . . . . 232 10-2. . . . .. . . . . . . . . .. . . .. . . . . . . .. . . . . . . . . . . . 163 7-1. . Select Lookup Table . . . .. . . . . . . . Renaming an instance of a Reusable Transformation . Iconic view of the completed mapping . . . . . . . . . . . . . . . . Task Details of the completed session run . . . . . .. Data preview of the STG_DATES table . . . . . .screen 1 10-14.. Transformation compare objects dialog box . . . . . . 209 9-12. 211 9-14. . . . . . . . . . . . .. . 200 9-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Source/Target statistics for the session run . 233 10-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . Normal view of the sequence generator NEXTVAL port connected to a target column . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . 203 9-6. . . . 232 10-3. . . . . . . . . . 238 10-11. . . . . . . . . m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD after most links removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data preview of the self-join of Managers and Employees in the STG_EMPLOYEES target table . . . . . . . . . . . Customize Toolbars Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 8-1. . . . . . . . . . . . . Source/Target Statistics of the completed session run . . . . . . . . . . . Source/Target Statistics of the completed session run . . . . . . . . . 263 . . . . . . . .. 204 9-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m_DIM_DATES from the previous lab that populated the DIM_DATES table . . . . . . . . . . . . .. 210 9-13. Update Strategy set to INSERT . . . . View Dependencies dialog box . . . . . . . . . . . . . . . 11-5. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 188 8-4. . . . . . . . . . .. . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . 201 9-3. . . 239 10-12. . . . . . . . . . . . . . . . 11-7. . . . . . . . . . . . . . . 259 . . . . 233 10-6. 239 10-13. . . . . . .Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure 240 Figure Figure Figure Figure Figure Figure Figure Figure 6-22. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . 173 7-2. . . . .. . . . . . Router Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 9-4.. . . . . . . . . . . . . .screen 2 scrolled right . . . . . .txt file list . . . . . . . . . . . . . . . . . . . . . . . . . . Data preview of the STG_EMPLOYEES target table . . . Sequence Generator Transformation icon . . .. . . . . . . . . . . m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD mapping . . . . . . . . . . . . . . . . . . . . . . . m_DIM_PROMOTIONS_LOAD mapping . . . Mapping copy Target Dependencies dialog box . . .. . . . . . . . . Writers section of Target schema . . . . Normal view of connected ports to the target . . . . . . . . . . . . . . . . . . . . . . . . . . . Debug Session creation dialog box . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . .. . . . 11-1. . . . Task Details of the completed session run . . Find in workspace dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4. . . . . .. . ... 235 10-8. . . . . . . . . . . . . . . . 205 9-9. . . . . . . . . . . . . . . .screen 2 scrolled right . . . . 190 8-6. . . . . . . .. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . Debug Session connections dialog box . . . . . . . . 204 9-7. . . . . . . . . . . . 188 8-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .txt. . Partial mapping flow depicting the flow from the Sorter to the Filter to the Aggregator . . . . . . . . . . . . . . . . . . . . 11-3. . . Expanded view of m-DIM_DATES_LOAD . . . . . . . . . . 202 9-5. .. . Source properties for the employee_list. . . . . . . . . . . Iconic view of the completed self-join mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 . . . . Iconic view of the m_DIM_EMPLOYEES_MAPPING . . . . . . . . . . . . . . . . . . . . . . . . . . . . Aggregator Transformation Icon on Toolbar . . . . . . . . . 175 7-5. . . . . . . . . . Target comparison dialog box . . . . 212 9-15. . . 173 7-3. . . . . . . . . . . . . . . . . . . . . . . 260 . . . . . . . . 259 . . . .. . . . Lookup Condition . . . . . . Debugger Toolbar . . . . 191 9-1. . . . . .. . . . . . Designer while running a Debug Session . . . . . . . . . . . . Sorter Transformation Icon on Toolbar . . . . . . .

Port to Port Association . . 357 16-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Task Details of the completed session run . . . . . . . . . . . . . . . . . Source/Target Statistics . . . . . . . . . . 359 16-6. . . . . . . . . . . . . . . . . Gantt chart view of the completed workflow run . . . . . . . . . . . . . . . . . . . . . . . . Declare Parameters and Variables screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 12-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 13-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Source/Target Statistics for the Session Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 14-3. . . . . . . 267 11-13. . . . . . . . 268 12-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 13-10. . . . . . . . . . . . . . Source table definition . . . . Source/Target Statistics of the completed session run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 18-1. . . . . . . . . . . 388 repoleveD I leveL 8 retneCrewoP acitamrofnI serugiF fo tsiL ivx . . . 338 15-3. . . . . . . . . . . . . . . . . . . . . . Target table definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 12-6. . . . . . . . Lookup Ports tab showing input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flat file error log. . 342 15-4. . . . . . . . . . . . . . 357 16-3. Iconic View of the Completed Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Results for DIM_EMPLOYEES . . . . . . . Timer Task Relative time setting . . . . . . . . . . . 312 13-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Link condition testing if a session run was successful . . . . . . . . . . . . . . . 316 14-1. . . . . . . . . . . . Gantt chart view of the completed workflow run after the weekly load runs . . . Task Details of the completed session run . . . 388 18-4. . . . . . . . . . . . . . . . . . . . . . Workflow variable declaration . . . . . . . . . . . . . . . Task Details tab results for second run . . . . . . . . . . . . . . . . . . . . . . . . Iconic view of the m_FACT_SALES_LOAD_MAPPLET_xx mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . Assignment Task expression declaration . . . . . Port tab view of a dynamic Lookup . . . . . . . . . . . . . . . . . . . . Data preview showing updates to the target table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Results for the Error Flat File (Located on the Machine Hosting the Integration Service Process266 11-12. 342 15-5. . . . . . . . . . 362 16-11. . . . . 361 16-9. . . . . . 315 13-11. . . . . . . . 356 16-2. . . . . . . . . . . . . . . . . . . . Error Log Choice Screen . . . . . . . . Data Preview of the FACT_SALES target table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Link condition testing for a Decision Task condition of TRUE . . . . . . . . . . . . . . . . . . . . . . . . . . . Email Task Properties Tab . . . . . . . . . . . . . . . 330 15-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure 11-8. . . . . 342 16-1. . . . . . . . . . . . . . . . . . . . . Source Analyzer view of the STG_TRANSACTIONS and STG_PAYMENT tables . . . . . . . . . . . . . . Mapplet Designer view of MPLT_AGG_SALES with Input and Output transformations . . . . 288 12-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 12-8. . . . . . . Data preview of the DIM_CUSTOMERS table . . . . 360 16-7. . . . 285 12-2. . . . 265 11-10. . . . . . . . . . . . . Source/Target Statistics for second run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Decision Task Expression . . . . . . . . . . . . . . . . . . Task Details of the completed session run . . . . . . . . . . . . . Completed Workflow . . . . . . . . . . . . . 309 13-2. . . . . . 265 11-9. . . . . . . . . . . . . . . . . . . Mapplet Designer view of mplt_AGG_SALES . . . . . . . . . . . 358 16-5. . 267 11-14. . . . . . . . . . . . . . . . . . Source/Target Statistics of the completed session run . 338 15-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 13-1. . . . . . . . . . . . . . . . . . . . . . . . . . . Value of the $$WORKFLOW_RUNS variable after first run . . . . . . . . . . . . . . . . . Finished Aggregator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 13-9. . . . . . . . . . . . . . . . . . . Aggregator ports with Group By ports checked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Preview of the FACT_PROMOTIONS_AGG_DAILY table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 13-4. . . . . . . Task Details of the completed session run . . . . . . . . . . . output and return ports checked/unchecked . . . . . . . . . . Iconic view of the completed mapping . . . . . . . . . . . . . . . . . . . . . . 386 18-2. . . . . . . . . 287 12-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Email Task Properties . . . . . . . . . 361 16-10. Task Details of the Completed Session Run . . . . . . . . . . . . . . . . . 310 13-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter entry . . . . . . . . . . . . . . . . . . . . Completed Worklet . . . . . . . . . . . . . . . . . . . . . 328 14-2. . . . . . . . . . . . . . . Aggregator to Target Links . . . . . . . . . . . 314 13-8. . . . . . 287 12-4. . . . 387 18-3. . . . 362 16-12. . 313 13-7. . . . . . . . Control Task Properties Tab . . View Workflow Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 11-11. . . . . . . . . . . . 360 16-8. . .

. . . . . . . 390 ii v x r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I serugiF fo tsiL . . . . . . . . . . . . . . . . . . . Gantt chart view of the completed workflow run . . . . . . . . . . . . . . 389 Figure 18-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Figure 18-5. . . . . . . . . . 390 Figure 18-7. . . . . . . Completed Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gantt chart view of the completed workflow run . . . . . . .

repoleveD I leveL 8 retneCrewoP acitamrofnI serugiF fo tsiL ii i v x .

connections and the Velocity methodology. transformations. transform the data. Data integration is a large undertaking with many potential areas of concern. targets. The PowerCenter infrastructure will greatly assist you in your data integration efforts and alleviate much of your risk. This course will prepare the developers for that challenge by teaching you the most commonly used components of the product. load it into a staging area and finally into the data warehouse. You will build a small data warehouse using PowerCenter to extract from source tables and files. workflow tasks. sessions. xix r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ecaferP . The instructor will teach you about mappings.Preface Welcome to the PowerCenter 8 Level I Developer course. workflows. sources.

About This Guide Course Objectives Welcome to the PowerCenter 8 Level I Developer course. After completing this course. el pm ax e s ih t n I e l pm a x E Click Repository > Connect. You can select multiple objects to import by using the Ctrl key. tce n no C e so o hc d na no tt u b r o u n em y r oti so p eR eh t kcilc dlu o hs u oy .ecitcarp tseb yticoleV a ro sesu detseggus s e div o rp hp a rg a r ap gni w oll of ehT .n oi ta m r of ni cif ice ps hti w eca lp e r ts um uo y el bai r av a s et aci d nI italicized text :e to N .st ca f la no iti d da s e div o rp hp a rg a r ap gni w oll of ehT …snaem tI … e e s uo y f I : p iT > xx . The m_ prefix for a mapping name is… . Document Conventions This guide uses the following formatting conventions: repoleveD I leveL 8 retneCrewoP acitamrofnI e ca f er P : et o N : piT . monitor and troubleshoot workflows Design basic mappings and workflows ♦ ♦ Audience This course is designed for data integration and data warehousing implementers. .ES A C RE PP U lla ni n wo hs e r a se m an nm ul oc d na s el ba t es a ba ta D UPPERCASE T_ITEM_SUMMARY Connect to the Repository using the assigned login_id . you should be able to: ♦ Use PowerCenter developer tools to: Create and debug mappings ♦ Create. run. You should be familiar with data integration and data warehousing terminology and in using Microsoft Windows.retne ro epyt ot deen uoy txet setacidnI boldfaced text . Click the Rename button and name the new source definition S_EMPLOYEE .o t e ta giv a n ot un e mb us a s et aci d nI .

market. and pass.com. Visiting the Informatica Knowledge Base As an Informatica customer.informatica. access to the Informatica customer support case management system (ATLAS). Visiting the Informatica Web Site You can access Informatica’s corporate web site at http://www.com. its background.htm r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ecaferP ixx .informatica. The services area of the site includes important information on technical support.com. For more information. 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. and technical tips.informatica. the Informatica Knowledge Base.com The site contains information on how to create. You will also find product information. The site contains product information.informatica. upcoming events.Other Informatica Resources In addition to the student guides. The Knowledge Base lets you search for documented solutions to known technical issues about Informatica products. and support customer-oriented add-on solutions based on interoperability interfaces for Informatica products. It also includes frequently asked questions. You can access the Informatica Developer Network at the following URL: http://devnet. exams provided by Informatica to obtain Informatica Professional Certification.informatica. and access to the Informatica user community. go to: http://www. training and education. Obtaining Informatica Professional Certification You can take. Visiting Informatica Customer Portal As an Informatica customer. technical white papers. newsletters. user group information. as well as literature and partner information. and implementation services. you can access the Informatica Customer Portal site at http:// my.com/services/education_services/certification/default. you can access the Informatica Knowledge Base at http:// my. The site contains information about Informatica. and locating your closest sales office. Visiting the Informatica Developer Network The Informatica Developer Network is a web-based forum for third-party software developers.

You can request a user name and password at http:// my. or you can use our WebSupport Service. support_admin@informatica. da e hn e di aM mahtlaW etihW .com for technical inquiries .com.ytiC doowdeR yaW lanidraC 001 s r e tr a uq d ae H a c i r f A / t s a E e ld d i M / ep o ru E Obtaining Technical Support Providing Feedback WebSupport requires a user name and password. You can call or email your nearest Technical Support Center listed in the following table.repoleveD I leveL 8 retneCrewoP acitamrofnI e ca f er P iixx 8375 2115 08 19+ :aidnI e t aR dr adn a tS 5 44 115 8261 44+ :modgniK detinU 79 7 2 2 0 6 03 1 3+ :sd n al re h te N 20 7 2 0 7 50 8 1 9 4+ :y n am r eG 6 2 2 9 8 3 14 1 3 3+ : ec na rF 20 7 1 8 2 51 23 + :m ui gl eB 7 5 34 2 3 64 00 8 1 0 0 :e r o pa g niS 7534 2364 008 11 00 :ailartsuA e t aR dr adn a tS eerF lloT 00 8 5 5 83 05 6 :s et a tS d e tin U e t aR dr adn a tS 5 3 42 3 6 4 7 78 eerF lloT 75 3 4 23 6 4 0 08 00 eerF lloT ai d nI 5 2 0 06 5 e r ol ag n aB da o R ycn e dis e R 93 1 no di es oP e gi ts e rP 2 0 3 & 10 3 .d tL .d tL e ra w t foS a c it am ro fnI no i ta ropro C a c i tam ro fnI aciremA h tu o S / a c i r e m A h t r o N s et a tS d e tin U 36 0 49 ainrofilaC . ♦ ♦ Use the following email addresses to contact Informatica Technical Support: There are many ways to access Informatica Technical Support.informatica. Email any comments on this guide to education@informatica.daoR mahtlaW kraP mahtlaW 6 .com.com for general customer service requests support@informatica. t vP s noi tu loS ss en isu B a ci t am ro fnI ailartsuA / aisA m od g niK d e tin U NT 3 6 LS e ri hsk r eB .

Unit 1: Data Integration Concepts After completing this unit. you should be able to: ♦ ♦ Describe Informatica corp and its place in the data integration marketplace Define basic data integration terms and concepts Lesson 1-1. 1 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I stpecnoC noitargetnI ataD : 1 tinU . Introducing Informatica Informatica provides data integration tools for both batch and real-time applications.

org repoleveD I leveL 8 retneCrewoP acitamrofnI stpecnoC noitargetnI ataD :1 tinU 2 .Informatica is affiliated with many standards organizations. www. www. www. www.eaiindustry.gridalliance.org.org/cwm Enterprise Grid Alliance.org Object Management Group (OMG).omg. Common Warehouse Metamodel (CWM).omg. including: ♦ ♦ ♦ ♦ Integration Consortium.

♦ ♦ ♦ ♦ ♦ ♦ ♦

Global Grid Forum (GGF). www.gridforum.org XML.org. www.xml.org Web Services Interoperability Organization. www.ws-i.org Supply-Chain Council. www.supply-chain.org Carnegie-Mellon Software Engineering Institute (SEI). www.sei.cmu.edu APICS Educational and Research Foundation. www.apics.org Shared Services and Business Process Outsourcing Association (SBPOA). www.sharedxpertise.org.

Additional resources about Informatica can be found on the following websites:
♦ ♦ ♦

www.informatica.com—provides information on Professional Services and Education Services my.informatica.com—provides access to Technical Support, product documentation, Velocity methodology, knowledge base, and mapping templates devnet.informatica.com—the Informatica Developers Network offers discussion forums, web seminars, and technical papers.

3

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I stpecnoC noitargetnI ataD : 1 tinU

Lesson 1-2. Data Integration
Traditionally, data integration is a batch process—to extract, transform and load (ETL) data from transactional systems to data warehouses.

The ETL process can be imagined as an assembly line.

repoleveD I leveL 8 retneCrewoP acitamrofnI stpecnoC noitargetnI ataD :1 tinU

4

Informatica PowerCenter is deployed for a variety of batch and real-time data integration purposes:
♦ ♦ ♦ ♦ ♦

Data Migration. ERP consolidation, legacy conversion, new application implementation, system consolidation Data Synchronization. application integration, business to business data transfer Data Warehousing. Business intelligence reporting, data marts, data mart consolidation, operational data stores 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

Informatica partners with Composite Software for Enterprise Information Integration (EII): on-the-fly federated views and real-time reporting of information spread across multiple data sources, without moving the data into a centralized repository.

Lesson 1-3. Mappings and Transformations
Mappings

5

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I stpecnoC noitargetnI ataD : 1 tinU

Transformations
Transformations change the data they receive.

PowerCenter includes the following types of transformations:
♦ ♦

Passive: The number of rows entering and exiting the transformation are the same. Active: The number of rows exiting the transformation may not be the same as the number of rows entering the transformation.

repoleveD I leveL 8 retneCrewoP acitamrofnI stpecnoC noitargetnI ataD :1 tinU

6

Commonly used PowerCenter transformations include:
♦ ♦ ♦ ♦ ♦ ♦ ♦

Source Qualifier - reads sources Filter - filters data conditionally Sorter - sorts data Expression - performs logical/mathematical functions on data Aggregator - sums, averages, maximum, minimum Joiner - joins two data flows Lookup - looks up a corresponding value from a table or flat file

7

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I stpecnoC noitargetnI ataD : 1 tinU

Lesson 1-4. Tasks and Workflows
Tasks
A task is an executable set of actions, functions, or commands. A sequence of tasks defines the runtime behavior of a data integration process.

repoleveD I leveL 8 retneCrewoP acitamrofnI stpecnoC noitargetnI ataD :1 tinU

8

Workflows

A workflow is a set of ordered tasks that describe runtime ETL processes. Tasks can be sequenced serially, in parallel and conditionally. Each linked icon represents a task.

9

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I stpecnoC noitargetnI ataD : 1 tinU

repoleveD I leveL 8 retneCrewoP acitamrofnI stpecnoC noitargetnI ataD :1 tinU

01

81

1 tinU

.3 .2 .1

gnippaM LTE

atad daol dna mrofsnart ,tcartxE .f ksaT .6 sksat deredro fo noitcelloc A .e noitamrofsnarT .5 ssecorp LTE eht senifed yllacigoL .d atadateM .4 atad setalupinam ro setareneG .c wolfkroW sessecorp dna atad senifeD .b sdnammoc ro snoitcnuf ,snoitca fo tes elbatucexe nA .a :snoitanalpxe dna smret eht hctaM

Lesson 1-5. Metadata

Metadata, which means “data about data,” is information that describes data. Common contents of metadata include the source or author of a dataset, how the dataset should be accessed, and its limitations.

Unit 1 Quiz

transform and load logic Repository Service—Manages connectivity to the metadata repositories that contain mapping and workflow definitions Repository Service Process—Multi-threaded process that retrieves. Targets—Can be relational tables or heterogeneous files ♦ ♦ ♦ ♦ ♦ ♦ ♦ Integration Service—The engine that performs all of the extract. you should be able to: ♦ Name the main PowerCenter components and describe their user interfaces Lesson 2-1. VSAM files and XML) Note: XML is an advanced topic and is not covered in this course. PowerCenter Architecture The following screenshot shows the PowerCenter Architecture: ♦ Sources—Can be relational tables or heterogeneous files (flat files. execute workflows on the Integration Service. inserts and updates repository metadata Repository—Contains all of the metadata needed to run ETL processes Client Tools—Desktop tools used to populate the repository with metadata.Unit 2: PowerCenter Components and User Interface After completing this unit. monitor the workflows and manage the repository 11 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e c a f r e t n I r e s U d n a s t n e n o p m o C r et n e Cr e w o P : 2 t i n U .

and an output window at the bottom. Each client application has its own interface.Lesson 2-2. Workflow Manager and Workflow Monitor connect to Integration Service. a workspace to the right. The interfaces have toolbars. a navigation window to the left. All tools access the repository through the Repository Service. PowerCenter Client Tools Client tools run on Microsoft Windows. repoleveD I leveL 8 retneCrewoP acitamrofnI e c a f r et n I r e s U d n a s t n e n o p m o C r et n e Cr e w o P : 2 t i n U 21 .

31

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e c a f r e t n I r e s U d n a s t n e n o p m o C r et n e Cr e w o P : 2 t i n U

Designer

Within the Designer, you can display transformations in the following views:
♦ ♦ ♦

Iconized. Shows the transformation in relation to the rest of the mapping. This also minimizes the screen space needed to display a mapping. Normal. Shows the flow of data through the transformation. This view is typically used when copying/linking ports to other objects. Edit. Shows transformation ports and properties; allows editing. This view is used to add, edit, or delete ports and to change any of the transformation attributes or properties.

repoleveD I leveL 8 retneCrewoP acitamrofnI e c a f r et n I r e s U d n a s t n e n o p m o C r et n e Cr e w o P : 2 t i n U

41

51

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e c a f r e t n I r e s U d n a s t n e n o p m o C r et n e Cr e w o P : 2 t i n U

Workflow Manager

In the Workflow Manager, you can display tasks in the following views:
♦ ♦

Iconized (Session task example) Edit (Session task example)

repoleveD I leveL 8 retneCrewoP acitamrofnI e c a f r et n I r e s U d n a s t n e n o p m o C r et n e Cr e w o P : 2 t i n U

61

Unit 2 Lab: Using the Designer and Workflow Manager
Business Purpose
You have been asked to learn how to use Informatica PowerCenter in order to more efficiently accomplish your ETL objectives and automate the development process. Because you have limited or no prior exposure to this software, this exercise will serve to orient you to the basic development interfaces.

Technical Description
PowerCenter includes two development applications: the Designer, which you will use to create mappings, and the Workflow Manager, which you will use to create and start workflows. This exercise is designed to serve as your first hands-on experience with PowerCenter, and supplement the instructor demonstrations. You will import source and target definitions from a shortcut folder into your own folder.

Goals
♦ ♦ ♦ ♦

Learn how to navigate the repository folder structure. Understand the purpose of the tools accessed from the Designer and Workflow Manager. Create and save source and target shortcuts. Learn how to access and edit the database connection objects

Duration
30 minutes

71

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e g a n a M w ol f k r oW d n a r e n g i s e D e h t g n i s U : b a L 2 t i n U

Instructions
Step 1: Launch the Designer and Log Into the Repository
Launch the Designer client application from the desktop icon. If no desktop icon is present, select Start > Programs > Informatica PowerCenter … > Client > PowerCenter Designer. Maximize the Designer window. Notice the Navigator window on the left side, which should resemble Figure 2-1. However, you may see additional or fewer repositories, depending on your classroom environment.
wodniW rotagivaN .1-2 erugiF
:e to N

Step 2: Navigate Folders
Double-click the folder DEV_SHARED. This opens the folder and shows you the subfolders associated with it. Figure 2-2 shows the Navigator:
sredlofbuS dna redloF DERAHS_VED .2-2 erugiF
.1

repoleveD I leveL 8 retneCrewoP acitamrofnI r e g a n a M w o lf k r oW d n a r e n gi s e D e h t g ni s U : b a L 2 t i n U

: p iT

.1 .2 .3

Log into the PC8_DEV repository with the user name studentxx, where xx represents your student number as assigned by the instructor. The password is the same. Passwords are always case-sensitive. The user name to log into the repository is an application-level user name—it allows PowerCenter to admit you to the repository with a specific set of application privileges. It is not a database user name.

81

Notice that the DEV_SHARED folder has a small blue arm holding it. This icon denotes that DEV_SHARED is a shortcut folder. As you will see later in this lab, objects dragged from a shortcut folder into an open folder create shortcuts to the object.
:e to N :e to N :e to N :e to N : p iT : p iT

Technically, all folders are “shared” with all users who have the appropriate folder permissions, regardless whether it has the blue arm or not. 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.

Expand some of the subfolders to see the objects they hold. Note that some subfolders are empty. When a new object, such as a target definition, is created within a folder, it automatically goes into the appropriate subfolder. Notice that within the Sources subfolder, the source objects are organized under individual “nodes” (branches in the hierarchy), such as FlatFile, ODBC_EDW, etc. These are based on the type of source and the name of the Data Source Name that was used to import the source definition (more on this later). Very Important: You will need to click on these source nodes to locate source definitions that may be “hiding” from view. Subfolders are created and managed automatically. Users cannot create, delete, nest, or rename subfolders. Each PowerCenter application, such as the Designer, shows only subfolders related to the objects that can be created and modified by that application. For example, in the Designer you only see subfolders for sources, targets, mappings, etc. Double-click on your individual student folder. For the remainder of the class, you will create and modify objects in this folder. Some pre-made objects have been provided as well. Your student folder is now the “open” folder. Only one folder at a time can be open. The DEV_SHARED folder is now “expanded.” This distinction is important, as you will see later in this lab.

91

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e g a n a M w ol f k r oW d n a r e n g i s e D e h t g n i s U : b a L 2 t i n U

sloo rengiseD .3-2 erugiF T

.2 .3 .1

Step 3: Navigating the Designer Tools
Select the menu option Tools > Source Analyzer. The workspace to the right of the Navigator window changes to an empty space. Note the small toolbar directly to the right of the Navigator window, at the top. These are the five Designer tools. Each tool allows you to create and modify one specific type of object, such as sources. Figure 2-3 shows the Designer tools with the first tool (the Source Analyzer) selected.

With your left mouse button, alternately toggle between the five tools. The name of each tool is displayed in the upper left corner of the workspace when that tool is active. The main menu bar (very top of your screen) changes depending on which tool is active. Because these menus are context-sensitive to which tool is active, you must already be in the appropriate tool to create or modify a specific type of object.

Step 4: Create and Save Shortcuts
Ensure that the Target Designer is active and that your student folder is open. In order to copy/shortcut any object into a folder, the destination folder (the folder you are adding to) must be the open folder. If the destination folder is not open, the copy/shortcut will not work.
.1

To help view which folder is active, choose View > Workbook to view the PowerCenter Client in Workbook view. The PowerCenter Client displays tabs for each folder at the bottom of the Main window:

repoleveD I leveL 8 retneCrewoP acitamrofnI r e g a n a M w o lf k r oW d n a r e n gi s e D e h t g ni s U : b a L 2 t i n U

.w eiv ko o bfk r oW ni s ba t s w oh s tn eil C r et n eC r e w oP

: tn at r op mI

:e to N
♦ ♦ ♦ ♦ ♦

.2 .2

The Source Analyzer tool is used to create or modify source objects. They may be relational, flat file, XML or COBOL sources. The Target Designer tool is used to create or modify target objects. They may be relational, flat file, or XML. It does not matter whether these targets are part of an actual data warehouse. The Transformation Developer tool is used to create or modify reusable transformations. Nonreusable transformations are created directly in a mapping or mapplet. This distinction will be covered later in the class. The Mapplet Designer tool is used to create or modify mapplets. The Mapping Designer tool is used to create or modify mappings.

02

In the DEV_SHARED folder. They can be used but they cannot be modified as shortcuts. In the DEV_SHARED folder.6 . The original object can be modified.9 Drag and drop the STG_PAYMENT target from the Navigator into the Target Designer workspace. ♦ ♦ 12 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e g a n a M w ol f k r oW d n a r e n g i s e D e h t g n i s U : b a L 2 t i n U : p iT . Note that you have added a shortcut of the STG_PAYMENT staging target table to your own folder.4 .7 . “Create a shortcut to the target table STG_PAYMENT?” Click Yes at the confirmation message. Add shortcuts to your folder to the two source definitions listed below. expand the Targets subfolder by clicking on the + sign to the left of the subfolder. Expand the Targets subfolder in your Student folder.3 .8 . expand the Sources subfolder and expand the FlatFile container. PROMOTIONS PAYMENT . Figure 2-4 shows the Navigator window: redlofbus tegraT DERAHS_VED . You will see the confirmation message.5 .4-2 erugiF Open the Source Analyzer tool in your student folder. PowerCenter shortcuts are “pointers” to the original object. and any changes will immediately affect all shortcuts to that object.

Avoid having two or more “instances” of the same PowerCenter application (such as the Workflow Manager) running on a machine at the same time.6-2 erugiF .Confirm that your student folder appears similar to Figure 2-5: stcejbo wen htiw redlof tnedutS .2 . 22 . Maximize the Workflow Manager application.01 .1 Confirm that the Workflow Manager launches and you are automatically logged into the repository the same way as you were in the Designer. The keyboard shortcut Ctrl+S can also be used.11 . There is no benefit in doing this. rablooT noitacilppA . You should periodically save changes to the repository when using the Designer or the Workflow Manager.3 Use the menu option Repository > Save to save these objects in your student folder.5-2 erugiF Step 5: Launch the Workflow Manager Left-click the toolbar icon for the Workflow Manager shown in Figure 2-6. : p iT repoleveD I leveL 8 retneCrewoP acitamrofnI r e g a n a M w o lf k r oW d n a r e n gi s e D e h t g ni s U : b a L 2 t i n U n ot tu B r e ga n aM wo lfk r oW : p iT . This toolbar is usually above the Navigator window. and it can result in confusion when editing objects. There is no “auto-save” feature.

4 . Although a session object is a type of task. you will see the workspace clear itself and a toolbar appear to the right of the Navigator window. alternately toggle between the three tools. as we did in the Designer. except there are three tools instead of five. and Workflows. Just as in the Designer. Note that only subfolders for the objects that can be created with the Workflow Manager are present. With your left mouse button.2 . Likewise. Sessions. This toolbar is visible by default. The Worklet Designer tool is used to create or modify worklets. Note also the context-sensitive menus. :e to N 32 noitisoP tluafeD rablooT ksa . only reusable tasks (except for sessions) will appear in the Tasks subfolder.1 Step 6: Navigating the Workflow Manager Tools Select the menu option Tools > Task Developer. but the default location of is at the top right-hand corner of the screen. We will move the toolbar to a more central location. it gets its own subfolder because you will typically have many more sessions than the other types of tasks. Locate the “vertical stripe” at the far-left hand side of the task bar. Worklets.7-2 erugiF T r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e g a n a M w ol f k r oW d n a r e n g i s e D e h t g n i s U : b a L 2 t i n U . ♦ ♦ ♦ The Task Developer tool is used to create or modify reusable tasks. as shown in Figure 2-7: . The idea is the same as with the Designer. Note that the name of each tool is displayed in the upper left corner of the workspace when that tool is active. Only reusable sessions will appear in the Sessions subfolder. Tasks.1 .Browse through the various folders and subfolders in the Workflow Manager Navigator window as you did in the Designer. The Workflow Designer tool is used to create or modify workflows Step 7: Workflow Manager Task Toolbar The Workflow Manager is equipped with a toolbar that shows an icon for each type of task that can be created.

select the menu option Connections > Relational. database name or server name). PowerCenter allows us to create reusable and sharable database connection objects.2 .8-2 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI r e g a n a M w o lf k r oW d n a r e n gi s e D e h t g ni s U : b a L 2 t i n U . we will create sessions that will read data from database source and target tables. The objects can be associated with multiple sessions to describe either source.1 Step 8: Database Connection Objects Later in the class. target. In order to open a connection to the respective databases. or lookup connections. connection string. In the Workflow Manager. Instead of requiring the user to type this information each time a session is created. PowerCenter needs the database log-in and the designation (i.e. 42 . These objects contain properties describing one database connection.. drag the toolbar toward the left and drop it in a convenient location so that all of the buttons are visible.With your left mouse button. The top of your Workflow Manager should appear similar to Figure 2-8: devoM gnieB retfA rablooT ksaT .

These are the individual student connections to be used to read from and write to your individual staging tables and the enterprise data warehouse (EDW) tables.2 . It’s intuitive to create additional connection objects. Database connection objects are not associated with a specific folder. Note that the connection NATIVE_TRANS will log into the database with the user name sdbu.9-2 erugiF Note that each connection object is organized under a database type.You will see the Relational Connection Browser similar to Figure 2-9. Click OK. You will not have write privileges. :e to N 52 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e g a n a M w ol f k r oW d n a r e n g i s e D e h t g n i s U : b a L 2 t i n U :e to N : p iT Double-click on the NATIVE_TRANS connection object to display its properties. resworB noitcennoC lanoitaleR . will have the user name tdbu07. Experiment if you have extra time. The NATIVE_STG07 connection. The connection object will be shared among the students in the class.3 .4 Double-click on any of the other objects that have your student number. for example. . .

c noitartsinimdA sksat evitartsinimda ecivreS yrotisopeR ecivres dna niamod mrofreP .4 .5 .1 ytiruces yrotisoper mrofreP .a :snoitanalpxe dna smret eht hctaM Unit 2 Quiz .3 .b yrotisopeR snoitcennoc yrotisoper ecivreS noitargetnI fo tnemeganam dezilartneC .7 .f rengiseD enigne gnissecorp LTE .h ssecorP atadatem retneCrewoP ecivreS yrotisopeR sniatnoc taht selbat fo noitcelloC .6 .i stcejbo gnippam etaerC .d elosnoC swolfkrow lortnoc dna rotinoM .2 .e reganaM yrotisopeR swolfkrow trats dna etaerC .g rotinoM wolfkroW atadatem yrotisoper setadpu/stresni reganaM wolfkroW /seveirter taht ssecorp dedaerht-itluM .8 .9 .repoleveD I leveL 8 retneCrewoP acitamrofnI r e g a n a M w o lf k r oW d n a r e n gi s e D e h t g ni s U : b a L 2 t i n U 62 31 2 tinU .

72 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reifilauQ ecruoS : 3 tinU . based on the output connections. Only those fields or columns used in the mapping are selected. Source Qualifier Transformation Source Qualifier Transformation Type Active (may change number of rows) Description A Source Qualifier transformation: ♦ ♦ ♦ ♦ Selects records from flat file and relational table sources. Generates a SQL query for relational sources.Unit 3: Source Qualifier When you have completed this unit. you should be able to: ♦ Describe when and how to use: Source Qualifier transformation ♦ Source Qualifier join Create and run pass-through mappings ♦ ♦ Lesson 3-1. Converts the data from the source’s native datatype to the most compatible PowerCenter transformation datatype. Can perform homogeneous joins between relational tables on the same database.

other types of sources require equivalent transformations (XML Source Qualifier.ks at n ois se s eh t ni dei fic e ps n oit ce n noc eh t gn isu nu r eb lli w LQ S e hT .PRODUCT_ID.el p ma xe roF .n w od po t e ht m o r f .ks a t n oiss es e ht ni d eif ice ps n oi tc en n oc eh t g nis u nu r e b lli w LQS ehT . n ur gni e b en ile pi p eh t o t r oi rp nu r e b l li w ta ht LQS y fic eps o t u oy sw oll A .d e ri uq e r t o n si tn e me ta ts e h t fo noi t r op ”e r e h w “ ehT .2 = strop detros fo rebmun eht fi . etc.retneCrewoP yb detaerc nioj tluafed eht secalper taht nioj a yficeps ot uoy swollA .reifilauQ ec ru o S ts oC _ tc ud o rP _t cu d o rP _q s eh t ni . emi t nu r t a se t ae rc r et n eC r e wo P t ah t y re u q LQ S tl ua fe d e h t ed ir r ev o o t u oy sw oll A Table1.ID ORDER BY PRODUCT.repoleveD I leveL 8 retneCrewoP acitamrofnI r ei f i l a u Q e c r u o S : 3 t i n U 82 .g ol n oiss es eh t o t ne t ti r w li a te d f o t nu om a e h t s ei fic ep S :eb lliw yb redro eht .yreuq LQS detareneg eht ni esualc yb redro na tresni lliw retneCrewoP :e lp m axe r oF .ID = Table2. PRODUCT.ylno seulav tcnitsid tceles ot uoy swollA . The use of a Source Qualifier is a product requirement. It provides an efficient way to filter input fields/columns and to perform homogeneous joins. nu r n e eb s a h en ile pi p e ht re t fa n u r e b lli w t ah t LQ S yfic e ps o t u oy sw oll A no i tp i r c s e D Business Purpose LQ S ts oP LQ S e rP tc ni tsi D tc el eS leveL gnicarT s t ro P d et r oS fo re b mu N re tliF e cr u oS ni oJ d e ni fe D res U y re uQ l qS y t r e po r P The following table describes the Source Qualifier transformation properties: Properties .GROUP_ID.e mi tn u r t a d et a r en e g s i ta h t y r e uq L QS e h t o tni de t re sni eb lli w t ah t es u alc e r e hw a et a e rc o t u oy sw oll A . .d ei fic ep s s t r op f o re b mu n eht no eb lli w yb redro ehT .).

Datatype Conversion Data can be converted from one datatype to another by: ♦ ♦ ♦ ♦ Passing data between ports with different datatypes Passing data from an expression to a port Using transformation functions Using transformation arithmetic operators Numeric datatypes <=> Other numeric datatypes Numeric datatypes <=> String Date/Time <=> Date or String (to convert from string to date the string must be in the default PowerCenter data format MM/DD/YYYY HH24:MI:SS) Supported conversions are: ♦ ♦ ♦ Similarly. 92 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reifilauQ ecruoS : 3 tinU . when writing to a target the Integration Service converts the data to the target’s native datatype. For further information. see the PowerCenter Client Help > Index > port-to-port data conversion.

repoleveD I leveL 8 retneCrewoP acitamrofnI r ei f i l a u Q e c r u o S : 3 t i n U 03 . This methodology includes: ♦ Templates Mapping specification templates ♦ Source to target field matrix Naming conventions ♦ ♦ ♦ ♦ Object type prefixes: m_.com (requires registration). wf_.Lesson 3-2. … Best practices Phase 1: Manage Phase 2: Architect Phase 3: Design Phase 4: Build Phase 5: Test Phase 6: Deploy Phase 7: Operate Velocity covers the entire data integration project life cycles: For more information. exp_. see http://devnet. we will use Informatica's Velocity methodology. s_. agg_. Velocity Methodology In labs.informatica.

Data is moved first to the staging area and from there to the data warehouse and target flat files. The labs can source from flat files and/or a relational database. The labs predominately use the Sales star schema. 13 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reifilauQ ecruoS : 3 tinU .Lab Project The Mersche Motors data model consists of the following star schemas.

Source Tables and Files The source system has the following relational tables: DEALERSHIP PRODUCT PRODUCT_COST The source system has the following flat files: customer_layout dates employees_layout inventory payment promotions sales_transactions Staging Area The staging area has the following tables: STG_CUSTOMERS STG_DATES STG_DEALERSHIP STG_EMPLOYEES STG_INVENTORY STG_PAYMENT STG_PRODUCT STG_PROMOTIONS STG_TRANSACTIONS Data Warehouse The data warehouse has the following tables: DIM_CUSTOMERS DIM_DATES DIM_DEALERSHIP DIM_EMPLOYEES DIM_PAYMENT DIM_PRODUCT DIM_PROMOTIONS FACT_INVENTORY FACT_PRODUCT_AGG_DAILY FACT_PRODUCT_AGG_WEEKLY FACT_PROMOTIONS_AGG_DAILY FACT_SALES repoleveD I leveL 8 retneCrewoP acitamrofnI r ei f i l a u Q e c r u o S : 3 t i n U 23 .

20 Repository Name: PC8_DEV Integration Service: PC_IService The labs use the following architecture and connections: Architecture .10( WDE_EVITAN )02 .20 User Names: student01 .10( GTS_EVITAN SNART_EVITAN s dr o w s s a P s t e gr aT l an o i t a l e R e c ru o S l an o i t a l e R e s u o h e r aW a t a D a e r A gn i g a t S s e l b aT e c r uo S )0 2 .1 0 ub dt u bd s d ro ws sa p h ti w u bds )02 .20 Folders: Student 01 .33 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reifilauQ ecruoS : 3 tinU 02 .10 ( W D E_ C BD O )0 2 .1 0 ub dt 02 .10 ( GT S_ C BD O S N A RT_ C BD O Architecture and Connectivity Native Connections: e s u o h e r aW a t a D a e r A gn i g a t S s e l b aT e c r uo S ODBC Connections: Connectivity Passwords: student01 .

repoleveD I leveL 8 retneCrewoP acitamrofnI r ei f i l a u Q e c r u o S : 3 t i n U 43 .

Goals ♦ ♦ ♦ ♦ ♦ Open the Designer Tools and switch between Workspaces Create a simple pass-through mapping Create a Session task to run the mapping and configure connectivity Create a Workflow to run the Session task Run the Workflow and monitor the results Duration 35 minutes 53 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U .Unit 3 Lab A: Load Payment Staging Table Section 1: Pass-Through Mapping Business Purpose The staging area of the Mersche Motors data warehouse contains a table that assigns payment type descriptions for each payment ID. we will configure PowerCenter to truncate the target table before each load. Technical Description PowerCenter will source from a delimited flat file and insert the data into a database table without performing data transformations. The operational system administrator uses a simple flat file to record and edit these descriptions. In order to avoid duplicate records in subsequent loads. Because these descriptions may change. the table must be synchronized daily with the corresponding data located in the operational system.

tn e my ap e m a N e l iF s e l iF e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications . d e t im i l e D / d e x i F r e t l iF / n o i t c e l e S CSED_EPYT_TNEMYAP . g nip p am hg u o rh t -ss ap elp mi S 5 elbaT elcarO This is a pass-through mapping with no data transformation.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U 63 tegraT X y e K e uq i n U tr e sn I re ti mil ed am m oC o fn I e l iF l a no i t i dd A e lb at elc a rO o t eli f -t al f de ti mil ed .a mm oc .DI_TNEMYAP tl u af e D etacnurt tegraT m e t s y S t eg r aT PROCESSING DESCRIPTION (DETAIL) ec r uo S xx U B DT de ti mil e D d ao L / s wo R HIGH LEVEL PROCESS OVERVIEW TNEMYAP_GTS e tele D e t a dp U r en w O a m e h c S e m a N e lb aT s e lb aT seliF c rS \s elif m p\ : C n o i t a co L e l i F r en w O / a m e h c S sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M 5 eli f t alF xx_epyT_tnemyaP_egatS_m TARGETS tx t.

) P A Y M E N T P a y m e n _t di D e c mi a ( 3l 0. It is displayed here for you reference. In future labs we will be using a shortened version of the matrix. . ) D a t a t y p e E x p r e s s oi n N ul sl V a ul e fi q u al t yi D a t a sI s u e s/ D e f a ul t This is the Velocity Source to Target Field Matrix.73 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U V e l o c i t y S T G _ P A Y M E N T P a y m e n _tt y p e _ d e s c V a r c h a r 2 ( 2 0 ) P A Y M E N T P a y m e n _tt y p e _ d e s c St r ni g ( 1 0 ) S T G _ P A Y M E N T P a y m e n _t di T a r g e t T a bl e T a r g e t C o ul m n D a t a t y p e T a bl e C o ul m n S o u r c e S o u r c e B e s t P r a c t i c e : SOURCE TO TARGET FIELD MATRIX N u m b e r ( 3 0.

Review the target definition.2 . You may have to drag the box wider to see the Length column.8 Log into the PC8_DEV repository with the user name studentxx and password studentxx where xx represents your student number as assigned by the instructor. Confirm that your source definition appears the same as displayed in Figure 3-1. It is unnecessary and potentially confusing to run more than one instance per workstation.Instructions Step 1: Launch the Designer and Review the Source and Target Definitions If necessary. : p iT Step 2: Create a Mapping Open the Mapping Designer by clicking the respective icon in the toolbar.1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U rezylanA ecruoS eht ni deyalpsid noitinifed elif talf tnemyap eht fo weiv lamroN . Open the Target Designer by clicking the respective icon in the toolbar.4 .5 . Open the Source Analyzer selecting the menu option Tools > Source Analyzer. If an instance of the Designer is already running on your workstation. Drag the Shortcut_to_payment source file from the Sources subfolder into the Source Analyzer workspace.1 .7 . 83 . Open your student folder by double-clicking on it. The icon is shown highlighted below: . launch the Designer application by selecting Start > Programs > Informatica PowerCenter … > Client > PowerCenter Designer. do not launch another instance.1-3 erugiF .6 .3 . The icon is shown highlighted below: Click the name of the “Shortcut_to_STG_PAYMENT” target table definition and drag it from the Targets subfolder into the Target Designer workspace.

2 .a .b Perform the following steps in the Navigator window: Expand the Sources subfolder. 93 : ec i tc a r P ts e B y ti co l eV r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U : p iT . Drag-and-drop the Source Qualifier port PAYMENT_TYPE_DESC to the PAYMENT_TYPE_DESC field in the target definition.b . Expand the Targets subfolder. Mapping names should be clear and descriptive so that others can immediately understand the purpose of the mapping. Velocity suggests either the name of the targets being accessed or a meaningful description of the function of the mapping.6 . and drag-and-drop the target Shortcut_to_STG_PAYMENT into the mapping. snoitinifeD tegra dna ecruoS htiw gnippaM . ensure that the tip of your mouse cursor is touching a letter in the name or datatype or any property for the port you are dragging. Drag-and-drop the port PAYMENT_ID from the Source Qualifier to the PAYMENT_ID field in the target definition.Select the menu option Mappings > Create Delete the default mapping name and enter the name m_Stage_Payment_Type_xx. Expand the FlatFile node Drag-and-drop the source Shortcut_to_payment into the mapping.c .7 The m_ as a prefix for a mapping name is specified in the Informatica Velocity Best Practices. . Select the menu option View > Navigator.3 . . When linking ports in a mapping as described above. Right-click in a blank area within the mapping and choose the menu option Arrange All. Your mapping should appear as displayed in Figure 3-2.b .2-3 erugiF T Select the Source Qualifier transformation.4 . xx refers to your student number.a .5 . This will temporarily remove the Navigator window from view in order to increase your mapping screen space. Click OK.a .

a . The wkf_ as a prefix for a Workflow name is specified in the Informatica Velocity Methodology.4 Confirm that your Output Window displays the following message: *******Mapping m_Stage_Payment_Type is VALID ******* mapping m_Stage_Payment_Type inserted.a The s_ as a prefix for a session name is specified in the Informatica Velocity Methodology. Step 3: Create a Workflow and a Session Task Launch the Workflow Manager by clicking on the respective icon in the toolbar.8 .b . Select session from the Select the task type to create drop-box. :e c it ca r P ts e B y ti co l eV :e c it ca r P ts e B y ti co l eV . The icon is shown highlighted below: .2 . : p iT Select the menu option Tasks > Create. The Output Window displays messages about the results of an action taken in the Designer. 04 .Your mapping should appear the same as displayed in Figure 3-3. ----------------------------------------------------- Open the Workflow Designer by clicking the respective icon in the toolbar. Enter the Session name s_m_Stage_Payment_Type_xx (xx refers to your student number). The icon is shown highlighted below: Select the menu option Workflows > Create.b .1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U gnippam detelpmoc eht fo weiv lamroN .3 .9 . The Velocity recommendation for a session name is s_mappingname. Delete the default Workflow name and enter wkf_Load_STG_PAYMENT_xx (xx refers to your student number). . Click OK.3-3 erugiF Type Ctrl+S to save your work to the repository.

d .6 Drag the newly created session to middle of the screen. scroll down until the property Truncate target table option is visible.a 14 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U .txt. Select the Source Qualifier icon SQ_Shortcut_to_payment (in the Session properties navigator window). Double-click on the session task that you just created to open it in edit mode. In the Properties area scroll down and confirm the source file name and location.Click the Create button. Select the m_Stage_Payment_Type_xx mapping and click OK. When the Integration Service process runs on UNIX or Linux.c .d .b .c . It will also place the session where you click in the workspace. select the NATIVE_STGXX connection object.g . Select the check-box. Select the Mapping tab (not the Property tab). using the correct velocity standard name: s_mappingname. Source file directory: $PMSourceFileDir\ Source filename: payment. .f .e . the filename is case sensitive. Setting the load type to bulk will use the target RDBMS bulk loading facility.i .5 . Select the target Shortcut_to_STG_PAYMENT (in the Session properties navigator window). In the Properties area.e . . In the Properties area. confirm that the load type is Bulk. The Mappings list box shows the mappings saved in your folder.ii : p iT : p iT : p iT . Using the Connections list box. Click Done. If you select the session icon from the task toolbar instead of using the Tasks > Create menu option the client tool will name the session for you. where XX represents your student number assigned by the instructor.

Type Ctrl+S to save your work to the repository. This session exists only within the context of the workflow.4-3 erugiF Click OK. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U seitreporP tegraT ksaT noisseS detelpmoC .Your session task information should appear similar to that displayed in Figure 3-4. Click the Link Tasks icon in the Tasks Toolbar shown below. This will establish a link from the Start Task to the Session Task.h .01 . Confirm that your Output Window displays the message: *******Workflow wkf_Load_STG_PAYMENT is INVALID******* Workflow wkf_Load_STG_PAYMENT inserted ------------------------------------------------------ For this section you have created a non-reusable session within the workflow. drag from the Start Task to the s_m_Stage_Payment_Type_xx Session Task and release the mouse.8 . : p iT .7 . Holding down the left mouse button.9 24 .

1 34 rotinoM wolfkroW eht fo weiV ksaT eht ni detcipeD wolfkroW a fo nuR lufsseccuS . . select Start Workflow.11 . Right click on PC_IService and choose Connect.. Right click on your Studentxx folder and choose Open.Your workflow should appear as displayed in Figure 3-5. Confirm that your Output Window displays the message: .b .b . ******* Workflow wkf_Load_STG_PAYMENT is VALID ******* Workflow wkf_Load_STG_PAYMENT updated. the workflow and session will automatically display.2 .3 .a . Step 4: Run the Workflow and Monitor the Results Right-click on a blank area near the Workflow and inside the workspace.6-3 erugiF wolfkroW detelpmoC . If Workflow Monitor is already opened.c . Your information should appear similar to what is displayed in Figure 3-6. To view the details of the session task: Right-click the task name and select “Get run properties” Scroll down through the Task Details window.5 Maximize the Workflow Monitor. However.Workflow wkf_Load_STG_PAYMENT tasks validation completed with no errors. --------------------------------------- r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U .a . Select Task View.d . .. Right click on wkf_Load_STG_PAYMENT_xx and select Open Latest 20 Runs.4 . if the Monitor opens new: Right click on the PC8_DEV repository and choose Connect.5-3 erugiF Type Ctrl+S to save your work to the repository. Log in with your studentxx id and password.e . Note there are two tabs above the Output window: Gantt Chart and Task View.

a .7-3 erugiF Select the Source /Target statistics tab. 44 .b . Note that for the Source and Target objects in the mapping. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U nuR noisseS detelpmoC eht rof scitsitatS tegraT/ecruoS . and Rejected. .8-3 erugiF nuR noisseS detelpmoC eht rof seitreporP . there is a count of the rows in various categories. also an estimated throughput speed. Session log will be displayed. Note that the Workflow and the Session are displayed within a horizontal timeline. Select the Gantt Chart tab. Affected (transformed).6 .The task details should appear in the lower-right. Close the Session Log.7 . as displayed Figure 3-7. Expand the node for the source and target. Review the log and note the variety of information it shows.8 Right-click the Session again and select Get Session Log.c . such as Applied Rows (success).

Right-click on the STG_Payment target definition.5 54 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U . Enter the password tdbuxx and click the Connect button. Select Preview Data.2 .3 . Enter the user name tdbuxx.9-3 erugiF . you can view the data that was loaded into the target. where xx represents your student number as assigned by the instructor.1 . Set the ODBC Data Source drop-box to the ODBC_STG Data Source Name. elbaT tegraT TNEMYAP_GTS eht fo weiverP ataD .Data Results In the Designer.4 . Your data should appear as displayed in Figure 3-9.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U 64 .Lesson 3-3. but they should be indexed for best performance. These columns do not have to be keys on the source database. Source Qualifier Joins A Source Qualifier can join data from multiple relational tables on the same database (homogeneous join) if the tables have a primary key-foreign key relationship defined in the Source Analyzer.

In a case where there is no PK/FK relationship you can specify a User Defined Join. 74 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S t n e m y a P d a o L : A b a L 3 t i n U . By default you get an inner join—use SQL Query override to specify other join types. Since the source tables are from the same database and have a key relationship only a single Source Qualifier transformation is needed.EmployeeID=TableB. Enter the join condition in the Source Qualifier properties e.The join is performed on the source database at runtime (when SQL generated by the Source Qualifier executes). tableA. To update the dimension table.g. which can improve session performance. Joining data in a Source Qualifier allows the Integration Service to read data in multiple tables in a single pass. a join of the PRODUCT and PRODUCT_COST table is required. Example A business sells a high volume of products and updates the Product Dimension table on a regular basis.EmployeeID.

Also. To improve performance. : p iT repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t n e m y a P d a o L : A b a L 3 t i n U 84 . only connect those ports necessary to produce the final output.Note the primary key-foreign key relationship between the PRODUCT_ID field of the PRODUCT table and the PRODUCT_CODE field of the PRODUCT_COST table. the number of rows processed can be reduced by using SQL override and adding a “WHERE” clause or by the use of the “Source Filter” attribute if not all rows are required. the default SQL generated by the Source Qualifier can be customized to improve performance. Performance Considerations For relational sources.

The source database server will perform an inner join on the tables based on a join statement automatically generated by the Source Qualifier. You need to combine the data from both tables into a single staging table that can be used as a source of data for the data warehouse. The join set will be loaded into the staging table. Technical Description PowerCenter will define a homogeneous join between the two Oracle source tables.Unit 3 Lab B: Load Product Staging Table Section 2: Homogeneous Join Business Purpose There are two Oracle tables that together contain vital information about the products sold by Mersche Motors. Goals ♦ ♦ ♦ Import relational source definitions View relationships between relational sources Use a Source Qualifier to define a homogeneous join and view the statement Duration 30 minutes 94 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U .

DI_TCUDORP.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U 05 2 ec ru o S tegraT 1 ec ru o S X y e K e uq i n U tr e sn I xx U BDT r e t l iF / n o i t c e l e S EDOC_TCUDORP.TSOC_TCUDORP .TCUDORP tl u af e D etacnurt tegraT ecn O a e ra g ni g ats eh t o t at a d sd ao l dn a el b at tso c tc ud o r p eh t d na el ba t tc ud o r p e ht s nioj gni p pa m si hT 84 elbaT elcarO d ao L / s wo R m e t s y S t eg r aT HIGH LEVEL PROCESS OVERVIEW T CU DO R P_ GTS e tele D e t a dp U r en w O a m e h c S e m a N e lb aT s e lb aT A/N A/N UB D S UB D S TS OC _T C U DO RP T C U DO RP r en w O / a m e h c S sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M 84 selbaT elcarO xx _tc u do r P_ e ga tS _ m TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .

The product details along with the cost details are loaded into the staging area. PROCESSING DESCRIPTION (DETAIL) .15 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U TS O C_T C U DO RP D I _T NE NO PM OC C SE D _R EI L PP US C SE D _ NOI S IV ID C SE D _P UO RG CS E D_T C U DO RP D I _P UO RG D I_T C U DO RP T SO C_T C U DO R P T SO C_T C U DO R P T SO C_T C U DO R P T C U DO R P T C U DO R P T C U DO R P T C U DO R P T C U DO R P T SO C _TC U DO R P DI _T NE NO P MO C C SE D _ RE IL PP U S CS ED _ NO IS IV I D CSE D _P U OR G C SE D _TC U DO R P DI _P U OR G D I _TC U DO R P T CU DO R P_ GTS T CU DO R P_ GTS T CU DO R P_ GTS T CU DO R P_ GTS T CU DO R P_ GTS T CU DO R P_ GTS T CU DO R P_ GTS T CU DO R P_ GTS l lu N f i eu l aV t lu a f e D noisserpxE n mu l o C e c r uo S e lb aT e c ru o S n mu lo C t e gr aT e l b aT t eg r aT SOURCE TO TARGET FIELD MATRIX This is a simple mapping that joins the PRODUCT table to the PRODUCT_COST to obtain cost information for each product.

Expand the node in the Select tables area. this method of ‘horizontal partitioning’ of a table is usually only justified for security or performance reasons.i . In correct database design. : p iT repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U . These two tables however give you a very good example of using a homogenous join in a mapping. By default. Import the relational tables PRODUCT and PRODUCT_COST. rezylanA ecruoS eht ni deyalpsiD pihsnoitaleR KF/KP a htiw snoitinifeD ecruoS . Your Source Analyzer should appear as displayed in Figure 3-10.vi . Enter the password sdbu and click the Connect button.2 .iv . Right click in the workspace and select Clear All.iii .v : p iT : p iT .01-3 erugiF The arrow connecting the keys PRODUCT_ID and PRODUCT_CODE denotes a relationship stored in the Informatica repository. and expand the TABLES node.Instructions Step 1: Import the Source Definitions Open the Source Analyzer workspace in the Designer. . referential integrity (primary to foreign key) relationships defined on a database are imported when each of the tables in the relationship are imported. The arrow head is on the Primary key end (Parent / Independent / ‘one’ end) of the relationship.a . Chose the menu option Sources > Import from Database Set the ODBC Data Source drop-box to the ODBC_TRANS Data Source Name Enter the user name sdbu.b . 25 . It is not generally a good practice to create two different tables with the same primary key. Separating products and their product_costs doesn't meet either of these criteria.1 Save your work.ii You can select multiple objects for simultaneous import by using the Ctrl key. Tab down into Owner name and confirm that it defaults to the user name entered above.

b . Set the Tools drop-box at the top to Mapping Designer.5 . 35 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U .01 .2 . For further details about how to do this. Create a Source Qualifier transformation by clicking on the appropriate icon in the transformation toolbar and then clicking in the workspace.7 . “Create a Mapping” on page 38. Choose the menu option Tools > Options.i . this option is turned off when it is desired to add several relational Sources to the mapping and create a single Source Qualifier to join them. Add the source definitions PRODUCT and PRODUCT_COST to the mapping. PRODUCT_ID linked to PRODUCT_ID).1 . Chose the menu option Targets > Import from Database. The icon is shown highlighted below: In the Select Sources for Source Qualifier Transformation dialog-box. You may need to display the navigator window by selecting the menu option View > Navigator. If a mapping is visible in the workspace. Uncheck the check-box Create Source Qualifiers when opening Sources. .a . Import the relational target definition STG_PRODUCT.ii : p iT .ii . Add the target definition STG_PRODUCT to the mapping.3 . Link each of the output ports in the Source Qualifier to an input port in the target with the same name (i.1 Save your work.a .6 .2 . Click the rename button and change the name to sq_Product_Product_Cost. Generally.Step 2: Import the Relational Target Definition Open the Target Designer. see Step 2. Double-click the Source Qualifier to enter edit mode.11 . confirm that both sources are selected and click OK..iii . the user name tdbuxx and the password tdbuxx. . Connect using the ODBC Data Source ODBC_STG. Note: Do not link PRODUCT_CODE. close it by choosing the menu option Mappings > Close. Select the Tables tab. Step 3: Create the Mapping Open the Mapping Designer. Right click in the workspace and select Clear All. Create a new mapping named m_Stage_Product_xx.i The check-box described above allows you to specify whether a Source Qualifier transformation will be created automatically every time a Source definition is added to the mapping.9 .4 . where xx represents your student number. Click OK.e.8 .

as it is not required in the target.21-3 erugiF gnippaM detelpmoC eht fo weiV lamroN . Save your mapping and confirm that it is valid. Click OK twice. and that it is an inner join. Also note that the PRODUCT_CODE column is not in the SELECT statement.Link the COST port to the PRODUCT_COST port.41 . Click on the Properties tab. Open the SQL Query Editor by clicking the arrow in the SQL Query property. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U gnippaM tcudorP_egatS_m eht rof LQS detareneG . this is because the column is not linked in the mapping and is not needed.31 .b .c . Note that the PRODUCT_CODE port in the Source Qualifier is intended to be unlinked. 45 . Your SQL Editor should appear as displayed in Figure 3-12.a . Confirm that your mapping appears the same as displayed in Figure 3-11. Note that the join statement can now be previewed.21 . Click the Generate SQL button.11-3 erugiF .51 Edit the Source Qualifier.

If you cancel out of the SQL editor. This is based on the ports and their links in the mapping. Check the property Truncate target table option in the target properties.3 .8 .4 . see Step 3. Edit the Session. If you desire to join two source tables on two columns that are not keys.7 .vi .6 . If a Workflow is visible in the workspace. open the Workflow Designer tool. If you click OK and leave some SQL in the editor window. Step 5: Run the Workflow and Monitor the Results Start the workflow. Save your work.i .5 Link the Start task to the Session task. . In the Properties area. The icon is shown highlighted below: . you've overridden the default query. . It is generally not a good practice to save the generated SQL unless there is a need to override it.iii .1 55 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U .ii : p iT . close it by choosing the menu option Workflows > Close. you may establish a relationship between them by dragging the foreign key to the primary key column in the Source Analyzer.1 Select the mapping m_Stage_Product_xx for the Session. see Step 3. Anytime you wanted to link a new port out of the Source Qualifier you would have to go in and regenerate the SQL. Create a new Workflow named wkf_Stage_Product_xx. then at runtime the session will create what is called the 'default query'.Save your work.2 . For further details about how to do this. “Create a Workflow and a Session Task” on page 40. In the Mapping tab: Set the relational source connection object property to NATIVE_TRANS. For further details about how to do this. Right click in the workspace and select Arrange > Horizontal. Set the relational target connection object property to NATIVE_STGxx where xx is your student number. You may also modify the join statement to make it an outer join. Create a new Session by clicking on the appropriate icon in the task toolbar and then clicking in the workspace.61 . “Create a Workflow and a Session Task” on page 40. : p iT Step 4: Create the Session and Workflow From the Workflow Manager application. confirm that the load type is Bulk. The relationship between PRODUCT_ID and PRODUCT_CODE was used to generate the inner join statement.a .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U nuR noisseS detelpmoC eht rof scitsitatS tegraT/ecruoS .Confirm that your Task Details appear the same as displayed in Figure 3-13.41-3 erugiF elbaT tegraT TCUDORP_GTS eht fo weiverP ataD .3 Using the Preview Data option in the Designer. . 65 . Be sure to login with user tdbuxx.31-3 erugiF Confirm that your Source/Target Statistics appear the same as displayed in Figure 3-14.51-3 erugiF nuR noisseS detelpmoC eht fo seitreporP . confirm that your target data appears the same as displayed in Figure 3-15.2 .

Source Pipelines .75 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U Lesson 3-4.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S t c u d o r P d a o L : B b a L 3 t i n U 85 .

Goals ♦ ♦ Import a fixed-width flat file definition Define two data flows within one mapping Duration 20 minutes 95 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S s n o i t o m o r P d n a p i h s r e l a e D d a o L : C b a L 3 t i n U . Even though two sources and two targets are involved. Technical Description Both loads have a simple pass-through logic as in Lab A so we will combine them into one mapping.Unit 3 Lab C: Load Dealership and Promotions Staging Table Section 3: Two Pipeline Mapping Business Purpose Two Dealership and Promotions staging tables must be loaded. only one Session will be required to run this mapping. one from a relational table and one from a flat-file.

6 elbaT elcarO .e lb at elc a rO n a sd a ol d na e lb at elc a rO n a m o rf s tca r tx e e nil epi p d n oce s e hT .6 elbaT elcarO d ao L / s wo R m e t s y S t e g r aT 13 .DI_PIHSRELAED. sn oi to m o rp e m a N e l iF s e l iF PI HS R EL AE D e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .SNOITOMORP .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S s n oi t o m o r P d n a p i h sr e l a e D d a o L : C b a L 3 ti n U 06 X X SN OIT OMO R P_ GTS P I HS RE LA E D_ GTS y e K e u q in U tresnI etele D x xU B DT etadpU r e nw O a m e h c S e m a N e lb aT s e lb aT dex iF seliF c rS \s elif m p\ : C o fn I e l iF l a no i t i dd A d e t im i l e D / d e x i F n o i t a co L e l i F A/N UB D S r e t l iF / n o i t c e l e S r en w O / a m e h c S DI_OMORP.PIHSRELAED tl u af e D etacnurt tegraT sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M .el b at elc a rO n a ot sd ao l d n a elif t al f a m o rf st ca r tx e e nil e pip e nO .elif talF xx _sn oi to m o rP _ pihs r el a eD _ m TARGETS tx t.s en ile pi p 2 h ti w gn ip p am h gu o r ht -s sa p elp mi S 13 .

PROCESSING DESCRIPTION (DETAIL) 2 ec ru o S 1 ec ru o S HIGH LEVEL PROCESS OVERVIEW .16 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S s n o i t o m o r P d n a p i h s r e l a e D d a o L : C b a L 3 t i n U T N UO C SI D T SO C _OM O RP ETAD_YRIPXE ETAD_TRATS EP YT _OM O RP C SE D _OM O RP D I _OM O RP YRTNUOC_PIHSRELAED NO IGE R _P I HS R EL AE D ETATS_PIHSRELAED NOITACOL_PIHSRELAED CSE D _P I HS R EL AE D D I_ R EGA N AM _P I HS R EL AE D DI _P I HS R EL AE D S NO ITOM O RP S NO ITOM O RP S NO ITOM O RP S NO ITOM O RP S NO ITOM O RP S NO ITOM O RP S NO ITOM O RP P I HS R EL AE D P I HS R EL AE D P I HS R EL AE D P I HS R EL AE D P I HS R EL AE D P I HS R EL AE D P I HS R EL AE D T N UO CS I D TS O C_ OMO R P ETAD_YRIPXE ETAD_TRATS EP YT_ OMO R P CS E D_ OMO R P D I_ OMO R P YRT N UO C _P I HS RE LA E D NOI GE R _P I HS RE LA E D ETATS_PIHSRELAED NOITACOL_PIHSRELAED C SE D _P I HS RE LA E D DI _ RE GA NA M _P I HS RE LA E D D I _P I HS RE LA E D SN OIT OMO R P_ GTS SN OIT OMO R P_ GTS SN OIT OMO R P_ GTS SN OIT OMO R P_ GTS SN OIT OMO R P_ GTS SN OIT OMO R P_ GTS SN OIT OMO R P_ GTS P I HS RE LA E D_ GTS P I HS RE LA E D_ GTS P I HS RE LA E D_ GTS P I HS RE LA E D_ GTS P I HS RE LA E D_ GTS P I HS RE LA E D_ GTS P I HS RE LA E D_ GTS lluN fi e u l aV t l u a f e D no i s s e rp x E nm u lo C e c r uo S e l b aT e c r uo S n m u lo C t e g r aT e l b aT t eg r aT 2 te g r aT 1 te g r aT SOURCE TO TARGET FIELD MATRIX This is a pass-through mapping with no data transformation.

Add the Dealership and Promotions source definitions to the mapping. Confirm that a Source Qualifier was created for each. “Create the Mapping” on page 53.a .c . Click the Advanced button in the lower right of the edit box.Instructions Step 1: Import the Source Definitions Import the relational source definition DEALERSHIP. . see Step 1.d . Right-click in a blank area within the mapping and choose the menu option Arrange All Iconic. “Import the Relational Target Definition” on page 53. (DO NOT use a shortcut. Make sure that the number of bytes to skip between records is set to 2. for UNIX/Linux set the value to 1.2 . If you don't your result set will be offset by 1 or 2 bytes. . Step 2: Import the Target Definitions Import the relational target definitions STG_DEALERSHIP and STG_PROMOTIONS For further details about how to do this.a repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S s n oi t o m o r P d n a p i h sr e l a e D d a o L : C b a L 3 ti n U rezylanA ecruoS eht ni deyalpsid noitinifed elif talf snoitomorp eht fo weiv lamroN . 26 . :e to N . see Step 3. Make sure that the option to Create Source Qualifiers when Opening Sources is checked (on). Link the appropriate Source Qualifier ports to the target ports.e A fixed width flat file will have bytes at the end of each row that depict a line feed and a carriage return.61-3 erugiF Save the mapping and confirm that it is valid. see Step 2.txt file in the source analyzer. Edit the source definition for the promotions. Depending on the system that the file was created on you will need to skip the appropriate number of bytes. For files created on a mainframe set the value to 0. for all others set the value to 2.1 .b . “Import the Source Definitions” on page 52.3 Confirm that your promotions source definition appears the same as displayed in Figure 3-16. Step 3: Create the Mapping Create a mapping named m_Dealership_Promotions_xx.) For further details about how to do this. Add the STG_DEALERSHIP and STG_PROMOTIONS target definitions to the mapping.2 .1 . For further details about how to do this.b .

For further details about how to do this.b . Confirm that your Task Details appear the same as displayed in Figure 3-18.1 36 nuR noisseS detelpmoC eht fo seitreporP . Check the property Truncate target table option in the target properties.3 .a . Create a Session Task named s_m_Dealership_Promotions_xx that uses the mapping m_Dealership_Promotions_xx.c . For further details about how to do this. see “Create a Workflow and a Session Task” on page 40 and “Create the Session and Workflow” on page 55.81-3 erugiF gnippaM detelpmoC eht fo weiV cinocI . Step 4: Create and Run the Workflow Create a workflow named wkf_Load_Stage_Dealership_Promotions_xx.2 . Edit the Session. save it. . see “Create a Workflow and a Session Task” on page 40. Note that both of the relational target database connections need to be set separately. Confirm that the source location information for the Promotions flat file is set correctly. Set the database connection objects for the sources and targets in the Session.Confirm that your mapping appears as displayed in Figure 3-17. and run it. .71-3 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S s n o i t o m o r P d n a p i h s r e l a e D d a o L : C b a L 3 t i n U .4 Complete the Workflow.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S s n oi t o m o r P d n a p i h sr e l a e D d a o L : C b a L 3 ti n U 46 elbaT tegraT PIHSRELAED_GTS eht fo weiverP ataD . It should appear the same as Figure 3-20 and Figure 3-21: nuR noisseS detelpmoC eht rof scitsitatS tegraT/ecruoS . .91-3 erugiF Confirm that your Source/Target Statistics appear the same as displayed in Figure 3-19.5 Preview the target data with user tdbuxx.02-3 erugiF .

56 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S s n o i t o m o r P d n a p i h s r e l a e D d a o L : C b a L 3 t i n U elba tegra SNOITOMORP_GTS eht fo weiverP ataD .12-3 erugiF T T .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S s n oi t o m o r P d n a p i h sr e l a e D d a o L : C b a L 3 ti n U 66 .

etc. n o i s s e r p x E : 4 t i n U . s t s i L e l i F . Filter. you should be able to: ♦ Describe these features: Expression transformation ♦ Filter transformation ♦ File list ♦ Workflow scheduler Use these features in a mapping or workflow ♦ ♦ Lesson 4-1. Expression Transformation Type Passive (does not change the number of rows). truncate. to date.r e tl i F . It cannot perform aggregation across multiple rows (use the Aggregator transformation). File Lists.) Datatype conversion (to char. Description The Expression transformation lets you modify individual ports of a single row (or columns within a single row).Unit 4: Expression. Business Purpose You can modify ports using logical and arithmetic operators or built-in functions for: ♦ ♦ Character manipulation (concatenate. It also lets you add and suppress ports. and Workflow Scheduler When you have completed this unit. etc.) 76 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e l u d e h c S w o l f k r oW d n a .

) Data manipulation (round.) Special (lookup. or convert strings to numbers.) Test (for spaces. etc. concatenate first and last names. etc. Expressions can include numeric and logical operators. etc. cosine. etc. Variables tab for mapping and system variables. Variables. number. repoleveD I leveL 8 retneCrewoP acitamrofnI r el u d e h c S w o l f k r oW d n a . etc. Ports tab for port values. you might need to adjust employee salaries. etc.) For example. n oi s s e r p x E : 4 t i n U 86 .r et l i F . modulus. truncate. The Expression Editor provides: ♦ ♦ ♦ ♦ Numeric and arithmetic/logical operator keypads. ports.♦ ♦ ♦ ♦ ♦ ♦ Data cleansing (check nulls. decode. power. functions. and Validation The Expression Editor Interface (shown below) helps the developer to construct an expression. Expression Editor Interface.) Numerical calculations (exponential. replace string. s t s i L e l i F . You can use the Expression transformation to perform any non-aggregate calculations. You can also use the Expression transformation to test conditional statements before you output the results to target tables or other transformations. variables. Functions tab for built-in functions. log.) Scientific calculations (sine.

5. Highlighting a function and pressing F1 will launch the online help and open it at the highlighted function section. s t s i L e l i F . n o i s s e r p x E : 4 t i n U .r e tl i F .Expressions resolve to a single value of a specific datatype. The function LENGTH calculates the length of the string including all blank spaces as 11 bytes. the expression LENGTH (“HELLO WORLD”) / 2 returns a value of 5. : p iT 96 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e l u d e h c S w o l f k r oW d n a . For example.

Variables and Scope A transformation variable is created by creating a port and selecting the V check box. n oi s s e r p x E : 4 t i n U 07 . This indicates that a variable port is neither an input nor an output port. When V is checked.r et l i F . the I and O check boxes are grayed out. s t s i L e l i F . repoleveD I leveL 8 retneCrewoP acitamrofnI r el u d e h c S w o l f k r oW d n a .

They would also like a count of how many changes have been made. as well as the auditors are very concerned about this issue. Invalid Numbers: The Sales Department is concerned that occasionally they see non-numeric data in a report that covers sales discounts where they expect to see numeric data. They want every record with a bad date tagged and reported on. The AR departments. The variable persists across the entire set of records that traverse the transformation. still others are in mixed case. The result must be compatible with the datatype selected for the port otherwise an error is generated. Invalid Dates: Due to applications issues. They will like to tag each record as an error and be able to report and investigate the data where critical fields are missing data. Clean and Record Errors Suppose that we want to: ♦ Clean Up Item Name: The Accounts Receivable department is tired of generating reports with an inconsistent set of Items Names. Some are in UPPERCASE while others are in lower case. occasionally dates are not valid.r e tl i F . It may be used or modified anywhere in the set of data that is being processed. the expression is evaluated and the result assigned to the variable port. Missing Data: The Systems and Application group is concerned that occasionally some incomplete data is sent to end users. s t s i L e l i F . Example 1 Check.When a record is processed. Find all errors and tag the records. They would like to see all of the data in a Title case mode. ♦ ♦ ♦ 17 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e l u d e h c S w o l f k r oW d n a . n o i s s e r p x E : 4 t i n U .

TO_DATE (INVENTORY_DT. 0 = h tg n eL f I . Discount Tracking: Sales Management would like to compare the amount of the suggested sell price to the actual sell price to determine the level of discounting. 'MM/DD/ YYYY'). noisserpxE no i s s er p x E Multiple identical conversions of the same data should be avoided. dil av si re b mu n e ht si e ni m re t ed dna tupni eht kcehc lliw noitcnuf ETAD_SI ehT ."MM/DD/ YYYY") ISNULL (port_name) OR LENGTH (port_name) = 0 OR IS_SPACES(port_name) INITCAP(ITEM_NAME) .e r e H . RE BM U N _S I ETAD_SI SECAPS_SI HT G NE L L L U NS I P A CTI N I d e s U s no i t c nu F 4 3 2 1 QER ♦ ♦ Suppose we want to calculate: Calculate Sales Discounting and Inventory Days Example 2 The mapping could use the following functions and expressions: Days in Inventory: The Sales and Marketing departments would like to be able to determine how long an item was in inventory.1415") IS_DATE ("03/01/2005". ti ni s eca ps sah taht gnirts a rof kool lliw SECAPS_SI eli h w L L UN a r of kc e hc lli w L LU N SI . .es ac elt it ni t xe t eh t e cal p lli w no itc n uf PA CT IN I ehT setoN Performance Considerations FFID_ETAD ETAD_OT ci t em ht i rA d e s U sn o i t c n uF 2 1 QER The mapping could use the following functions and expressions. They would like a field developed that calculates sales discount.ytpme si g ni rts eh t n eh t . 'MM/DD/YYYY'). They plan to do this via a report. s t s i L e l i F . DATE_DIFF ( TO_DATE (SOLD_DT. noi ss er px e cit e mh ti r A na si si hT s etoN .dilaV si etad eht fi enimreted dna tupni eht kcehc lliw noitcnuf ETAD_SI ehT .ACTUAL ) / MSRP ) * 100 IS_NUMBER ("3.repoleveD I leveL 8 retneCrewoP acitamrofnI r el u d e h c S w o l f k r oW d n a . n oi s s e r p x E : 4 t i n U 27 Ports that do not need modification should bypass the Expression transformation to save buffers. 'DD' ) ( ( MSRP .' D D' si t am r of eh t esuaceb syad ni denruter si ecnereffid e ht .r et l i F . dn a re p o t am r of eh t ni de ific e ps stinu eht ni setad owt neewteb ecnereffid eht etaluclac lliw noitcnuf FFID_ETAD eh t d na et a D l a n re t nI a cit a mr o fn I na otni gnirts a trevnoc lliw ETAD_OT .

37 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e l u d e h c S w o l f k r oW d n a . Filter Transformation Type Active. Business Purpose A business may chose not to process records which do not meet a data quality criterion. Description The Filter transformation allows rows which meet the filter condition to pass through the transformation. An Update Strategy tags the records for update which pass the filter condition. However. The following example uses a Lookup to verify the customer exits and a filter to skip records which do not have an exiting customer (MSTR_CUST_ID) id. n o i s s e r p x E : 4 t i n U .r e tl i F . only existing customer records are to be updated. such as containing a null value in a field which may cause a target constraint violation or eliminate from the process date field values which will not provide useful data.Lesson 4-2. Example 1 Existing customer dimension records need to be updated to reflect changes to columns like address. s t s i L e l i F . Rows which do not meet the filter condition are skipped.

n oi s s e r p x E : 4 t i n U 47 . decrease throughput and decrease run-time.r et l i F . that decreases the number of rows (the Normalizer and the Router can increase the number of rows). s t s i L e l i F . should be placed as early as possible in the mapping to decrease total rows throughput and improve performance.Performance Considerations Filter records which do not meet the selection criterion as early as possible in a mapping to reduce the number of rows processed. repoleveD I leveL 8 retneCrewoP acitamrofnI r el u d e h c S w o l f k r oW d n a . In fact any active transformation.

All of the files must exist. ♦ ♦ ♦ ♦ The session processes each file in turn.r e tl i F . Variables and wild cards are not allowed.txt f:\data\canada_trans. you can set the source instance to point to a file list (list of flat files or XML files). n o i s s e r p x E : 4 t i n U .txt e:\data\midwest_trans.Lesson 4-3. File Lists In a Session task. d:\data\eastern_trans.txt Sample file list: 57 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e l u d e h c S w o l f k r oW d n a . s t s i L e l i F . The properties of all files must match the source definition.

repoleveD I leveL 8 retneCrewoP acitamrofnI r el u d e h c S w o l f k r oW d n a . n oi s s e r p x E : 4 t i n U 67 Lesson 4-4. Workflow Scheduler Run Options Workflows can be scheduled to run at regular intervals. s t s i L e l i F . .r et l i F .

♦ ♦ ♦ Run on Integration Service Initialization—will run the workflow each time the integration service initializes and then schedules it based on the other options. When the workflow finishes it will start again from the beginning. Run on demand—runs the workflow only when asked to. Run continuously—runs the workflow in a continuous mode. n o i s s e r p x E : 4 t i n U . 77 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I r e l u d e h c S w o l f k r oW d n a . s t s i L e l i F .r e tl i F .

s t s i L e l i F .r et l i F . n oi s s e r p x E : 4 t i n U 87 .repoleveD I leveL 8 retneCrewoP acitamrofnI r el u d e h c S w o l f k r oW d n a .

The mapping that will do this will run on a nightly schedule at midnight. The text files are identical. This file list contains the names of three delimited flat files from the regional sales offices. Technical Description PowerCenter will source from a file list. concatenation and decodes.Unit 4 Lab: Load the Customer Staging Table Business Purpose The staging area for Mersche Motors data warehouse has a customer contacts table. Mersche Motors receives new data from their regional sales offices daily in the form of three text files. Goals ♦ ♦ ♦ ♦ ♦ Create a Filter transformation to eliminate unwanted rows from a flat file source Create an Expression transformation to reformat incoming rows before they are written to a target Use the DECODE function as a small lookup to replace values for incoming data before writing to target Create a session task that will accept a file list as a source Create a workflow that can run on a schedule Duration 60 Minutes 97 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U . All rows with a customer number of 99999 will need to be filtered out. The target will be truncated until the mapping is fully tested. this will include substrings. There are a number of columns that will need to have the data reformatted. For processing simplicity. Mersche Motors will be making use of the PowerCenter ability to read a list of files from a single source.

t sa e _r e mo ts uc ( ts il eli f t alF 77 1 6 elbaT elcarO d ao L / s wo R m e t s y S t e gr aT HIGH LEVEL PROCESS OVERVIEW SREMOTSUC_GTS e tele D e t a dp U r en w O a m e h c S e m a N e lb aT s e lb aT s eliFc r S\s eli f mp \: C txt .ts il_ r e mo ts uc d e ma n tsil eli f a g nis u n ois ses eh t o tni da e r e b lli w sel if t al f d eti mil e d am m oc 3 e se hT AN d e timi le D o f n I e l i F l an o i t id d A d e t i m i l e D /d e x iF . th gi nd im t a t h gin y r ev e nu r del u de hc S . tu oy al _ re m ots uc ni n oiti ni fe D s eliFc r S\s eli f mp \: C t xt .l a r tn ec _ re m ots uc no i t a c oL e l iF sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M 48 1 6 s eli f t alF xx _st ca tn o C _r e mo ts u C_ e ga tS _ m TARGETS e m a N e l iF s e l iF SOURCES Velocity Deliverable: Mapping Specifications . tsil _ re m ots uc tx t.t u oy al_ r e mo ts uc ni d nu o f eb na c s eli f t alf eh t f o tu oy al e hT .e lb at te g ra t e ht ot ni d e da ol e r a ye h t e ro f eb d e tt a m ro fe r dn a d e re tli f e b o t d ee n t a ht s elif de ti mil ed a m mo c ) tx t.t se w _ re m ots uc .l a rt n ec _ re mo ts uc . txt . tx t. tx t. tsa e _ re m ots uc .t xt .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U 08 tegraT noi ss er px E r etl iF ec r u oS X y e K e uq i n U tr e sn I xx U B DT tsil eliF t xt . ts e w_ r em o ts uc .t xt .

n y o ht e r v a ul e s w li r e s ol v e ot U' N K' . a n d G R E A T E R ht a n 6 0. c h a r a c et r c o ul m n ht at c o n at ni s e hti e r M' (' m a el ) o r F'' ht e G E N D E R c o ul m n T. c o n s di e r e d c u s ot m e r ni q ui r ei s a n d n o pt a r oft ht e c u s ot m e r _ al y o ut C U S T O M E R _ N O A n y c u s ot m e r n u m b e r s ht a at r e e q u al ot 9 9 9 9 9 a r e This mapping will reformat the customer names. 0 ot 6 0 d e c o d ni g o Af G E c o ul m n T. el s s ht a n 2 0 2. c o ul m n si ni ht e of r m a ot 9f 9 9 9 9 9 9 9 9 9 a n d n e e d s ot P H O N E _ N U M B E R c o ul m n T. 0 ot 4 9 5. gender and telephone number columns.t S T G _ C U S T O M E R C U S T _ N A M E S T G _ C U S T O M E R C U S T _ DI T a r g e t T a bl e T a r g e t C o ul m n S o u r c e T a bl e S o u r c e C o ul m n E x p r e s s oi n SOURCE TO TARGET FIELD MATRIX PROCESSING DESCRIPTION (DETAIL) c u s ot m e r _ al y o ut A G E c u s ot m e r _ al y o ut R H P O N E _ N U M B E b e r e of r m a ett d ot ( 9 9 9 ) 9 9 9 9 9 9 9. 0 ot 3 9 4. h e G E N D E R c o ul m n si a 1 T h e C U S T _ G E N D E R si d e r vi e d r of m ht e d e c o d ni g of fi N ul l D e f a ul t V a ul e . h e P H O N E _ N U M B E R T h e C U S T _ P H O N E si a r e of r m a oft ht e c u s ot m e r _ al y o ut S T A T E c u s ot m e r _ al y o ut C TI Y c u s ot m e r _ al y o ut F RI S T N A M E T h e C U S T _ N A M E c o ul m n si a c o n c a et n a oti n of ht e s a el s rt a n s a c oti n s. h e v a dli a g e g r o u p s a r e T h e C U S T _ A G E _ G R O U P si d e r vi e d r of m ht e ( ef m a el ) A. Customer inquiries are captured using customer_no 99999.18 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U S T G _ C U S T O M E R C U S T _ A G E S T G _ C U S T O M E R C U S T _ E _ M A LI c u s ot m e r _ al y o ut E M AI L S T G _ C U S T O M E R C U S T _ NI C O M E c u s ot m e r _ al y o ut NI C O M E S T G _ C U S T O M E R C U S T _ A G E _ G R O U P c u s ot m e r _ al y o ut A G E S T G _ C U S T O M E R C U S T _ G E N D E R c u s ot m e r _ al y o ut G E N D E R S T G _ C U S T O M E R C U S T _ P H O N E S T G _ C U S T O M E R C U S T _ C O U N T R Y c u s ot m e r _ al y o ut C O U N T R Y S T G _ C U S T O M E R C U S T _ Z PI _ C O D E c u s ot m e r _ al y o ut Z PI S T G _ C U S T O M E R C U S T _ S T A T E S T G _ C U S T O M E R C U S T _ C TI Y S T G _ C U S T O M E R C U S T _ A D D R E S S c u s ot m e r _ al y o ut A D D R E S S L A S T N A M E rf si nt a m e a n d al s nt a m e p o r s. The mapping will filter out the customer inquiries. 0 ot 2 9 3.

2 .6 .1 Import field names from first line.1-4 erugiF Save your work to the repository. If the file is located in a different directory. Comma delimited flat file. where xx represents your student number as assigned by the instructor. Open your student folder. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U noitinifeD eliF talF tuoyal_remotsuc eht fo weiV rezylanA ecruoS . All the files that make up the file list must have same identical layout in order for the file list to be successfully processed by Power Center. Step 2: Create a Relational Target Definition Import the STG_CUSTOMERS table found in your tdbuxx schema.Instructions Step 1: Create a Flat File Source Definition Launch the Designer client tool.4 . Only one flat file definition is required when using a file list as a source in Power Center. Import the customer_layout. your instructor will specify. 28 . This file is located in the c:\pmfiles\SrcFiles directory. : p iT Confirm that your source definition appears as displayed in Figure 4-1. Text Qualifier is Double quotes. Ensure that the following parameters are selected: ♦ ♦ ♦ ♦ .5 .3 . Log into the PC8_DEV repository with the user name studentxx.1 . Format of the Date field is Datetime.txt flat file definition.

2-4 erugiF T Step 4: Create a Filter Transformation Select the Filter transformation tool button located on the Transformation tool bar and place it in the workshops between the Source Qualifier and the Target.1 38 snoitinifeD tegra dna ecruoS htiw gnippaM .1 . .2 .2 . noitinifeD lanoitaleR elbaT SREMOTSUC_GTS eht fo weiV rengiseD tegra . Add customer_layout flat file source to the mapping Add STG_CUSTOMERS target to the mapping.Confirm that your target definition appears the same as displayed in Figure 4-2. The icon is shown highlighted below: .3-4 erugiF T r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U . Your mapping will appear similar to Figure 4-3.3 Step 3: Create a Mapping Create a new mapping named m_Stage_Customer_Contacts_xx.

b . 48 . repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U noitamrofsnarT retliF deddA ylweN htiw gnippaM .Your mapping will appear similar to Figure 4-4. Select the Properties tab.2 CUSTOMER_NO FIRSTNAME LASTNAME ADDRESS CITY STATE ZIP COUNTRY PHONE_NUMBER GENDER INCOME EMAIL AGE Rename it to fil_Customer_No_99999. Edit the Filter transformation.a .4-4 erugiF Link the following ports from the Source Qualifier to the Filter: ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ .3 .

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U .1 58 noitamrofsnarT retliF eht fo baT seitreporP detelpmoC .5 . The Properties will appear as displayed in Figure 4-6.5-4 erugiF Click the dropdown arrow for the Filter Condition Transformation Attribute to activate the Expression Editor. Remove the TRUE condition from the Expression Editor.4 .Your display will appear similar to Figure 4-5.8 Click OK to return to the normal view of the mapping object.6 . Step 5: Create an Expression Transformation Create an Expression transformation directly after the Filter transformation. then click OK to return to the Properties of the Filter transformation.7 . The icon is shown highlighted below: . Select the Expression transformation tool button located on the Transformation tool bar and place it in the workspace directly after the Filter. . Enter in the following the expression: CUSTOMER_NO != 99999 OR ISNULL(CUSTOMER_NO) Validate your work.6-4 erugiF noitamrofsnarT retliF eht fo baT seitreporP .

Port Name = OUT_CUST_NAME Dataytype = String Precision = 41 Expression = IN_FIRSTNAME ||' ' ||IN_LASTNAME Prefixing input only ports with IN_ and output ports with OUT_ is a Velocity best practice.7-4 erugiF Create a new output port after the OUT_CUST_NAME port. Create a new output port after the AGE port by positioning the cursor on the AGE port and clicking the add icon.a .4 FIRSTNAME LASTNAME PHONE_NUMBER GENDER AGE Your mapping will appear similar to Figure 4-7.d .2 . Change the port type to input for all of the ports except AGE. Rename it exp_Format_Name_Gender_Phone. (AGE should remain an input/ output port. Use || to achieve concatenation. ♦ :e c it ca r P ts e B y ti co l eV : p iT . Edit the Expression transformation object. This new port will concatenate the FIRSTNAME and LASTNAME ports into a single string. The CONCAT function is only available for backwards compatibility. This makes it easier to tell what the ports are without having to go into the transformation. Do not use the CONCAT function to concatenate in expressions.b .3 .) Prefix each of these input only ports with IN_. ♦ ♦ ♦ ♦ Port Name = OUT_CUST_PHONE 68 .Select the following ports from the Filter transformation and pass them to Expression transformation: ♦ ♦ ♦ ♦ ♦ repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U noitamrofsnarT noisserpxE eht ot dekniL noitamrofsnarT retliF .c .

FEMALE if GENDER equals F.4.1. 'UNK') The DECODE function used in the previous expression can be used to replace nested IIF functions or small static lookup tables. ♦ ♦ ♦ ♦ 78 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U : p iT : p iT . 'MALE'.5 Port Name = OUT_GENDER Datatype = String Precision = 6 Expression = DECODE(IN_GENDER.4) The expression above uses a technique known as nesting functions. 'F'. The DECODE expression in the previous step will return the value MALE if incoming port GENDER is equal to M.♦ ♦ ♦ Datatype = String Precision = 14 Expression = '(' || SUBSTR(TO_CHAR(IN_PHONE_NUMBER).3) || ') ' || SUBSTR(TO_CHAR(IN_PHONE_NUMBER).3) ||'-' || SUBSTR(TO_CHAR(IN_PHONE_NUMBER). Create new output port after the OUT_CUST_PHONE port. 'M'.7. . The TO_CHAR function is performed first. 'FEMALE'. TO_CHAR function is nested inside the SUBSTR function. or UNK if GENDER equals anything else beside F or M. The SUBSTR function is then performed against the return value from TO_CHAR.

7 .8 Port Name = OUT_AGE_GROUP Datatype = String Precision = 20 Expression = Write an expression using the DECODE function that will assign the appropriate age group label to each customer based on their age. ♦ ♦ ♦ ♦ Save your work. Connect the following ports from the Expression transformation to the target table: AGE OUT_CUST_NAME OUT_CUST_PHONE OUT_GENDER OUT_AGE_GROUP CUST_AGE CUST_NAME CUST_PHONE_NMBR CUST_GENDER CUST_AGE_GROUP repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U 06 NAHT RETAERG t x eT p uo r G e g A 02 NA HT S SE L 92 OT 02 93 OT 03 94 OT 04 06 OT 05 noisserpxE elpmaS . refer to the reference section at the end of the lab for the solution. The format of the DECODE statement follows the table. Use the online help to see details about the DECODE.Create a new output port after the OUT_GENDER PORT. 88 . If after 5 minutes you have not successfully created the DECODE statement. The valid age ranges and age groups are displayed in the table below.8-4 erugiF 92 =< D NA 0 2 => E GA 93 =< D NA 0 3 => E GA 94 =< D NA 0 4 => E GA 06 =< D NA 0 5 => E GA eg n a R e g A 06 > E GA 0 2<E GA .6 .

Connect the following ports from the Filter transformation to the target table: CUSTOMER_NO ADDRESS CITY STATE ZIP COUNTRY INCOME EMAIL CUST_ID CUST_ADDRESS CUST_CITY CUST_STATE CUST_ZIP_CODE CUST_COUNTRY CUST_INCOME CUST_E_MAIL Step 6: Create and Run the Workflow Launch the Workflow Manager and sign into your assigned folder. .01 .3 . .1 98 gnippaM detelpmoC eht fo weiV cinocI . Open the Workflow Designer tool and create a new workflow named wkf_Stage_Customer_Contacts_xx. Edit the s_m_Stage_Customer_Contacts_xx session. and click OK.6 Save your work. Verify that your mapping is valid.5 .11 . Link the Start object to the s_m_Stage_Customer_Contacts_xx session task. Create a Session task using the session task tool button.2 .21 . Right click in the workspace and select Arrange All Iconic.4 .9 . Select m_Stage_Customer_Contacts_xx from the Mapping list box.9-4 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U .

09 . The name of the text file that is listed in Properties | Attribute | Source filename will be a text file that contains a list of the text files to be read in as individual sources. .c . Confirm that Source file directory is set to $PMSourceFileDir\. When you create a file list you open a blank text file with a application such as Notepad and type on a separate line each text file that is to be read as part of the file list.a .b .d repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U : p iT : p iT . In Properties > Attribute > Source filename type in customer_list. In Properties > Attribute > Source filetype click the dropdown arrow and change the default from Direct to Indirect. To change the setting.Under the Mapping tab: Select SQ_customer_layout located under the Sources folder in the navigator window. click the dropdown arrow and set the value you want to use. Power Center assumes the files will be located in the same location as the file list file. You may precede each file name with directory path information.7 The source instance you are reading is known a File List.txt. If you don't provide directory path information. It is a list of files which will be appended together and treated as one source file by Power Center. The default is Direct. When you use the file list feature in Power Center you have to set Properties | Attribute | Source filetype to Indirect.

tsil_remotsuc eht fo stnetnoC . Start the workflow.11-4 erugiF seitreporP ecruoS ksaT noisseS . where xx is your student number. Check the property Truncate target table option in the target properties. Set the relational target connection object property to NATIVE_STGxx.9 Save your work.e ♦ ♦ . Figure 4-11 displays the contents of customer_list.8 .txt. $PMSourceFileDir\. r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U . Select STG_CUSTOMERS located under the Target folder in the navigator window. .01-4 erugiF The file list file used in this exercise lists three text files which are found in the default location of the file list file. Check Validate messages to ensure your workflow is valid. 19 tsiL eliF txt.01 .Your screen should appear similar to Figure 4-10.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U nuR noisseS detelpmoC eht rof scitsitatS tegraT/ecruoS .11 .31 Review the Source/Target Statistics.31-4 erugiF nuR noisseS detelpmoC eht rof seitreporP . Your information should appear as displayed in Figure 4-12.21-4 erugiF . If your session failed or had errors troubleshoot and correct them by reviewing the session log and making any necessary changes to your mapping or workflow. 29 . Your statistics should be the same as displayed in Figure 4-13.21 .Review the session properties.

Data Results Preview the target data from the Designer.3 39 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U . Step 7: Schedule a Workflow After debugging has been completed run the workflow for a final time for an initial table load. Save any changes to the repository.1 . elbaT tegra SREMOTSUC_GTS eht fo weiverP ataD .2 . Your data should appear as displayed in Figure 4-14. Scroll down and review these columns.41-4 erugiF T Observe the CUST_PHONE. . CUST_GENDER. Verify you wrote your expressions correctly. CUST_AGE_GROUP columns. Open the session task for the mapping and ensure the truncate table property is checked. These columns required transforming using the Expression transformation.

Select Workflows > Edit. 49 . wolfkroW eht rof seitreporP lareneG .51-4 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U . Select the Run once radio button in the Daily frequency group. Wednesday. Thursday.i . Select Week(s) from the Repeat every dropdown box.iii .7 .6 .8 Select the Scheduler tab. Tuesday. Friday Weekly check boxes. Type sch_Stage_Customers_Contacts_xx in the Name text box.5 . Clear the Run on demand check box.b .ii . Check the Monday.4 . Select the Customized Repeat radio button and click the Edit button. .a . This will display the screen seen in Figure 4-15. Select the Edit Scheduler command button Select the Schedule tab.

Click OK twice.e . Save your changes to the repository.c . .9 Set the Start Date in the Start options group to tomorrow's date.61-4 erugiF Click OK. snoitpO eludehcS detelpmoC .d .vi . 59 snoitceleS taepeR dezimotsuC . Set the Start Time to 00:01. Your schedule options will appear similar to the one displayed in Figure 4-17.Your customized options should appear the same as displayed in Figure 4-16. Select the Forever radio button in the End options group.01 .71-4 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U .

'40 TO 49'. '30 TO 39'. 'GREATER THAN 60') 69 . AGE > 60. References Decode Statement DECODE(TRUE.1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U .11 . '50 TO 60'. 'LESS THAN 20'. AGE >= 30 AND AGE <= 39.Right click in the workspace and select Schedule Workflow. . AGE >= 50 AND AGE <= 60.21 AGE >= 20 AND AGE <= 29. '20 TO 29'. Check the Workflow Monitor to confirm that the workflow has been scheduled. AGE >= 40 AND AGE <= 49. AGE < 20.

79 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S r e m o t s u C e h t d a o L : b a L 4 t i n U 89 .

s n i o J : 5 t i n U . you should be able to: ♦ ♦ ♦ Define heterogeneous joins Use the Joiner transformation in a mapping Use Designer features and techniques Lesson 5-1. the other Detail. One source is designated the Master.Unit 5: Joins.g. e. Joiner Transformation Joins combine data from different records (rows). 99 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e u q i n h c eT d n a s e r u t a e F . matching customer ID. Features and Techniques When you have completed this unit. Joins select rows from two different pipelines based on a relationship between the data.

Description The Joiner transformation combines fields from two data sources into a single combined data source based on one or more common fields also know as the join condition. s n i o J :5 ti n U 001 .Type Active. repoleveD I leveL 8 retneCrewoP acitamrofnI s e u q i n h c eT d n a s e r u t a e F . Business Purpose A business has data from two different systems that needs to be combined to get the desired results.

We need to use the Joiner transformation to accomplish this task. Joiner Properties 101 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e u q i n h c eT d n a s e r u t a e F . s n i o J : 5 t i n U .Example A business has sales transaction data on a flat file and product data on a relational table. The company needs to join the sales transaction to the product table to get some product information.

Join Types There are four types of join conditions supported by the Joiner transformation: Joiner Cache How it Works ♦ ♦ ♦ ♦ ♦ ♦ There are two types of cache memory. repoleveD I leveL 8 retneCrewoP acitamrofnI s e u q i n h c eT d n a s e r u t a e F . The index cache contains all port values from the master source where the port is specified in the join condition. Key Point If there is not enough memory specified in the index and data cache properties. Performance Considerations The master source should be the source that will take up the least amount of space in cache. The data cache contains all port values not specified in the join condition. index and data cache. Upon a match the rows from the data cache are included in the stream. Another performance consideration would be the sorting of data prior to the Joiner transformation (discussed later). the overflow will be written out to disk. After the cache is loaded the detail source is compared row by row to the values in the index cache. All rows from the master source are loaded into cache memory. s n i o J :5 ti n U 201 .

s n i o J : 5 t i n U Lesson 5-2.301 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e u q i n h c eT d n a s e r u t a e F . Shortcuts .

repoleveD I leveL 8 retneCrewoP acitamrofnI s e u q i n h c eT d n a s e r u t a e F . s n i o J :5 ti n U 401 .

Technical Description PowerCenter will source from a flat file and relational table. The sales transaction data needs to be loaded to the staging table daily. Duration 30 minutes 501 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S n oi t c a s n a rT s e l a S d a o L : A b a L 5 t i n U . This value can be read from the STG_PRODUCT table. Use the Joiner transformation to join the flat file to the relational table (heterogeneous join) and then write the results to the STG_TRANSACTIONS table. Goals ♦ ♦ ♦ Create a Joiner transformation and use it to join two data streams from two different Source Qualifiers. A Joiner transformation is used to create one dataflow that is then written to a relational target. The flat file is missing one field the staging table needs—the cost of each product. This value has an identical corresponding value in the STG_PRODUCT table PRODUCT_ID column. Specify a join condition. Each row of the source file contains a value named Product. Select the master side of the join.Unit 5 Lab A: Load Sales Transaction Staging Table Business Purpose Mersche Motors receives sales transaction data from their regional sales offices in the form of a text file.

elb a t t e g ra t elc a r o n a ot ne tt i rw eb lli w hc ih w m a e rts a ta d ec r u o s e no ot ni d en ioj eb lli w el b at elc ar o d n a eli f t alF 4 74 5 e lb at elc a rO d a oL / sw o R m e t s y S t eg r aT HIGH LEVEL PROCESS OVERVIEW S NO IT CA SN A RT_ GTS e t ad p U r e n w O am eh c S e m a N e lb aT s e lb aT s eliFc r S\s eli f mp \: C ttx t .sn oi tc as na r t_ sel as no i t a c oL e l iF xx UB DT T CU DO R P_ GTS D I _TC U DO R P tl u af e D dneppA tegraT gnitacnurT-noN yli a D sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M 84 el ba t elc a rO 47 4 5 eli f t alF xx _S N OIT CA S NA RT _GT S_ m TARGETS e m a N e l iF s e l iF e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S n o i t c a s n a rT s e l a S d a o L : A b a L 5 t i n U 601 e c ru oS l an oi ta le R tegraT lanoitaleR noitamrofsnarT renioJ ec r u oS el iF ta lF X y e K eu q in U tresnI ete leD xx UB DT r e timi le d a mm o C d e timi le D o f n I e l i F l an o i t id d A d e t i m i l e D /d e x iF r e t l i F / no i t c e l e S r e n w O / am eh c S .

The flat file source has all the required detail except for product cost. PROCESSING DESCRIPTION (DETAIL) . The single data stream will then be written to a staging table. The relational table will have fewer columns to join on as well as fewer rows.701 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S n oi t c a s n a rT s e l a S d a o L : A b a L 5 t i n U ETABER K CA B DL OH T NU OC S ID YT IT NA UQ S EG RA H C YRE VI L ED TS O C_T C U DO RP E C IR P G NI LL ES Y EK _E MIT D I_ EE YO LP ME D I _ NOIT C AS NA RT ETAD_NOITCASNART DI_ETAD DI _O MO RP CSED_TNEMYAP PI H SR E LA ED T C U DO RP O N_T S UC sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS T C UD O RP _GTS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS sn oi tc as na r t_ sel aS ETABER K CA BD LO H TN UO C SI D YTQ _S EL AS S EG RA H C_ YRE VI LE D TSO C _T IN U E CI R P_ GN I LL ES YE K_ E MIT D I_ EE YO LP ME D I _N OIT C AS NA RT ETAD_NOITCASNART DI_ETAD D I _O MO RP CSED_TNEMYAP DI _ PI HS R EL AE D DI _T C U DO RP DI _T SU C S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS S NO IT CA SN A RT_ GTS lluN f i eu l aV t lu a f e D noisserpxE n mu l o C e c r uo S e l iF e cr u oS nm u l o C t eg r aT e l b aT t eg r aT SOURCE TO TARGET FIELD MATRIX Also. there are a number of fields in the source file that need further scrutiny during the import process. The columns to join on are PRODUCT_ID and PRODUCT. It will be joined with the relational source into one data stream allowing access to the product cost for each sales transaction.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S n o i t c a s n a rT s e l a S d a o L : A b a L 5 t i n U tegraT dna sreifilauQ ecruoS .2 . Save the repository.5 Step 2: Create a Relational Source Definition Verify you are in the Source Analyzer tool. even though it is in your “target” (tdbuxx) schema.txt comma delimited flat file.1-5 erugiF 801 . Add the STG_TRANSACTIONS relational target to the new mapping.2 .1 . and import STG_PRODUCT table found in your tdbuxx schema.4 .1 .2 . . Import sales_transactions. Your mapping should appear similar to Figure 5-1.4 . Step 4: Create a Mapping Open the Mapping Designer tool.5 .1 .secruoS suoenegoreteH eht fo weiV lamroN . Add the sales_transactions flat file source to the new mapping. Ensure that the Transaction Date field has a Datatype of Datetime.3 . Save the repository. Open the Source Analyzer tool. Note that you are importing the table as a source definition. Step 3: Create a Relational Target Definition Open the Target Designer tool.2 . Use ODBC_STG as the ODBC data Source. Add the STG_PRODUCT relational source to the new mapping.Instructions Step 1: Create a Flat File Source Definition Launch the Designer client tool (if it is not already running) and open your student folder. Create a new mapping named m_STG_TRANSACTIONS_xx. Import the STG_TRANSACTIONS table found in your tdbuxx schema.1 .3 .

Your mapping should be similar to Figure 5-3.5 901 noitamrofsnarT renioJ a ot detcennoC secruoS suoenegoreteH fo weiV lamroN .3-5 erugiF nottuB noitamrofsnarT renioJ . Rename it to jnr_Sales_Transaction_To_STG_PRODUCT.a .2-5 erugiF Create a new Joiner transformation. Select the Ports tab.1 . If the source data is sorted. Select only the PRODUCT_ID and PRODUCT_COST ports from SQ_STG_PRODUCT object and copy them to the Joiner transformation.4 .3 .Step 5: Create a Joiner Transformation Select the Joiner transformation icon located on the Transformation tool bar with a single left click.2 . r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S n oi t c a s n a rT s e l a S d a o L : A b a L 5 t i n U : p iT . Figure 5-2 shows the Joiner transformation button: . use the source with the fewest number of join column duplicates. Set the Master (M) property to the STG_PRODUCT ports. if the data is not sorted. in rows and bytes. Select all the ports from the SQ_sales_transactions object and copy/link them to the Joiner transformation.b . . Edit the Joiner transformation.c Which ports should be the Master? Use the source that is the smaller.

e . Click the Add a new condition button.5-5 erugiF . Uncheck the output check box for PRODUCT_ID. .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S n o i t c a s n a rT s e l a S d a o L : A b a L 5 t i n U 0 11 noitidnoC a tuohtiW noitamrofsnarT renioJ rof baT noitidnoC eht fo weiV tidE . Rename the PRODUCT_ID port to IN_PRODUCT_ID.6 noitamrofsnarT renioJ eht rof baT stroP eht fo weiV tidE .d .4-5 erugiF Select the Condition tab. Figure 5-5 displays the Add a new condition button as selected. The Master drop down box will default to IN_PRODUCT_ID.a .

Step 6: Link the Target Table Link the following ports from the Joiner transformation to the corresponding columns in the target object. The Joiner transformation can support multiple port conditions to create a join. Example: JOINER PORT TARGET COLUMN CUST_NO PRODUCT DEALERSHIP PAYMENT_DESC PROMO_ID DATE_ID TRANSACTION DATE TRANSACTION_ID EMPLOYEE_ID TIME_KEY SELLING PRICE PRODUCT_COST DELIVERY CHARGES QUANTITY DISCOUNT HOLDBACK REBATE CUST_ID PRODUCT_ID DEALERSHIP_ID PAYMENT_DESC PROMO_ID DATE_ID TRANSACTION_DATE TRANSACTION_ID EMPLOYEE_ID TIME_KEY SELLING_PRICE UNIT_COST DELIVERY_CHARGES SALES_QTY DISCOUNT HOLDBACK REBATE . Click OK.1 111 noitidnoC detelpmoC htiw noitamrofsnarT renioJ eht rof baT noitidnoC eht fo weiV tidE .c .7 . If you need multiple port conditions simply click the Add a new condition button to add the other ports that make up the multiple port condition.b . Your condition should be the same as displayed in Figure 5-6. Save the repository.6-5 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S n oi t c a s n a rT s e l a S d a o L : A b a L 5 t i n U : p iT .Select the Detail drop down box and set it to PRODUCT.

Verify your mapping is valid in the Output window.5 . Edit the s_m_STG_TRANSACTIONS_xx session task. Step 7: Create a Workflow and Session Task Launch the Workflow Manager application (if it is not already running) and log into the repository and your student folder.7 . correct the invalidations that are displayed in the message.3 . Select the Mapping tab. Open the Workflow Designer tool and create a new workflow named wkf_STG_TRANSACTIONS_xx.d .4 . Select m_STG_TRANSACTIONS_xx from the Mapping list box and click OK. Link the Start object to the s_m_STG_TRANSACTIONS_xx session task object.a .2 .6 2 11 .f . . Set the Connections | Type to your assigned Native_STGxx connection object. Select SQ_STG_PRODUCT located under the Sources folder in the navigator window.b .2 . .3 . Select SQ_sales_transactions located under the Sources folder in the Mapping navigator. Add a new Session task using the session task icon.txt is displayed.e . The file extension (. If the mapping is not valid.1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S n o i t c a s n a rT s e l a S d a o L : A b a L 5 t i n U deyalpsiD toN secruoS suoenegoreteH gnippaM detelpmoC fo weiV lamroN .c . Check the Truncate target table option checkbox.7-5 erugiF Save the repository. Save the repository. Set the Connections | Type to your assigned Native_STGxx connection object. Select STG_TRANSACTIONS located under the Target folder in the navigator window. Confirm that Properties | Attribute | Source file directory is set to $PMSourceFileDir\ In Properties | Attribute | Source filename verify that sales_transactions.txt) must be present.Figure 5-7 displays the ports linked to their corresponding columns.

8-5 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S n oi t c a s n a rT s e l a S d a o L : A b a L 5 t i n U . correct the problem(s) and re-validate/save.7 . Ask your instructor for help if you get stuck. Confirm that the Workflow Monitor application launches automatically.6 .8 .9-5 erugiF nuR noisseS detelpmoC eht fo sliateD ksaT . 3 11 nuR noisseS eht rof scitsitatS tegraT/ecruoS . Search the session log for error messages that caused your session to have issues. . Read the messages and correct the problem. Maximize the Workflow Monitor. If your session failed or had an error proceed to the next step.4 .1 .Check Validate messages to ensure your workflow is valid.3 .8 Step 8: Start the Workflow and View Results in the Workflow Monitor Start the workflow. Rerun your workflow to test your fix(s). Your information should appear similar to Figure 5-8. Your statistics should be similar to Figure 5-9.5 . Double-click the session with your left mouse button and view the Task Details window.2 . If you received an invalid message. Select the Transformation Statistics tab. Right-click the Session again and select Get Session Log.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S n o i t c a s n a rT s e l a S d a o L : A b a L 5 t i n U 4 11 elbaT SNOITCASNART_GTS eht fo weiverP ataD . . Your data should appear the same as displayed in Figure 5-10.01-5 erugiF Data Results Preview the target data from the Designer.

5 11 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S n oi t c a s n a rT s e l a S d a o L : A b a L 5 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S n o i t c a s n a rT s e l a S d a o L : A b a L 5 t i n U 6 11 .

Unit 5 Lab B: Features and Techniques I Business Purpose The management wants to increase the efficiency of the PowerCenter Developers. At the discretion of the instructor. Technical Description This lab will detail the use of 12 PowerCenter Designer features. Goals ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ Auto Arrange Remove Links Revert to Saved Link Path Propagating Ports Autolink by Name and Position Moving Ports Shortcut to Port Editing from Normal View Create Transformation Methods Scale-To-Fit Object Shortcuts and Copies Copy Objects Within and Between Mappings Duration 50 minutes 7 11 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U . this lab can also be completed as a demonstration. Each of these features will increase the efficiency of any developer who knows how to use them efficiently.

this feature can take a mapping that looks like Figure 5-11. . In a couple of clicks. This aids in readability and analysis of the mapping flow and can be applied to certain paths through a mapping associated with specific target definitions. gnippaM a fo weiV degnarrA .Instructions Open a Mapping In the Designer tool: In your student folder.21-5 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U 8 11 .11-5 erugiF And change it to look like Figure 5-12. open mapping m_Stage_Customer_Contacts_xx. gnippaM dezinagronU na fo weiV .1 Feature 1: Auto Arrange The Designer includes an Arrange feature that will reorganize objects in the Workspace in one simple step.

transformations) were selected along with the links.1 .g. Ensure no icons are deleted. If any other objects (e. skniL elpitluM gnitceleS . gnippaM degnarrA na fo weiV cinocI . Type Ctrl+S to save. By default.31-5 erugiF Feature 2: Remove Links Click-and-drag the pointer over the blue link lines that are between exp_Format_Name_Gender_Phone and STG_CUSTOMERS.41-5 erugiF Press the Delete key to remove the connections. Notice the mapping would not save. Another change must be made to the Repository in order for the formatting to be saved. it is not considered a change. . redo the process.2 .3 Choose Layout > Arrange All or right-click in the Workspace and select Arrange All.Choose Layout > Arrange All Iconic or right-click in the Workspace and select Arrange All Iconic. each selected link changes in color from blue to red. 9 11 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U : p iT : p iT .. When only formatting changes are made.

3 . Notice all changes were reverted. In the Ports tab. targets. xoB gninraW rengiseD . individual objects may be reverted. Select only the SQ_customer_layout Source Qualifier and choose Edit > Revert to Saved. transformations. Select Yes to proceed. Edit the exp_Format_Name_Gender_Phone expression. : p iT : p iT For mappings. delete the AGE port. not just the changes made to the SQ_customer_layout. Similarly. Revert to Saved reverts all changes to the mapping.51-5 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U . and Transformation Developer. In the Source Analyzer.all changes must be reverted.Feature 3: Revert to Saved While editing an object in the Designer.2 . if unwanted changes are made there is a way to revert to a previously saved version . select the OUT_CUST_NAME port and click the Delete button. Target Designer.4 . The same dialog box appears .undoing the changes since the last save.5 . Edit the SQ_customer_layout Source Qualifier and remove the AGE port. mapplets and mappings. Select Edit > Revert to Saved.7 Select Yes to proceed. 021 . Only the active mapping in the workspace is reverted. The Revert to Saved feature works with the following objects: sources.6 . not just selected objects.1 .

1 . Ensure that the mapping is in the arranged normal view. Right-click on CUSTOMER_NO in the SQ_customer_layout Source Qualifier and choose Select Link Path > Forward.2 Notice how the path for CUSTOMER_NO.Feature 4: Link Path Tracing link paths allows the developer to highlight the path of a port either forward or backward through an entire mapping or mapplet. htap knil drawrof eht gnitceleS . If the class is doing this lab as a follow-along exercise.61-5 erugiF 121 htap knil drawrof dethgilhgiH .71-5 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U . . from SQ_customer_layout all the way to STG_CUSTOMERS. do a Revert to Saved so that everyone is synchronized. is highlighted in red.

3 .91-5 erugiF : p iT repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U .3 Notice how the OUT_CUST_NAME port's path not only shows where it proceeds to the STG_CUSTOMERS target definition. so both links are highlighted in red. Edit SQ_customer_layout and change CUSTOMER_NO to CUST_NO and change the Precision to 10. scale.81-5 erugiF Feature 5: Propagating Ports When a port name.1 .2 . Right click on CUST_NO in the SQ_customer_layout transformation and select Propagate Attributes. datatype. precision. Both the IN_FIRSTNAME and IN_LASTNAME are used in the formula to produce OUT_CUST_NAME. drawkcab dna drawrof gniog htap knil dethgilhgiH . or description is changed.Right-click on the OUT_CUST_NAME port in the exp_Format_Name_Gender_Phone and select Link Path > Both. 221 . setubirtta eht etagaporp ot gnitceleS . those changes can be propagated to the rest of the mapping. but also from its origin all the way back to the customer_layout source definition. Click OK.

Select Preview.7 . Under Attributes to propagate. Use any of the following options to automatically link by name: Link by name Link by name and prefix Link by name and suffix : p iT ♦ ♦ ♦ The Designer adds links between input and output ports that have the same name.5 . choose Name and Precision with a Direction of Forward.6 .b .4 .8 . Notice the arrow between SQ_customer_layout and fil_Customer_No_99999 turns green. Linking by name is case insensitive. xob golaid etubirtta noitagaporP . Close the Propagate dialog box. Why is there only one change? Select Propagate.d . The green arrow indicates the places where a change would be made. choose Name and Precision with a direction of Forward. Edit SQ_customer_layout and change GENDER to CUST_GENDER and change the Precision to 7.e .01 . . Notice the expression now contains CUST_GENDER. Notice the green arrows? What will be changed? Select Propagate. Revert to Saved to reset the mapping.a . Edit exp_Format_Name_Gender_Phone and open the Expression Editor for OUT_GENDER. .Under Attributes to propagate. Click OK.9 Choose Preview.1 321 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U . Link by name when using the same port names across transformations.02-5 erugiF Feature 6: Autolink by Name and Position Developers can automatically link ports by name in the Designer.c . Was a change made in the filter? Click Close. Right click on CUST_GENDER in the SQ_customer_layout transformation and select Propagate Attributes.

select the group name from the To Transformations list.3 .2 . Only one transformation may be selected in the From Transformation box and one to many transformations may be selected in the To Transformations box. Choose Autolink. then highlight the STG_CUSTOMERS transformation in the To Transformations box. repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U xob golaid knilotuA .Remove the links between the exp_Format_Name_Gender_Phone and the STG_CUSTOMERS target definition. For objects that contain groups. : p iT . 421 .12-5 erugiF Select the exp_Format_Name_Gender_Phone transformation from the From Transformation dropdown menu. Right-click in the white space inside the mapping. such as Router transformations or XML targets.4 The Autolink dialog box opens.

8 . Select the exp_Format_Name_Gender_Phone transformation from the From Transformation dropdown menu.Click OK.11 . Adding suffixes and/or prefixes in port names help identify the ports purpose.9 Select Layout > Autolink. Type OUT_ in the From Transformation Prefix field.22-5 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U . then highlight the STG_CUSTOMERS transformation in the To Transformations box. This is because this is the only port with a matching name. Click OK Notice that only the OUT_CUST_NAME port was linked.5 . For example. : p iT 521 xob golaid knilotua eht ni xiferp a gninifeD .01 . Notice that nothing happened. Select the Name radio button. Click More to view the options for entering prefixes and suffixes. Would autolink by position work? When autolinking by name.7 . Without this feature. Note the button toggles to become the Less button. The Designer also has the ability to link ports based on prefixes or suffixes defined. .6 . a suggested best practice is to use the prefix “OUT_” when the port is derived from input ports that were modified as it passes through the transformation. case insensitive. Look carefully at the exp_Format_Name_Gender_Phone and STG_CUSTOMERS and you will notice that none of the ports match exactly. the Designer adds links between ports that have the same name. Autolink would skip over the names that don't match and force the developer to manually link the desired ports. therefore autolink by name will not work in this situation.

Single-click and hold the left mouse button and note the faint square that appears at the bottom of the pointer.3 .1 .5 . Double-click on the AGE port. : p iT repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U devom neeb sah trop EGA eht retfa noisserpxE .6 . Single-click on the AGE port and move it up to the top using the Up arrow icon found in the upper right corner of the toolbar. Click Cancel to discard the changes. strop gnivom fo dohtem gard dna kcilC . Notice you are now in the Ports tab. Resize or scroll down until the AGE port appears in the exp_Format_Name_Gender_Phone.3 .Feature 7: Moving Ports Revert to Saved to reset the mapping.2 . Open the exp_Format_Name_Gender_Phone and click on the Ports tab. Delete the AGE port.1 . The results will look like Figure 5-23: .42-5 erugiF Move PHONE_NUMBER directly below AGE.2 .7 .4 .4 Feature 8: Shortcut to Port Editing from Normal View There is a shortcut to go from the Normal View directly to the port desired in the Edit View this is especially useful in transformation objects that have dozens of ports.32-5 erugiF Single-click on the number to the left of the IN_PHONE_NUMBER port. 621 .

. Select the Aggregator from the drop-down list. The cursor changes to crosshairs.4 . Select Transformation > Create. Enter the name agg_TargetTableName and click Create.2 .52-5 erugiF xob golaid noitamrofsnarT etaerC . : p iT 721 unem eht gnisu noitamrofsnart a gnitaerC .3 .62-5 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U . On the Transformation toolbar.5 . When the mouse pointer hovers over a transformation icon in the toolbar that the name of the transformation object appears momentarily.Feature 9: Create Transformation Methods Revert to Saved to reset the mapping. find the Aggregator Transformation Move the mouse into the Workspace. Single-click in the workspace where you want to place the transformation.6 .1 .7 button and single-click. The selected transformation appears in the desired location of the Workspace and the cursor changes back to an arrow.

3 .6 Click anywhere in the Workspace and the mapping will zoom out by 10% each time the mouse is clicked. Click on the Zoom in 10% button Click anywhere in the Workspace and the mapping will zoom in by 10% each time the mouse is clicked. Workspace size. There are features to change the magnification of the contents of the Workspace. and current magnification.4 . Zoom out 10% on button.82-5 erugiF Click on the Zoom out 10% button on the toolbar. Uses a point selected as the center point from which to decrease the current magnification in 10 percent increments. 821 .Click on the Done button and the new transformation appears in the Workspace.72-5 erugiF snoitpo mooZ .5 . Zoom in 10% on button increases the current magnification of a rectangular area selected. Use the toolbar or the Layout menu options to set zoom levels. : p iT : p iT . The toolbar has the following zoom options: . on the toolbar.1 repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U noitamrofsnarT rotagerggA detaerC ylweN eht fo weiV lamroN .2 . Keep clicking until the mapping is small enough to fit within the window. Degree of magnification depends on the size of the area selected. Feature 10: Scale-to-Fit Revert to Saved to reset the mapping.8 .

Only one folder at a time can be open. a mapping. all shortcuts inherit the changes. Open your student folder by either double clicking on it or by right-clicking on it and selecting open. A shortcut is a “pointer” to the original object.Toggle off the Zoom in 10% Click on the Scale to Fit button. If the object is edited.8 .4 . it is important to distinguish between expanded folders and the open folder. Expand the Mappings subfolder in the DEV_SHARED folder. Note that the folder name in the Navigator window is now bold.) in any folder.7 . etc. The shortcut itself cannot be edited.1 . button in the toolbar. Click and drag the m_Stage_Customer_Contacts mapping to the Mapping Designer workspace and release the mouse button.3 .92-5 erugiF Open the Mapping Designer and close any mapping that is in the workspace. 921 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U : p iT . . Note that the DEV_SHARED folder is no longer bold (open) but it remains expanded so you can see the subfolders.5 Another way to do this is to select Layout > Scale to Fit. As we will see below. Select and double-click the DEV_SHARED folder. Feature 11: Object Shortcuts and Copies This feature allows you create a shortcut of an object (a source or target definition. rengiseD eht ni wodniw rotagivaN .2 . This means that the folder is open. Any number of folders can be expanded so that the subfolders and objects are visible.

The Copy Wizard will be displayed. Press Ctrl+C on your keyboard.6 . A common error when copying objects within a folder is to use the mouse to move the cursor from the object to the workspace after copying the object Ctrl+C. Click No in the Copy Confirmation message box. Click Yes in the Copy Confirmation message box. A shortcut can never be edited directly. Use the Arrange All Iconic feature on the m_Stage_Customer_Contacts_xx mapping. If desired. then Finish. : p iT Feature 12: Copy Objects Within and Between Mappings You may find that you would like to duplicate a given set of transformations within a mapping or a mapplet. The destination folder (the folder you are placing the copy or shortcut into) must be the open folder. This technique may prove useful if you know that you will need to use the logic contained in the transformations in other mappings or mapplets.9 . The instructions below are to copy a mapping but the same procedure can be used for any other object. you can supply your own new name to the mapping to replace the “1” added by the Designer. Note that all properties are grayed-out and not editable. preserving the data flow between them. Click Next.1 .You will see the following confirmation message: Click Yes Save the changes to the repository. Note that your folder now has a shortcut to the mapping. select any mapping in your folder.01 .3 . Select the menu option Mappings ' Edit to see how the shortcut location is displayed. Click the Edit button. Perform the same click-and-drag operation with the same mapping. . Note that this creates a copy of the mapping instead of a shortcut. Choose Rename for the conflict resolution. Open the Filter transformation in edit mode.2 . followed immediately by Ctrl+V. only this time press the [Ctrl] key after you have begun to drag the mapping.4 .5 .1 repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U : p iT . The origin folder that contains the original object will be expanded.6 We will now learn how to copy an object within the same folder. Mappings within a folder must have unique names. This is unnecessary and will cause the copy operation to fail. 031 .8 .7 . In the Navigator window. The red x on the mapping indicates a conflict.

The transformations are copied into the open mapping.4 . Press Ctrl+C on your keyboard.6 Close your folder but do not save the changes. 131 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U : p iT . including the data flow between the input and output ports.3 . Open another mapping in the Mapping Designer. They have been automatically renamed with a “1” on the end of their names. Press Ctrl+V. Note that both transformations have been copied into the mapping. These objects will then appear selected. It does not matter which mapping is used.2 .5 .Use your left mouse button to draw a rectangle that encloses the Filter and the Expression transformations. followed immediately by Ctrl+V. . The copy objects within and between mappings feature can be used only within a single folder. provided it is not a shortcut.

repoleveD I leveL 8 retneCrewoP acitamrofnI I s e u q i n h c eT d n a s e r u t a e F : B b a L 5 t i n U 231 .

Unit 6: Lookups and Reusable Transformations When you have completed this unit. you should be able to ♦ Describe these feature: Lookup transformation ♦ Reusable transformations Use these features in a mapping. ♦ ♦ Lesson 6-1. Lookup Transformation (Connected) 331 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s n o i t a m r o f s n a rT e l b a s u e R d n a s p u k o o L : 6 t i n U .

The remaining properties will be discussed in other sections. un-connected and dynamic. Description A Lookup transformation allows the inclusion of additional information in the transformation process from an external database or flat file source. The basic Lookup transformation types are connected.Type Passive. In SQL terms a Lookup transformation may be thought as a “sub-query”. Properties We will discuss only some of the properties in this section. repoleveD I leveL 8 retneCrewoP acitamrofnI s n o i t a m r o f s n a rT e l b a s u e R d n a s p u k o o L : 6 t i n U 431 .

ecruos pukool ro ehcac eht morf denruter wor tsal ro tsrif eht tceles nac uoY . si ti n oi tc en n oc es ab a ta d f o e pyt t a h w y fic e ps osl a n ac u oy . eli f ta lf a r o es ab a ta d la n oit al e r a m o r f s e ula v s d ae r noi t am r of sn a rt puk o oL eh t t ah t se t aci dn I .b at s t ro P e ht no ro noi ti ni fe d pu ko ol e h t ni dl ei f r al uci tr a p a ro f t am r of emi t et a d a e nif e d to n o d u oy f I .d el b an e e hc ac p uk ool eh t h ti w yl n o es U. eliF t alF l an oi tal e R . n oiss es e ht e ru gi fn oc u oy n e h w y fic e ps u oy es a ba t ad t e g ra t ro e c ru os e h t ni e dis e r ts um elb a t p uko ol e h t .noitidnoc pukool eht hctam taht swor elpi tl um s d nif noi t am r of sn a rt puk o oL eh t n eh w s ne p pa h t ah w s eni m r et e D . eliF t alF l an oi tal e R . n oit ce n noc esa b at a d tc ax e eh t tc el es u oy f I . e r eh d e ni fe d s ei t re p or p e h t s es u eci v re S n oit a r ge tn I e ht .rorre na troper ro .n oi ta m r ofs n a rt si ht gni ni at n oc noi ss es a nu r uo y n eh w go l n oiss es eh t ni d ed ulc ni li at e d f o t nu o ma eh t s te S .tamrof emitetad yna retne nac uoY .531 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s n o i t a m r o f s n a rT e l b a s u e R d n a s p u k o o L : 6 t i n U .elbat pukool eht gniniatnoc esabatad eht seificepS . ba t n oit id n oC eh t ni t es u oy noi ti dn oc p uk o ol e ht sy al psi D . eliF t alF t am r oF e mit e ta D leveL gnicarT epyT ecruoS l an oi tal e R l an oi tal e R .SS : IM :4 2 H H YYYY/DD/MM si tluafed ehT . el b at p uk ool e h t y r e uq o t tn e me t ats L QS tl u af ed eh t s e di r re vO n o i tp i r c s e D eliF t alF l an oi tal e R . eliF t alF l an oi tal e R l an oi tal e R e p yT p u k o o L n oit a m ro fn I n oi tce n no C n oiti d no C p uk o oL hc t aM el pit lu M n o ycil oP p uk o oL emaN elbaT pukooL e di r r evO L QS p uk o oL no i tp O .s elb ai r av e se ht fo e n o es u uoy fI .elbairav tegraT$ ro ecruoS$ eht esu nac uoy ro noitcennoc esabatad tcaxe eht tceles nac uoY .s e ula v s e hc ac dn a p u sk ool noi t am r of sn a rt eh t hc ih w m o rf elb a t e ht f o e ma n e h t s ei fic ep S .

s nm ul oc g ni r ts n o s p uk ool gni m r of r ep ne h w sn osi r ap m oc g ni rt s evi tis ne s -es ac s es u eciv r eS noi t a rg e tn I e ht . if the policy number does not exist a “null” value is returned.rotarapes on esoohc nac uoY .rotarapes on si tluafed ehT .b at s t ro P e ht no ro noi ti ni fe d p uk o ol e ht n i dl eif ra luc it r ap a r of r ot a ra p es la mic e d a e nif e d to n o d u oy f I .h gi h se ul av llun stros ecivreS noitargetnI eht .ammoc a . e r eh de ni fe d s ei t re p or p e h t s es u eci v re S n oit a r ge tn I e ht . The return is used as the “Group Filter Condition” in the Router transformation.esa C eliF t alF r ot a r ap eS l am ice D eliF t alF r ot a r ap eS dn as u ohT no i tp O Example A business may bring data from various sources but additional data from local sources may be need such as product codes. If the policy number exists the matching policy number is returned.s pu ko ol la n oit al e r r oF : et o N . All other rows go to the Router Default group and are passed to the reject (ROLICIES_REJ) target. de t ro s s i at a d eli f p uk ool eh t t on ro r eh te h w se t aci dn I . Caching a very large table may require a large amount of memory. names.tluafed yB . eliF t alF eliF t alF gni r e d rO llu N eliF t alF no si ra p mo C g ni rt S evi tis ne S . In the following example an insurance company pays commissions on each new policy. e r eh de ni fe d s ei t re p or p e h t s es u eci v re S n oit a r ge tn I e ht . Business Purpose t up n I d et r oS .seulav llun sredro ecivreS noitargetnI eht woh senimreteD . The Router filter condition is “ISNULL (POLICY_NO1)” and is based on the return value from the Lookup transformation “POLICY_NO” port NOT the value from the Source Qualifier. etc. Rows from the source which have no match (null return) in the lookup table will make the filter condition and pass to the new (POLICY_NEW) target. The goal is to check submitted policies against current list and reject the policies which are duplicates. d etc el es f I .wol ro hgih seulav llun tros ot esoohc nac uoY . dates.b at s t ro P e ht no ro noi ti ni fe d pu ko ol e h t ni dl ei f r al uci tr a p a ro f r o ta r ap es d n as uo h t a e nif e d to n o d u oy f I n o i tp i r c s e D e p yT p u k o o L Performance Considerations A policy number is passed to a connected Lookup transformation is used to check the current policy table for the pre-existence of a policy.s pu ko ol la n oit al e r r oF : et o N . however there may be a possibility by clerical error duplicate policies may be submitted. t r op p us es ab a ta d e ht no des a b si g ni re d r o ll u n . do i re p si tluafed ehT .doirep a ro . t ro p pu s es ab a ta d e ht no des a b s i no si ra p mo c evi tis ne s -es ac e h t .repoleveD I leveL 8 retneCrewoP acitamrofnI s n o i t a m r o f s n a rT e l b a s u e R d n a s p u k o o L : 6 t i n U 631 All rows pass through a connected Lookup so there may be performance degradation in executing additional Lookups when there are not needed.rotarapes lamiced doirep a ro ammoc a esoohc nac uoY . .

You can edit ports only in the Transformation Developer.’ Reusable transformations are listed in the Transformations node of the Navigator. Changing reusable transformations can invalidate mappings 731 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s n o i t a m r o f s n a rT e l b a s u e R d n a s p u k o o L : 6 t i n U . Instances dynamically inherit changes. Key Points ♦ ♦ ♦ ♦ ♦ You can also copy them as non-reusable by depressing the Ctrl key while dragging. Reusable Transformations You can create a reusable transformation in: ♦ ♦ Transformation Developer Mapping Designer and then ‘promote.Lesson 6-2. Source Qualifier transformations cannot be reusable. Drag and drop them in any mapping to make a shortcut and then override the properties as needed.

repoleveD I leveL 8 retneCrewoP acitamrofnI s n o i t a m r o f s n a rT e l b a s u e R d n a s p u k o o L : 6 t i n U 831 .

The files do not contain employee salary information. Goals ♦ Practice using Reusable Expression and Lookup to Flat File Duration 45 Minutes 931 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U . concatenate first name and last name. Technical Description We have three text files coming in daily with employee information that we would like to put into a file list. We also must reformat some of the other fields. so we must find each employee's salary. We must read each of these files individually and load them to the staging area. We need to find a salary for each employee. change the format of age and phone number and add a load date.Unit 6 Lab A: Load Employee Staging Table Business Purpose Information about Mersche Motors employees is saved to three text files each day.

s ei r ala s y r al as _p kl X SE EY OL PM E_ GTS y e K e uq i n U tr e sn I e tele D xx U B DT e t a dp U r en w O a m e h c S tsil eliF .tx t .t uo yal _s e eyo lp m e ni d nu o f eb na c s eli f t alf eh t f o tu oy al e hT .t se w _s eey ol p me .t sil_ se ey ol pm e tsi lel if a gni su n ois ses eh t o tn i da e r e b lli w sel if t al f d eti mil e d am m oc 3 e se hT s eliFc r S\s eli f mp \: C txt .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U 041 ed i r r e v O L Q S / r e t l iF DI _ EE YOL P ME _ NI = DI _E EYO L PM E sel iFpk L \se lif m p\ : C ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL n o i t a co L tx t. da e r e b l li w tsil e liF 9 01 el ba t el ca rO y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M d ao L / s wo R m e t s y S t e gr aT 901 eli f t alF xx _S EE YOL P ME _GTS _ m LOOKUPS e m a N e lb aT s e lb aT TARGETS e m a N e l iF s e l iF SOURCES Velocity Deliverable: Mapping Specifications .d et t am r o fe r e b lli w a ta d ec r u os .t xt . tsa e _s eey ol p me .l a r tn ec _s eey ol p me o f n I e l i F l an o i t id d A d e t i m i l e D /d e x iF no i t a c oL e l iF sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D dneppA tegraT yli a D . tsil _s eey ol p me d e timi le D s eliFc r S\s eli f mp \: C tx t. de d da eb lli w e ey ol pm e hc a e r of n oi ta m r of ni y ral as dn a d ed d a e b ll iw et a d da ol a . tx t. txt . t uoy al _s ee yol p me ni n oiti ni fe D t xt .

141 tegraT noisserpxE r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U pukooL ecruoS . For each employee id.HIGH LEVEL PROCESS OVERVIEW PROCESSING DESCRIPTION (DETAIL) The mapping will read from three flat files contained in a file list. First name and last name will be concatenated. Age and phone number will be reformatted before loading into the STG_EMPLOYEES Oracle table. we will find the corresponding salary.

3 0 ot 3 9 4. 0 ot 4 9 5. s ) e m p ol y e e s _ al y o ut E M P L O Y E E _I D T h e C U S T _ A G E _ G R O U P si U F N It. K n e e d s ot b e M a el F. h e v a dli a g e d e r vi e d r of m ht e d e c o d ni g of n u m b e r ( p.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U 241 S T G _ E M P L O Y E E S R E G OI N A L _ M A N A G E R S T G _ E M P L O Y E E S P O S TI OI N _ T Y P E S T G _ E M P L O Y E E S T E R _ L A N G _ D E S C S T G _ E M P L O Y E E S S E C _ L A N G _ D E S C S T G _ E M P L O Y E E S N A T VI E _ L A N G _ D E S C S T G _ E M P L O Y E E S A G E _ G R O U P S T G _ E M P L O Y E E S E M P L O Y E E _ G E N D E R S T G _ E M P L O Y E E S E M P L O Y E E _ E M A LI S T G _ E M P L O Y E E S E M P L O Y E E _ F A X _ N M B R v a r c h a r 2 e m p ol y e e s _ al y o ut F A X _ N U M B E R S T G _ E M P L O Y E E S E M P L O Y E E _ P H O N E _ N M B R v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d S T G _ E M P L O Y E E S E M P L O Y E E _ C O U N T R Y v a r c h a r 2 e m p ol y e e s _ al y o ut C O U N T R Y S T G _ E M P L O Y E E S E M P L O Y E E _ Z PI _ C O D E S T G _ E M P L O Y E E S E M P L O Y E E _ S T A T E S T G _ E M P L O Y E E S E M P L O Y E E _ C TI Y S T G _ E M P L O Y E E S E M P L O Y E E _ A D D R E S S v a r c h a r 2 e m p ol y e e s _ al y o ut A D D R E S S S T G _ E M P L O Y E E S E M P L O Y E E _ N A M E S T G _ E M P L O Y E E S E M P L O Y E E _I D T a r g e t T a bl e T a r g e t C o ul m n SOURCE TO TARGET FIELD MATRIX v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d v a r c h a r 2 e m p ol y e e s _ al y o ut E M A LI v a r c h a r 2 e m p ol y e e s _ al y o ut S T A T E v a r c h a r 2 e m p ol y e e s _ al y o ut C TI Y v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d D a t a t y p e S o u r c e Fi el S o u r c e C o ul m n e m p ol y e e s _ al y o ut R E G OI N A L _ M A N A G E R e m p ol y e e s _ al y o ut P O SI T OI N _ T Y P E e m p ol y e e s _ al y o ut T H RI D _ L A N G U A G E e m p ol y e e s _ al y o ut S E C O N D _ L A N G U A G E e m p ol y e e s _ al y o ut N A T VI E _ L A N G U A G E a n d G r e a et r ht a n 6 0 2 9. e m a el o r G E N D E R si c u r r e nt yl e hti e r M o r ( 9 9 9 ) 9 9 9 9 9 9 9. 0 ot 6 0 g r o u p s a r e el s s ht a n 2 0 2. s ) e m p ol y e e s _ al y o ut Z PI _ C O D E n u m b e r ( p. a n d n e e d s ot b e r e of r m a ett d ot si ni ht e of r m a ot 9f 9 9 9 9 9 9 9 9 9 T h e P H O N E _ N U M B E R c o ul m n L a s Nt a m e C o n c a et n a et Fi r s Nt a m e a n d E x p r e s s oi n N V ul al l u e fi D e f a ul t . 0 ot A G E c o ul m n T.

t . A S a al r y efi dl of r e a c h E m p ol y e e E x p r e s s oi n N V ul al l u e fi D e f a ul t .341 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U S T G _ E M P L O Y E E S D A T E _ E N T E R E D S T G _ E M P L O Y E E S H RI E _ D A T E S T G _ E M P L O Y E E S E M P L O Y E E _ S A L A R Y S T G _ E M P L O Y E E S D E A L E R S H PI _ M A N A G E R v a r c h a r 2 S T G _ E M P L O Y E E S D E A L E R S H PI _ DI T a r g e t T a bl e T a r g e t C o ul m n d a et d a et D a t a t y p e S o u r c e Fi el S o u r c e C o ul m n e m p ol y e e s _ al y o ut D A T E _ E N T E R E D e m p ol y e e s _ al y o ut H RI E _ D A T E n u m b e r ( p. s ) e m p ol y e e s _ al y o ut D E A L E R S H PI _ DI DI c a n b e of u n d ni s a al r ei s xt. s ) e m p ol y e e s _ al y o ut D e r vi e d e m p ol y e e s _ al y o ut D E A L E R S H PI _ M A N A G E R n u m b e r ( p.

import the STG_EMPLOYEES table. Save the repository.3 . Make sure that you import the field names from the first line. .1 Step 2: Create a Relational Target Definition In the Target Designer.2 . Your target definition should look the same as Figure 6-2. Import employees_layout. This decreases development time and keeps the mappings consistent.2-6 erugiF noitinifed elif talf tuoyal_seeyolpme eht fo weiv rezylanA ecruoS .Instructions Step 1: Create a Flat File Source Definition Launch the Designer client tool (if it is not already running) and log into the PC8_DEV repository. Your source definition should look the same as displayed in Figure 6-1.2 .1-6 erugiF Open the mapping m_Stage_Customer_Contacts_xx.txt comma delimited flat file into your student folder.1 . Save the repository. :e c it ca r P ts e B y ti co l eV repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U noitinifed elbat lanoitaler SEEYOLPME_GTS eht fo weiv rengiseD tegraT . Step 3: Step Three: Create a Reusable Transformation A Velocity Design best practice is to use as many reusable transformations as possible. 441 .1 .

. 541 elbasuer noitamrofsnart a ekam ot woh gniwohs xob golaid tide noitamrofsnarT . Can you change anything here? Why are you unable to make changes? Open the Transformation Developer by clicking the respective icon in the toolbar.Edit exp_Format_Name_Gender_Phone and check the Make reusable box on the Transformation tab. .4 .3 . What differences do you now see? Select the Ports tab.3-6 erugiF Click Yes when you see the popup box.5-6 erugiF elbisreverri si noitca eht wonk uoy gnittel xob noitseuQ .5 . noitamrofsnart elbasuer a fo xob golaid tide noitamrofsnarT . r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U : p iT .6 Converting a transformation to reusable is nonreversible.4-6 erugiF Review the Transformation dialog box.2 . The Transformation will now be saved in the Transformations node within the Navigator window and will be available as a standalone object to drag into any mapping as a shortcut.

Your mapping should appear similar to Figure 6-7. It is a Velocity recommendation that reusable transformations use the prefix re. Change the name of the OUT_CUST_NAME port to OUT_NAME.7 .6-6 erugiF Drag exp_Format_Name_Gender_Phone into the Transformation Developer workspace.1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U edon snoitamrofsnarT eht gnitciped wodniw rotagivaN . Select the Ports tab.8 .01 . locate the Transformations node in your respective student folder. Edit exp_Format_Name_Gender_Phone and add the prefix re_ to rename it to re_exp_Format_Name_Gender_Phone_Load_Date.3 . Step 4: Create a Mapping Open the Mapping Designer by clicking the respective icon in the toolbar.From the Navigator Window.9 . . Create a new mapping named m_STG_EMPLOYEES_xx. Click OK. . Add STG_EMPLOYEES relational target to the new mapping.11 . Add employees_layout. Shortcuts should have the prefix sc (or SC if you prefer).txt flat file source to the new mapping.c . 641 .7-6 erugiF . Change the name of the OUT_CUST_PHONE port to OUT_PHONE.2 .4 Save the repository.a :e c it ca r P ts e B y ti co l eV tegrat dna ecruos htiw gnippam laitraP .b .

4 . your instructor will specify.6 .txt. This will create a new Lookup Transformation. If the file is located in a different directory.3 . Select the Import field names from first line check box. Click Next.5 . Confirm that the Delimited option button is selected. r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U . .01-6 erugiF xob golaid noitacol elbat noitamrofsnarT pukooL . Your Wizard should appear similar to Figure 6-10. The Flat File Import Wizard will appear.Step 5: Create a Lookup Transformation Select the Lookup transformation tool bar button located on the Transformations tool bar with a single left click.2 .1 . Choose Import > From Flat File for the location of the Lookup Table.8-6 erugiF Move your mouse pointer into the Mapping Designer Workspace and single click your left mouse button. The selected icon in Figure 6-8 identifies the Lookup tool button.7 741 draziW tropmI eliF talF pets 3 eht fo 1 xob golaiD .9-6 erugiF rablooT noitamrofsnarT . Locate the c:\pmfiles\LkpFiles directory and select the file salaries.

Velocity naming conventions specify to name Lookup transformations lkp_LOOKUP_TABLE_NAME. Select the Add a new condition button.71 .21 .11 .81 .61 . These were imported from the first line of the file. Click Finish. It is a Velocity best to Prefix all input ports to an Expression or Lookup with :e c it ca r P ts e B y ti co l eV Uncheck the output port for IN_EMPLOYEE_ID. Edit the Lookup Transformation.41 . 841 . Rename it to lkp_salaries.9 Drag and drop EMPLOYEE_ID from SQ_employees_layout to the new Lookup Transformation. IN_.11-6 erugiF Click on the Ports tab. Click Next. Rename EMPLOYEE_ID1 to IN_EMPLOYEE_ID. :e c it ca r P ts e B y ti co l eV .Confirm that only the Comma check box under Delimiters is selected. Select the Condition tab.91 .51 . repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U noitamrofsnarT pukooL detaerc ylwen eht fo weiv lamroN . PowerCenter will choose the first lookup port and the first input port automatically.31 .01 . Select the No quotes option button under Text Qualifier.8 . Confirm that your Lookup Transformation appears as displayed in Figure 6-11. Confirm that the field names are displayed under Column Information.

2 .3 Save the repository. under Transformations node. Save the repository.Your condition should look similar to Figure 6-12. r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U .12 .1 941 xob noitidnoc noitamrofsnarT pukooL . Step 6: Add a Reusable Expression Transformation In the Navigator Window. click and drag re_exp_Format_Name_Gender_Phone_Load_Date into the Mapping Designer Workspace. Step 7: Link Transformations Link the following ports from SQ_employees_layout to the STG_EMPLOYEES target: EMPLOYEE_ID ADDRESS CITY STATE ZIP_CODE COUNTRY FAX_NUMBER EMAIL NATIVE_LANGUAGE SECOND_LANGUAGE THIRD_LANGUAGE POSITION_TYPE DEALERSHIP_ID REGIONAL_MANAGER DEALERSHIP_MANAGER HIRE_DATE DATE_ENTERED EMPLOYEE_ID EMPLOYEE_ADDRESS EMPLOYEE_CITY EMPLOYEE_STATE EMPLOYEE_ZIP_CODE EMPLOYEE_COUNTRY EMPLOYEE_FAX_NMBR EMPLOYEE_EMAIL NATIVE_LANG_DESC SEC_LANG_DESC TER_LANG_DESC POSITION_TYPE DEALERSHIP_ID REGIONAL_MANAGER DEALERSHIP_MANAGER HIRE_DATE DATE_ENTERED . Link the Following ports from lkp_SALARIESto STG_EMPLOYEES: SALARY EMPLOYEE_SALARY .21-6 erugiF Click OK.02 .

Select m_STG_EMPLOYEES_xx from the Mapping list box and click OK.31-6 erugiF .4 . Create a session task using the session task tool button. Edit the s_m_STG_EMPLOYEES_xx session.6 . Set the relational target connection object property to NATIVE_STGxx where xx is your student number. Check the property Truncate target table option in the target properties.6 . Open the Workflow Designer tool and create a new workflow named wkf_STG_EMPLOYEES_xx.7 Link the following ports from re_exp_Format_Name_Gender_Phone_Load_Date to STG_EMPLOYEES: OUT_NAME OUT_PHONE OUT_GENDER OUT_AGE_GROUP EMPLOYEE_NAME EMPLOYEE_PHONE_NMBR EMPLOYEE_GENDER AGE_GROUP Save the repository. Under the Mapping tab: ♦ ♦ ♦ Confirm that Source file directory is set to $PMSourceFileDir\. Your Mapping | Source | Properties | Attributes should be the same as Figure 6-13. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U tsil elif tsil_eeyolpme eht rof seitreporp ecruoS . Link the Start object to the s_m_STG_EMPLOYEES_xx session task object. In Properties | Attribute | Source filename type in employees_list.5 .1 . 051 .5 .2 . In Properties | Attribute | Source filetype click the drop-down arrow and change the default from Direct to Indirect.3 . Step 8: Create and Run the Workflow Launch the Workflow Manager client and sign into your assigned folder.txt.Link the following ports from SQ_employees_layout to re_exp_Format_Name_Gender_Phone_Load_Date: FIRSTNAME LASTNAME PHONE_NUMBER GENDER AGE IN_FIRSTNAME IN_LASTNAME IN_PHONE_NUMBER IN_GENDER AGE ♦ ♦ ♦ Select STG_EMPLOYEES located under the Target folder in the navigator window.4 .

Start the workflow.11 . Verify the Lookup source file directory is $PMLookupFileDir\.8 .21 .♦ ♦ ♦ . Type salaries.txt in the Lookup filename.51-6 erugiF nur noisses detelpmoc eht fo sliateD ksaT .9 Select lkp_salaries from the Transformations folder in the navigator window.41-6 erugiF Review the Source/Target Statistics.01 . Check Validate messages to ensure your workflow is valid. r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U . Save the repository. Review the Task Details 151 nur noisses detelpmoc eht fo scitsitatS tegraT/ecruoS .

not all rows and columns are shown. .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U 251 :e to N elbat tegrat SEEYOLPME_GTS eht fo weiverP ataD .61-6 erugiF Use Preview Data feature in the Designer to view the data results.31 .

351 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g at S e e y ol p m E d a o L : A b a L 6 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E d a o L : A b a L 6 t i n U 451 .

whether the date is a weekday or a weekend. Duration 30 minutes 551 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U . such as the month name. Goals ♦ ♦ ♦ ♦ Copy an Expression transformation to convert a string date to various descriptive date columns. Technical Description To load the date staging area. The raw dates are in a flat file. and so forth. we will use Informatica date functions and variables to transform a date value and date id. Understand the evaluation sequence of input. output.Unit 6 Lab B: Load Date Staging Table Business Purpose The date staging area in the operational data store must be loaded with one record for each date covered in the data marts. Use the Expression Editor to create or view expressions and become familiar with date function syntax. Each date must be described with the date attributes used in the data mart. quarter number. and variable ports. Learn how to use variable ports.

se t ad e m a N e l iF s e l iF SOURCES Velocity Deliverable: Mapping Specifications . ae r a g ni ga ts e t ad ru o o t d aol dn a n oi tal u pin a m e ta d o d o t no iss e rpx e n a h g uo r ht nu r lli w eli f tx e t A 9 10 4 elb a t elc a rO d ao L / s w o R m e t s y S t e g r aT HIGH LEVEL PROCESS OVERVIEW SETAD_GTS e tele D e t a dp U r en w O a m e h c S e m a N e lb aT s e lb aT s eliFc r S\s eli f mp \: C no i t a c oL e l iF sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D dneppa tegraT ecn O 91 0 4 eli f t alF xx_SETAD_GTS_m y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M TARGETS tx t.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U 651 tegraT noisserpxE ecruoS X y e K e uq i n U tr e sn I r e timi le d a mm o C d e timi le D o f n I e l i F l an o i t id d A d e t i m i l e D /d e x iF .

751 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U S T G _ D A T E S Q U A R T E R _ O F _ Y E A R S T G _ D A T E S W E E K E N D _ NI D CI A T O R d a et s xt.t d e r vi e d T h e y e a r n u m b e r o v e r al . S T G _ D A T E S Y E A R _ O V E R A L L S T G _ D A T E S M O N T H _ O V E R A L L S T G _ D A T E S W E E K _ O V E R A L L S T G _ D A T E S D A Y _ O V E R A L L S T G _ D A T E S W E E K _ O F _ Y E A R S T G _ D A T E S M O N T H _ O F _ Y E A R S T G _ D A T E S D A Y _ O F _ Y E A R S T G _ D A T E S M O N T H _ N A M E S T G _ D A T E S D A Y _ N A M E S T G _ D A T E S D A Y _ O F _ W E E K S T G _ D A T E S Y E A R _ V A L U E S T G _ D A T E S M O N T H _ N U M B E R S T G _ D A T E S D A Y _ O F _ M O N T H S T G _ D A T E S D A T E _ V A L U E S T G _ D A T E S D A T E _ DI _ L E G A C Y T a bl e T a r g e t T a r g e t C o ul m n d a et s xt. E X 1 3 6 5 d a et s xt.t d e r vi e d T h e m o n ht n u m b e r o v e r al . d a et s xt. The Expression transformation is used to derive the different date values.t d e r vi e d T hi s afl g w ill etl ul s w h e ht e r ht e r e c o r d d a et si a w e e k d a y.t d e r vi e d T h e y e a r of r e a c h r e c o r d.t d e r vi e d T h e w e e k n u m b e r o v e r al . X T U E S D A Y SOURCE TO TARGET FIELD MATRIX d a et s xt. d a et s xt. d a et s xt.t d e r vi e d T hi s afl g w il etl ul s w h e ht e r ht e r e c o r d d a et si a w e e k e n d. S T G _ D A T E S H O L DI A Y _ NI D CI A T O R d a et s xt. d a et s xt.t D e r vi e d R e of r m at ht e D A T E c o ul m n ot M M D/ D Y/ Y Y Y d a et s xt. S T G _ D A T E S W E E K D A Y _ NI D CI A T O R d a et s xt. S T G _ D A T E S W O R K D A Y _ NI D CI A T O R d a et s xt.t d e r vi e d T h e m o n ht n a m e of r ht e r e c o r d.t d e r vi e d T hi s afl g w lil etl ul s w h e ht e r ht e r e c o r d d a et si a h o dil a y.t d e r vi e d T h e m o n ht n u m b e r of ht e y e a r.l d a et s xt. d a et s xt. d a et s xt. d a et s xt.t D A T E _ DI Fi el C o ul m n E x p r e s s oi n S o u r c e S o u r c e PROCESSING DESCRIPTION (DETAIL) fi N ul l Q u al t yi V a ul e sI s u e s/ D e f a ul t D a t a This mapping will generate the date staging table from the dates text file.t d e r vi e d T h e d a y n u m b e r of ht e y e a r of r ht e r e c o r d.l d a et s xt.t d e r vi e d T h e w e e k n u m b e r of ht e y e a r of r ht e r e c o r d.l d a et s xt.t d e r vi e d T h e d a y of ht e w e e k of r ht e r e c o r d.t d e r vi e d T h e q u a r et r n u m b e r of ht e y e a r. d a et s xt.t d e r vi e d T h e d a y n u m b e r o v e r al .t d e r vi e d T hi s afl g w lil etl ul s w h e ht e r ht e r e c o r d d a et si a w o r k d a y. .t d e r vi e d T h e n a m e of ht e d a y of r ht e r e c o r d. d a et s xt.t d e r vi e d T h e c u r r e n dt a y of ht e c u r r e n mt o n ht E.t d e r vi e d T h e m o n ht n u m b e r of ht e y e a r of r ht e r e c o r d.

Fi el C o ul m n E x p r e s s oi n S o u r c e S o u r c e fi N ul l Q u al t yi V a ul e sI s u e s/ D e f a ul t D a t a .t S T G _ D A T E S S E A S O N T a bl e T a r g e t T a r g e t C o ul m n d a et s xt.t d e r vi e d y e a r.t d e r vi e d F al g t o ni d ci a t e t h e c u r r e n t d a t e si al st d a y o tf h e q u a rt e r.t d e r vi e d Fl a g ot ni di c a et ht e c u r r e n dt a et si al s dt a y of ht e m o n h. Fl a g ot ni di c a et ht e c u r r e n dt a et si ht e al s dt a y of ht e d a et s xt.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U 851 S T G _ D A T E S L A S T _ D A Y _ NI _ Y E A R S T G _ D A T E S L A S T _ D A Y _ I N _ Q U A R T E R d a t e s xt. S T G _ D A T E S L A S T _ D A Y _I N _ M O N T H d a et s xt.t d e r vi e d T h e c u r r e nt s e a s o n.

1 . Import the dates. Add the STG_DATES target to the mapping.71-6 erugiF T Expand the DEV_SHARED folder. :e to N 951 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U .2 .d .4 .5 Step 2: Create a Relational Target Definition Import the STG_DATES table using the Target Designer. click “Yes. Save the repository.Instructions Step 1: Create a Flat File Source Definition Launch the Designer (if it is not already running) and connect to the PC8_DEV repository.a .2 .it will be converted in the mapping.1 . select the re_exp_STG_DATES. With your left mouse button.2 . Expand the Transformations subfolder. .c .1 . Note: Treat date as a string . drag the transformation toward your mapping but DO NOT DROP IT.3 . Make sure that you import the field names from the first line.txt comma delimited flat file source using the Flat File Wizard.b . Add dates flat file source to the mapping. Step 3: Create a Mapping Create a new mapping named m_STG_DATES_xx.4 . try again and make sure that you hold down the Ctrl key continuously as you drop the transformation into the mapping. Hold down the Ctrl key. If a Copy Confirmation message box appears. snoitinifed tegra dna ecruoS htiw gnippaM . Drop the transformation into the mapping.” If the confirmation box says “Shortcut” instead of “Copy”. Open your student folder. Save the repository. Your mapping should appear similar to Figure 6-17.e .3 .

such as the day of the week. 061 . the month. matching the names. variable.6 .01 . If you wish. Examine the structure of the Expression transformation ports and expressions. Variable ports were used in this transformation because they will be resolved one at a time. and then output. You can use PowerCenter Help to view the syntax for any function. Note that the DATE_ID is an integer that is passed directly to the target table unchanged. Use the “Autolink” feature to link the output ports in the Expression transformation to the corresponding fields in the target definition . etc.9 Edit the Expression transformation and click on the Ports tab. The variable ports will process that string in various ways in order to extract a specific descriptor. Most of these output ports simply call a variable port. whether the date is a holiday.11 . the quarter. top to bottom.8 . so it is important to put them in a specific order. Informatica evaluates ports in the following order: input/output (input only as well). ask your instructor for clarification on any of the expressions. These descriptors will later be used in the data warehouse to group and filter report data. 2005'. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U : p iT gnippaM detelpmoC .Link the two output ports on the Source Qualifier to the two input ports on the Expression transformation. Variables are evaluated in top down order. Examine some of the variable port expressions and see if you can determine how they work. The input port DATE supplies a string that describes an individual date. such as 'May 20. Save the mapping and confirm it is valid. some of the later expressions are dependent on the results of the earlier expressions. Note that variable ports cannot be output ports. Your mapping will appear the same as in Figure 6-18.7 .by Position.81-6 erugiF . so a separate set of output ports is used at the bottom of the transformation in order to output the data to the target. In this case.

91-6 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U . Create a session named s_m_STG_DATES_xx that uses the m_STG_DATES_xx mapping. 161 nur noisses detelpmoc eht fo sliateD ksaT .3 .txt extension.1 .c .4 . Ensure that the Source Filename property value includes the .2 .1 .a .5 .f Complete the workflow by linking the Start task to the session task. . Select the Source Qualifier icon SQ_dates.2 . Edit the session you just created.d . Select the target STG_DATES.7 . Review the Task Details.3 Step 5: Run the Workflow and Monitor the Results Start the workflow.6 . . In the Properties area scroll down and confirm the source file name and location. Select the option “Truncate target table”. Select your appropriate target connection object. Create a new workflow named wkf_Load_STG_DATES_xx.b .e . Open your student folder.Step 4: Create a Workflow and a Session Task Launch the Workflow Manager application (if it's not already running) and connect to the PC8_DEV repository. Save the repository. Select the Mapping tab. Maximize the Workflow Monitor and select the Task View. Your information should appear the same as in Figure 6-19.

4 Review the Source/Target Statistics.02-6 erugiF . .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U 261 nur noisses eht rof scitsitatS tegraT/ecruoS .

. Use the Preview Data feature in the Designer to view the data results.361 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U thgir dellorcs 2 neercs .elbat SETAD_GTS eht fo weiverp ataD .22-6 erugiF 1 neercs .12-6 erugiF Data Results Your results should appear similar to those in Figure 6-21 through Figure 6-22.elbat SETAD_GTS eht fo weiverp ataD .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e t a D d a o L : B b a L 6 t i n U 461 .

Integration Service must be running before starting a Debug Session.view target data. you should be able to: ♦ ♦ Describe the Debugger Use the Debugger to troubleshoot a mapping problem Lesson 7-1. Debugging Mappings The Debugger is a wizard-driven Designer tool that runs a test session. Monitor the Debugger: ♦ ♦ ♦ 561 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reg gubeD : 7 tinU .view transformation data.Unit 7: Debugger After completing this unit. Choose an existing session or define a one-time debug session.view Debug or Session log. Options: ♦ ♦ . Target Instance window . Transformation Instance Data window .stops when the Integration Service is ready. A spinning Debugger Mode icon is displayed . Start the Debugger.2 Load or discard target data Save debug environment for later use Output window .3 .1 .

4 . Runs until it reaches the next transformation or satisfies a breakpoint condition. Break now.Move through the session . Runs until it satisfies a breakpoint condition. Change data Change variable values Add or change breakpoints Modify data and breakpoints. Runs until it reaches the selected transformation instance or satisfies a breakpoint condition. Continue. Show current instance. you can modify: ♦ ♦ ♦ 661 .5 Next Instance. Displays the current instance in the Transformation Instance window. When the Debugger pauses. Step to Instance. Pauses wherever it is currently processing.menu options include: ♦ ♦ ♦ ♦ ♦ repoleveD I leveL 8 retneCrewoP acitamrofnI reggubeD :7 tinU .

761 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reg gubeD : 7 tinU .

repoleveD I leveL 8 retneCrewoP acitamrofnI reggubeD :7 tinU 861 .

Duration 30 minutes 961 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reggubeD eht gnisU : baL 7 tinU . Objectives ♦ ♦ Use the Debug Wizard. This error must be found and corrected so the data warehouse project will be successful. Technical Description The Debugger will be used to track down the cause of the error or errors. Use the Debug Toolbar.Unit 7 Lab: Using the Debugger Business Purpose The m_STG_DATES_DEBUG mapping contains at least one error that results in bad data loaded into the target table.

noisserpxE X tr e sn I e tele D d e timi le D s eliFc r S\s eli f mp \: C d e t i m i l e D /d e x iF no i t a c oL e l iF d a oL / sw o R m e t s y S t eg r aT GUBED_SETAD_GTS_m Processing Description (Detail) ecruoS High Level Process Overview WEIV_SETAD_GTS e t a dp U r en w O a m e h c S e m a N e lb aT s e lb aT e m a N e l iF s e l iF sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D dneppa tegraT ecn O y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M 91 0 4 eli f t alF Targets tx t.a e r a g nig a ts e ta d r u o d aol dn a n oi tal u pin a m e ta d o d o t no it am r o fsn a r t n oiss e rp xE n a h gu o r ht n u r si eli f tx e t A 91 0 4 el b at e lca r O This mapping will generate the date staging table from the dates text file.repoleveD I leveL 8 retneCrewoP acitamrofnI r e g g u b e D e h t g n i s U : b a L 7 ti n U 071 tegraT y e K e uq i n U r e timi le d a mm o C o f n I e l i F l an o i t id d A . se t ad Sources Velocity Deliverable: Mapping Specifications .

t S T G _ D A T E S _ V EI W D A T E _ V A L U E d a et s xt.171 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reggubeD eht gnisU : baL 7 tinU S T G _ D A T E S _ V EI W Y E A R _ V A L U E d a et s xt.t S T G _ D A T E S _ V EI W D A Y _ O F _ M O N T H d a et s xt.t S T G _ D A T E S _ V EI W M O N T H _ N U M B E R d a et s xt.t S T G _ D A T E S _ V EI W D A T E _ DI _ L E G A C Y d a et s xt.t T a r g e t T a bl e Source To Target Field Matrix T a r g e t C o ul m n S o u r c e Fi el d e r vi e d d e r vi e d d e r vi e d d e r vi e d d e r vi e d D A T E _ DI C o ul m n S o u r c e Y e a r of r e a c h r e c o r d N a m e of ht e m o n ht M o n ht n u m b e r of ht e y e a r m o n ht C u r r e n dt a y o cf u r r e nt M M D/ D Y/ Y Y Y R e of r m at ot E x p r e s s oi n fi N ul l V a ul e D e f a ul t .t S T G _ D A T E S _ V EI W M O N T H _ N A M E d a et s xt.

it cannot help you determine why a mapping is invalid.without using the Debugger.2 Save the Repository. Press the Next button. if the error cannot be located in a timely fashion in this manner.b : p iT : p iT repoleveD I leveL 8 retneCrewoP acitamrofnI r e g g u b e D e h t g n i s U : b a L 7 ti n U . Open the mapping in your workspace. Locate the mapping m_STG_DATES_DEBUG and copy it to your folder. Get an overall idea what kind of processing is being done. you must first understand the logic of the mapping. In order to properly use the Debugger. Read each of the expressions in the Expression transformation.3 . The first page of the Debug Wizard is informational. Note that the mapping is a simplified version of the one used in Unit 6 Lab B.1 .a . Please read it. This evokes the Debug Wizard. The Designer Output Window will show you the reason(s) why a mapping is invalid. . 271 .a . The Debugger requires a valid mapping and session to run. Many mapping errors can be found by carefully inspecting the mapping .b . However.Instructions Step 1: Copy and Inspect the Debug Mapping Expand the DEV_SHARED folder.2 .1 . the Debugger will assist you by showing the actual data passing through the transformation ports. If a source or target conflict occurs choose Reuse. without any further clarification as to the nature of the error. Step 2: Step Through the Debug Wizard Press your F9 key. You have been told only that there is an “error” in the data being written to the target.

The debugger data will be discarded in a later step so this value will be ignored.2-7 erugiF 371 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reggubeD eht gnisU : baL 7 tinU .Create a debug session instance for this mapping. Set the Target Connection Value to your target schema database connection object.txt. verify you enter dates. This information is familiar to you from creating sessions. and press the Next button. Your Wizard should appear as in Figure 7-2 below. xob golaid noitaerc noisseS gubeD . In this lab. except that here it is a subset of the regular session options and is formatted somewhat differently.txt extension.3 .Your Wizard should appear similar to Figure 7-1 below. Select the Properties tab at the bottom.4 ♦ ♦ Ensure that the Source Filename property values includes the . Accept the default setting . Ensure that the Target load type property value is set to Normal . xob golaid snoitcennoc noisseS gubeD .1-7 erugiF The next page of the Wizard allows you to set connectivity properties.

the appearance of the Designer interface will change.Press the Next button. As mentioned earlier. a Debug session will be created and it will initialize. so press Next again. No data will be read until we are ready to view it. The term instance is sometimes used as a synonym for transformation. Note that three window panes are visible at the bottom third of the screen. Accept the defaults here as well. The debugger can be controlled via the Designer menu. We will manually control the debugger so we can easily review the data values and spot the error. opening the required database connections. Set the Target Instance and Instance drop-boxes as shown in Figure 7-3 as well. 471 . The final Wizard page allows us to choose whether or not to discard the target data (the default) and choose which target data to view.8 .6 . When you press the Finish button.1 Step 3: Use the Debugger to Locate the Error When the Debug Wizard Finish button is pressed. via hotkeys (described in the menu). Accept the defaults on the Session Configuration Wizard page and press Next. and it will likely require some minor adjustment to make it more readable.7 . We will use the toolbar. Adjust the horizontal dividers with your mouse until what you see resembles Figure 7-3.3-7 erugiF :e to N . repoleveD I leveL 8 retneCrewoP acitamrofnI r e g g u b e D e h t g n i s U : b a L 7 ti n U noisseS gubeD a gninnur elihw rengiseD . the Debug session is initialized at this point but no data is read. or with the Debug Toolbar.5 . We will not be overriding transformation properties.9 .

look for the red “stop sign” on the right.e. and the first row has been “pushed” into the Expression transformation and the Target table. another toolbar has shifted it off the screen.5 .2 . You will see the dialog box shown in Figure 7-4. The Debug Toolbar is short.5-7 erugiF You can cause one row of data to be read by the Source Qualifier by pressing the third toolbar button . it follows the row). Toggle the Instance drop-box to the Expression transformation.. r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reggubeD eht gnisU : baL 7 tinU : p iT . Note that some data is shown in the Instance window. 571 xoB golaiD srablooT ezimotsuC .6 . :e to N Press the fourth toolbar button . Press the Next Instance toolbar button (third) several times. No data available means null in the Debugger. The Instance window jumps between the Source Qualifier and the Expression (i. To make it visible. rablooT reggubeD .7 . .The Debug Toolbar is not visible by default.8 if you cannot find the Debugger Toolbar after using the menu option to select it. The data has not yet gone that far.4 . Click OK.tooltip Next Instance.3 .” Note that one more row has been read. one more row is read and one more row (the row that was read from the previous press) is loaded into the target.tooltip “Step to Instance. it appears as in Figure 7-5. Note that each time it is pressed.4-7 erugiF Select the Debugger toolbar. select the menu option Tools > Customize. When it is undocked. Re-arrange the other docked toolbars until you can see it. If you cannot see it right away.

Confirm that the data being sent to the target is now correct. Stop the Debugger by pressing the second toolbar button. What is the error? Hint: compare the values with the actual date being read from the source file.01 . Note that it also causes one row to be read and written.2 . Fix the mapping error. Step 4: Fix the Error and Confirm the Data is Correct When you have found the error.5 Now that you are familiar with the basics of operating the Debugger.1 . but the Instance window shows only the data in one transformation .9 . Note that your Debug session properties (such as connectivity) have been saved locally. Examine the data being sent to the target. repoleveD I leveL 8 retneCrewoP acitamrofnI r e g g u b e D e h t g n i s U : b a L 7 ti n U . Press Yes. 671 .4 . Save the Repository.Press the Step to Instance toolbar button (fourth) several times. making it easier for you to evoke the Debugger again if needed.3 . The mapping properties are grayed-out because there is an “in-use” lock on the mapping. locate the cause of the error. Re-start the Debug Wizard as in Step 2.the one chosen in the drop-box. you will not be able to fix it while the Debugger is running (try it).

771 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I reggubeD eht gnisU : baL 7 tinU .

repoleveD I leveL 8 retneCrewoP acitamrofnI r e g g u b e D e h t g n i s U : b a L 7 ti n U 871 .

Typically connect the “NEXTVAL” port to generate a new key. you should be able to: ♦ ♦ Describe the Sequence Generator transformation Use the Sequence Generator transformation in a mapping Lesson 8-1. pass the output of the Sequence Generator to an Expression transformation before connecting it to a target. 971 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I rotarene G ecn euqeS : 8 tinU . Description The Sequence Generator Transformation generates unique numeric values that can be used to create keys. To use the same value for each target. When connected to multiple targets the output of the Sequence Generator generates sequential values for each target. The values created by the sequence generator are sequential but not guaranteed to be contiguous. The Sequence Generator is an “output” only transformation with two outputs represented by the “NEXTVAL” and “CURRVAL” ports. Sequence Generator Transformation Type Passive.Unit 8: Sequence Generator After completing this unit.

repoleveD I leveL 8 retneCrewoP acitamrofnI r o t ar e n e G e c n e u q e S : 8 t i n U 081 For more details. see the online help. Properties .

Example The following example shows a partial mapping where the sequence generator is used to generate a new key for the Dates dimension table. A sequence generator is used to create surrogate keys to maintain referential integrity within the dimension table since a customer may have duplicate entries.Business Purpose A business receives customer information which is used to update a data warehouse customer dimension table with a customer history. Performance Considerations It is best to configure the Sequence Generator transformation as close to the target as possible in a mapping otherwise a mapping will be carrying extra sequence numbers through the transformation process which will not be transformed. 181 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I rotarene G ecn euqeS : 8 tinU .

repoleveD I leveL 8 retneCrewoP acitamrofnI r o t ar e n e G e c n e u q e S : 8 t i n U 281 .

Unit 8 Lab: Load Date Dimension Table
Business Purpose
The Mersche Motors data warehouse has a date dimension table that needs to be loaded. The date dimension needs to be loaded before any of the other dimension tables.

Technical Description
PowerCenter will extract the dates from a shared relational table and load them into a shared relational table. All columns in the source table have matching columns in the target table. A primary key for the target table will be assigned using the Sequence Generator transformation.

Goals
♦ ♦ ♦

Create sources and targets based on shortcuts Create a Sequence Generator transformation Create unique integer primary key values using the NEXTVAL port

Duration
20 Minutes

381

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

481

The Sequence Generator transformation will be used to assign unique integer values for the DATE_KEY field as rows are passed from the STG_DATES table to the DIM_DATES table.
tegraT la n oit al e R r ot a r en eG ecn e uq e S YEK_ETAD X

y e K e uq i n U

tr e sn I

r e t l i F / no i t c e l e S

.rotareneg ecneuqes a yb dengissa eb lli w el b at t e g ra t e ht r of ye k y r a mi rp ehT . t eg r a t l an oi ta le r a ot ni d ed a ol ylt ce ri d e b lli w el ba t la no it al e r ec r uo S 91 04 elbaT elcarO

d ao L / s wo R m e t s y S t e gr aT

PROCESSING DESCRIPTION (DETAIL)
ec r uo S l a noi t ale R xx U B DT

r e n w O / am eh c S

HIGH LEVEL PROCESS OVERVIEW
SETAD_MID

e tele D

e t a dp U r en w O a m e h c S

e m a N e lb aT s e lb aT

xx UB DT

sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R
tl u af e D

y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P

ecn O

y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M

91 0 4 elbaT elcarO xx_DAOL_SETAD_MID_m

TARGETS
SETAD_GTS

e m a N e lb aT s e lb aT

SOURCES Velocity Deliverable: Mapping Specifications

581

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

D MI _ D A T E S L A S T _ D A Y _ NI _ M O N T H S T G _ D A T E S L A S T _ D A Y _ NI _ M O N T H

D MI _ D A T E S S E A S O N

D I M _ D A T E S Q U A R T E R _ O F _ Y E A R

D MI _ D A T E S W E E K E N D _ NI D CI A T O R S T G _ D A T E S W E E K E N D _ NI D CI A T O R

D MI _ D A T E S W E E K D A Y _ NI D CI A T O R S T G _ D A T E S W E E K D A Y _ NI D CI A T O R

D MI _ D A T E S W O R K D A Y _ NI D CI A T O R S T G _ D A T E S W O R K D A Y _ NI D CI A T O R

D MI _ D A T E S H O L DI A Y _ NI D CI A T O R

D MI _ D A T E S Y E A R _ O V E R A L L

D MI _ D A T E S M O N T H _ O V E R A L L

D MI _ D A T E S W E E K _ O V E R A L L

D MI _ D A T E S D A Y _ O V E R A L L

D MI _ D A T E S W E E K _ O F _ Y E A R

D MI _ D A T E S M O N T H _ O F _ Y E A R

D MI _ D A T E S D A Y _ O F _ Y E A R

D MI _ D A T E S M O N T H _ N A M E

D MI _ D A T E S D A Y _ N A M E

D MI _ D A T E S D A Y _ O F _ W E E K

D MI _ D A T E S Y E A R _ V A L U E

D MI _ D A T E S M O N T H _ N U M B E R

D MI _ D A T E S D A T E _ O F _ M O N T H

D MI _ D A T E S D A T E _ DI _ L E G A C Y

D MI _ D A T E S D A T E _ V A L U E

D MI _ D A T E S D A T E _ K E Y

T a r g e t T a bl e T a r g e t C o ul m n

SOURCE TO TARGET FIELD MATRIX

S T G _ D A T E S S E A S O N

S T G _ D A T E S Q U A R T E R _ O F _ Y E A R

S T G _ D A T E S H O L DI A Y _ NI D CI A T O R

S T G _ D A T E S Y E A R _ O V E R A L L

S T G _ D A T E S M O N T H _ O V E R A L L

S T G _ D A T E S W E E K _ O V E R A L L

S T G _ D A T E S D A Y _ O V E R A L L

S T G _ D A T E S W E E K _ O F _ Y E A R

S T G _ D A T E S M O N T H _ O F _ Y E A R

S T G _ D A T E S D A Y _ O F _ Y E A R

S T G _ D A T E S M O N T H _ N A M E

S T G _ D A T E S D A Y _ N A M E

S T G _ D A T E S D A Y _ O F _ W E E K

S T G _ D A T E S Y E A R _ V A L U E

S T G _ D A T E S M O N T H _ N U M B E R

S T G _ D A T E S D A T E _ O F _ M O N T H

S T G _ D A T E S D A T E _ DI _ L E G A C Y

S T G _ D A T E S D A T E _ V A L U E

S T G _ D A T E S d e r vi e d

S o u r c e Fi el S o u r c e C o ul m n

G e n e r a ot r

N E X T V A L r of m S e q u e n c e

E x p r e s s oi n

N ul l

D e f a ul t V a ul e fi

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

681

D I M _ D A T E S L A S T _ D A Y _ I N _ Y E A R

D I M _ D A T E S L A S T _ D A Y _ I N _ Q U A R T E R S T G _ D A T E S L A S T _ D A Y _ I N _ Q U A R T E R

T a r g e t T a bl e T a r g e t C o ul m n

S T G _ D A T E S L A S T _ D A Y _ I N _ Y E A R

S o u r c e Fi el S o u r c e C o ul m n

E x p r e s s oi n

N ul l

D e f a ul t V a ul e fi

Instructions
Step 1: Copy a Shared Relational Source Table
Expand the DEV_SHARED folder and locate the source definition STG_DATES in the ODBC_STG node. Notice that this STG_DATES object is a source, while the STG_DATES that you have already used is a target. Ensure that your student folder is open. Copy the STG_DATES source definition from the DEV_SHARED folder into your student folder. Save your work.
.1 .2 .3 .4 .1 .2 .3 .4 .5 .1 .2 .3 .4

Step 2: Create a Shortcut to a Shared Relational Target Table
In the DEV_SHARED folder, locate the target DIM_DATES. Make sure your student folder is open. Highlight the target and drag it to your student folder. Rename the target as SC_DIM_DATES. The SC_ prefix is the Velocity Best Practice naming convention for shortcut

objects. Save your work.

You will now be able to see the SC_DIM_DATES shortcut in your own student folder.

Step 3: Create a Mapping
Create a new mapping named m_DIM_DATES_LOAD_xx. Add the STG_DATES relational source to the new mapping. Add the SC_DIM_DATES relational target to the new mapping. Expand the mapping objects.

781

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

:e c it ca r P ts e B y ti co l eV

Your mapping should appear similar to Figure 8-1.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

nmuloc tegrat a ot detcennoc trop LAVTXEN rotareneg ecneuqes eht fo weiv lamroN .3-8 erugiF

noci noitamrofsnarT rotareneG ecneuqeS .2-8 erugiF

DAOL_SETAD_MID-m fo weiv dednapxE .1-8 erugiF

Step 4: Create a Sequence Generator Transformation
From the Transformation toolbar, select the Sequence Generator transformation icon.
.1 .2 .3 .4

Position the Sequence Generator transformation before the target. You can create approximately two billion primary or foreign key values with the Sequence Generator transformation by connecting the NEXTVAL port to the desired transformation or target and using the widest range of values (1 to 2147483647) with the smallest interval (1).
: p iT

From the Sequence Generator transformation select the NEXTVAL port and link it to the DATE_KEY column of the SC_DIM_DATES target.

Rename the sequence generator seq_DIM_DATES_DATE_KEY.

881

Select the Properties tab and observe the properties available in the sequence generator. Check the “Reset” Attribute Value. Describe the following properties. Use the Help system to find the answers. Increment by:________________________________________________ Current value:________________________________________________
.a .b

Step 6: Create and Run the Workflow
Launch the Workflow Manager (if not already running) and connect to the repository and open your student folder. From Workflow Designer create a new workflow named wkf_DIM_DATES_LOAD_xx. Use the Session task icon and create a new Session task. Associate the m_DIM_DATES_LOAD_xx mapping to the new session task. Link the Start object to the s_m_DIM_DATES_LOAD_xx session task object.
.1

981

tegrat eht ot strop detcennoc fo weiv lamroN .4-8 erugiF

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

.5 .6 .7 .1 .2 .3 .2 .3 .4 .5

♦ ♦

Click the OK button to return to the Normal view of the sequence generator. Save your work.

Step 5: Link the Target Table
Link all the ports from the Source Qualifier transformation to the corresponding columns in the target object using Autolink by name. See Figure 8-4.

Save your work. Verify your mapping is valid in the Output window. If the mapping is not valid, correct the invalidations that are displayed in the message.

Edit the s_m_DIM_DATES_LOAD_xx session task and set the following options in the Mapping tab:
♦ ♦ ♦ ♦ ♦ ♦

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

nur noisses eht rof scitsitats tegraT/ecruoS .6-8 erugiF

nur noisses detelpmoc eht fo sliateD ksaT .5-8 erugiF

.01

.11

.6 .7 .8 .9

Select SQ_SC_STG_DATES from the Sources folder in the navigator window. Set the Connections Value to your assigned NATIVE_STGxx connection value. Select SC_DIM_DATES from the Target folder in the navigator window. Set the Connections Value to your assigned NATIVE_EDWxx connection value. Set the Target Load type to Normal. Check the property Truncate target table option in the target properties.

Save your work. Check Validate messages to ensure your workflow is valid. If you received an invalid message, correct the problem(s) and re-validate/save. Start the workflow. Review the Task Details. Your information should appear similar to Figure 8-5.

Select the Source/Target Statistics tab. Your statistics should be similar to Figure 8-6.

091

191

r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

elbat SETAD_MID eht fo weiverP ataD .7-8 erugiF

Data Results

Preview the target data from the Designer. Your data should appear similar to Figure 8-7.

Unit 8 Quiz
1. When would you use the Sequence Generator transformation? 2. What is the relationship between the values of CURRVAL and NEXTVAL?

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e t a D d a o L : b a L 8 t i n U

8

8 tinU

291

ss ec or p e civ r eS n oi ta r ge t nI eh t r of d er u gif n oc y ro tc e ri d ri D eh ca C MP $ e ht s es u eciv r eS noi t a rg et n I e ht . noi t po t n et sis re P p uk oo L e ht tce les uo y ne h w sel if e hc ac p uk o ol tn e tsis r ep eh t ev as o t d es u osl A . Dynamic cache will be discussed in a later module.el iF tal F la n oit al e R . Lookup Caching Unit 9: Lookup Caching.e c ru os p uk o ol e ht e hc ac o t n oit a m ro fs na r t p uk oo L e ht e ru gi fn oc u oy ne h w s eli f e hc ac p uk ool eh t dli u b ot de su y r otc e ri d e ht s eif ice pS . you should be able to: Use additional Designer features and techniques Use Persistent Lookup caching in a mapping Define Persistent Lookup cache . More Features and Techniques This section will discuss the cache related properties. g ni h c a C p u k o o L : 9 t i n U . tl ua f ed yB . Description ♦ ♦ ♦ After completing this unit.n ois ses e ht gni r u d s e ul av p uk ool s eh cac eciv r eS noi t ar g et n I eh t re ht e h w s e tac id nI noitpircseD la n oit al e R .el iF tal F e p yT p u k o o L e ma N y ro tc e ri D eh ca C p uk o oL del b an E g nih ca C p uk o oL no i tp O Lesson 9-1. Properties The Lookup transformation allows you to cache the lookup table in memory. This is the default.391 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e u q i n h c eT d n a s e r u t a e F e r o M .

♦ ♦ ♦ ♦ ♦ ♦ There are two types of cache memory. values from the Lookup input port(s) that are part of the lookup condition are compared to the index cache.ec n at sni noi t am r of sn a rt pu ko oL e h t sll ac ts ri f ti n eh w ec r u o s pu ko ol e ht m o rf e hc ac p uk ool e h t s dli ub e r eciv r eS noi t a rg e tn I e ht .el iF tal F la n oit al e R . g ni h c a C p u k o o L : 9 t i n U 491 . Key Point How it Works For more detailed information refer to the online help. All port values from the lookup table where the port is part of the lookup condition are loaded into index cache. e hca c pu ko ol t n etsi s re p a s esu eciv r eS noi t ar g et n I eh t re ht e h w s e tac id nI noitpircseD la n oit al e R . index and data cache. the overflow will be written out to disk.yromem ni ehc ac x ed ni e h t ot s et ac oll a eciv r e S no it a rg e tn I e ht e zis m u mix am e h t s e tac id nI . The index cache contains all port values from the lookup table where the port is specified in the lookup condition.yromem ni e hca c a ta d eh t ot s e tac oll a eciv r eS no it a rg e tn I e h t e zis m u mix am e ht s e tac id nI . e hc ac p uk ool t n et sis r ep a esu to n o d u oy f I . After the cache is loaded.yromem ni atad ehcac xedni eht lla erots tonnac ecivreS noitargetnI eht nehW . turn off or delete any unused output ports in the Lookup transformation. You can use where clauses in the SQL override to minimize the amount of data written to cache. ehc ac eh t g nis u e ro f eb y r om e m ni e hc ac p uk ool e ht s dli ub e r ti .yromem ni atad ehcac atad eht lla erots tonnac ecivreS noitargetnI eht nehW . You can also index the lookup file to speed the retrieval time. d etc el es n e hW .yrassecen sa ksid ot segap ti .el iF tal F la n oit al e R .el iF tal F e p yT p u k o o L e cr u oS p uk oo L m o rF e hc ace R xi fe r P e ma N el iF e hca C e ziS ehc a C xe d nI p uk o oL e ziS ehc a C a ta D p uk o oL t ne tsi sr e P eh ca C p uk o oL no i tp O Lookup Cache Lookup caching typically improves performance because the Integration Service need not execute an external read request to perform the lookup. e hca c p uk ool tn e tsis r ep a e su uo y fI . The data cache contains all port values from the lookup table that are not in the lookup condition and that are specified as “output” ports. d elb a ne ehc ac p uk o ol e ht h ti w yl no e sU . eh cac p uk o ol t n et sis r ep h ti w yl n o e sU .e hc ac e h t g nisu e ro f eb s eli f e hc ac t n etsi s re p e h t sdl iu b er ti . However. Performance Considerations If there is not enough memory specified in the index and data cache properties. this is true only if the time taken to load the lookup cache is less than the time that would be taken to perform the external read requests.el iF tal F la n oit al e R . sel if e hc ac p uk o ol tn e tsis r ep h ti w es u o t xif e rp e m an el if e ht se ific e pS .el iF tal F la n oit al e R .yrassecen sa ksid ot segap ti . Upon a match the rows from the cache are included in the stream.repoleveD I leveL 8 retneCrewoP acitamrofnI s e u q i n h c eT d n a s er ut a e F e r o M . . To reduce the amount of cache required.

g ni h c a C p u k o o L : 9 t i n U Cache if the number (and size) of records in the lookup table is small relative to the number of mapping rows requiring a lookup.591 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e u q i n h c eT d n a s e r u t a e F e r o M . Rule Of Thumb .

repoleveD I leveL 8 retneCrewoP acitamrofnI s e u q i n h c eT d n a s er ut a e F e r o M . g ni h c a C p u k o o L : 9 t i n U 691 .

Unit 9 Lab A: Load Promotions Dimension Table (Lookup and Persistent Cache) Business Purpose Mersche Motors runs a number of promotions that begin and end on certain dates. This table stores the start and expiry dates as date keys that reference the date dimension table. Duration 25 minutes 791 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ) e h c a C t n e t s i sr e P d n a p uk o o L ( e l b aT n o i s n e m i D s n o it o m o r P d a o L : A b a L 9 t i n U . The DIM_DATES table changes infrequently so it will be loaded into cache in a persistent state. it will be necessary to perform a Lookup to the DIM_DATES table in the EDW database. To obtain these date keys. Technical Description The DIM_PROMOTIONS table requires start and expiration date keys. which were created by the sequence generator. The promotions are stored in the promotions dimension table. Goals Understand how to configure and use a persistent Lookup cache. These exist in the DIM_DATES table that was populated in the previous lab. The lookup cache will be used often by other Mappings that load Dimension tables.

SNOITOMORP_GTS = EULAV_ETAD.SETAD_MID WDE ) s ( no i t id no C h c t a M e lb aT e m a N pu ko oL e d i r r e v O L Q S / r e t l iF noitacoL SETAD_MID YEK_ETAD_YRIPXE_pkl ETAD_TRATS. el ba t S NO ITO MO RP _M I D e ht ni et a d n oit a ri px e dn a e t ad t r a ts e ht ro f sy ek e ta d e ht e riu qc a ot elbat ETAD_MID eht ot demrofrep eb tsum pukool a dna gnippam eht hguorht nur si atad noitomorP 6 elbaT elcarO y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M d ao L / s wo R m e t s y S t e g r aT 6 elbaT elcarO xx _ DA OL _S NO ITO MO R P_ MI D _ m LOOKUPS e m a N e lb aT s e lb aT TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .repoleveD I leveL 8 retneCrewoP acitamrofnI ) e h c a C t n e t s i sr e P d n a p u k o o L ( el b aT n o i s n e mi D s n o it o m o r P d a o L : A b a L 9 t i n U 891 e d i r r e v O L Q S / r e t l iF ETAD_YRIPXE.SNOITOMORP_GTS = EULAV_ETAD.SETAD_MID W DE ) s ( no i t id no C h c t a M e lb aT e m a N pu ko oL n o i t a co L SETAD_MID YEK_ETAD_TRATS_pkl D I_ OMO R P X S NO ITO MO R P_ MI D y e K eu q in U tresnI ete leD xx UB DT e t ad p U r e n w O am eh c S e no N xx UB DT SN OIT OMO R P_ GTS r e t l i F / no i t c e l e S r e n w O / am eh c S s d l e i F e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D dedaol eb tsum SETAD_MID denimreted eb oT .

Students will need to determine which columns to use for the condition in the Lookup Transformation. ec r uo S . PROCESSING DESCRIPTION (DETAIL) HIGH LEVEL PROCESS OVERVIEW This lab requires the successful completion of the Unit 8 Lab. In order to successfully populate the DIM_PROMOTIONS table there must be two Lookups to the DIM_DATES table to acquire values for the START_DK and EXPIRY_DK date keys.991 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ) e h c a C t n e t s i sr e P d n a p uk o o L ( e l b aT n o i s n e m i D s n o it o m o r P d a o L : A b a L 9 t i n U T N UO C SI D T SO C _OM O RP YEK_ETAD YEK_ETAD EP YT _OM O RP C SE D _OM O RP D I _OM O RP S N OITO MO R P_ GTS S N OITO MO R P_ GTS SETAD_MID SETAD_MID S N OITO MO R P_ GTS S N OITO MO R P_ GTS S N OITO MO R P_ GTS T N UO CS I D TS OC _O MO R P K D_ YRI PX E KD_TRATS E PYT _O MO R P CS ED _O MO R P DI _O MO R P S NO ITO MO R P_ MI D S NO ITO MO R P_ MI D S NO ITO MO R P_ MI D S NO ITO MO R P_ MI D S NO ITO MO R P_ MI D S NO ITO MO R P_ MI D S NO ITO MO R P_ MI D l lu N f i eu l aV t lu a f e D noisserpxE nm u lo C e c r uo S e l b aT e c r uo S n mu l o C t e gr aT e l b aT t eg r aT pu ko oL tegraT pu ko oL SOURCE TO TARGET FIELD MATRIX :e to N This mapping will populate the DIM_PROMOTIONS table with data.

create a shortcut to the DIM_PROMOTIONS target table from the DEV_SHARED > Targets folder.2 . Step 3: Create a Mapping Create a new mapping named m_DIM_PROMOTIONS_LOAD_xx.Instructions Step 1: Create a Shortcut to a Shared Relational Source Table In the Source Analyzer.4 . :e to N Save your work. The target requires key values (number). create a short cut to the STG_PROMOTIONS source table from the DEV_SHARED > Sources > ODBC_STG folder.3 . not dates. Save your work. Notice the primary key-foreign key relationships. Arrange transformations appropriately and Autolink the ports “By Name” between: ♦ SQ _SC_STG_PROMOTIONS and SC_DIM_PROMOTIONS. 002 . compare START_DATE and EXPIRY_DATE in SQ_SC_STG_PROMOTIONS to START_DK AND EXPIRY_DK in the SC_DIM_PROMOTIONS Target table. . Rename the shortcut to SC_DIM_PROMOTIONS. Add the target definition shortcut SC_DIM_PROMOTIONS to the mapping. Save your work.1-9 erugiF In Figure 9-1. In what table do these Date Key values exist? _________________________. Rename the shortcut to SC_STG_PROMOTIONS.3 . It should look like the mapping in Figure 9-1.2 .2 .5 .1 . repoleveD I leveL 8 retneCrewoP acitamrofnI ) e h c a C t n e t s i sr e P d n a p u k o o L ( el b aT n o i s n e mi D s n o it o m o r P d a o L : A b a L 9 t i n U gnippam DAOL_SNOITOMORP_MID_m . Add the source definition shortcut SC_STG_PROMOTIONS to the mapping.1 .1 . If the SC_DIM_DATES target table is not displayed in the Target Designer drag it in from the Targets folder in your student folder.1 . Notice that these two ports are not connected and the datatypes are different.2 Step 2: Create a Shortcut to Shared Relational Target Table In the Target Designer. Step 4: Create Lookups for the Start and Expiry Date Keys Examine Figure 9-1.3 .

the DATE_KEY was generated by the seq_DIM_DATES_DATE_KEY Sequence Generator transformation and DATE_VALUE has a datatype of date/time.4 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ) e h c a C t n e t s i sr e P d n a p uk o o L ( e l b aT n o i s n e m i D s n o it o m o r P d a o L : A b a L 9 t i n U elbaT pukooL tceleS . You will base the Lookup Condition on the ____________________ port from SQ_SC_STG_PROMOTIONS Source Qualifier and the ____________________ column in the DIM_DATES Lookup table.2-9 erugiF The date dimension table (DIM_DATES) was populated by the previous lab. .3-9 erugiF . 102 elbat SETAD_MID eht detalupop taht bal suoiverp eht morf SETAD_MID_m . To acquire the value for the START_DK in the DIM_PROMOTIONS target you need to perform a Lookup on the DIM_DATES table.3 . You will base the Lookup Condition on the ____________________ port from SQ_SC_STG_PROMOTIONS Source Qualifier and the ____________________ column in the DIM_DATES Lookup table. to acquire the value for the EXPIRY_DK in the DIM_PROMOTIONS Target you will need a second Lookup on the DIM_DATES as well. Add a Lookup Transformation to the mapping based on the SC_DIM_DATES (shortcut to DIM_DATES) target table.6 .5 . Similarly.Examine Figure 9-2.

Click YES to verify the “Look up condition is empty”. Cache File Name Prefix = LKPSTUxx (where xx is your student number). Define the Lookup Condition to look like Figure 9-4: noitidnoC pukooL . Lookup Caching Enabled = Checked (default). Rename it to lkp_EXPIRY_DATE_KEY.8 . Notice that this transformation has many ports.01 .4-9 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI ) e h c a C t n e t s i sr e P d n a p u k o o L ( el b aT n o i s n e mi D s n o it o m o r P d a o L : A b a L 9 t i n U :e to N .c .21 .51 .Rename the Lookup Transformation to lkp_START_DATE_KEY. Verify the Lookup Condition is correct.9 On the Properties tab and verify the following values: ♦ ♦ ♦ ♦ Lookup Table Name = DIM_DATES (default). The lkp_START_DATE_KEY transformation will not retrieve values for EXPIRY_DK because the lookup conditions will be different.91 .71 . Create a second Lookup transformation called lkp_EXPIRY_DATE_KEY by selecting the lkp_START_DATE_KEY transformation and pressing Ctrl+C and Ctrl+V. 202 . Now Drag and Drop the START_DATE port from SQ_SC_STG_PROMOTIONS Source Qualifier to an empty port in the lkp_START_DATE_KEY transformation. We could have unchecked to Output column on all except for the ones that we need but since this Lookup Transformation will be persistent it would have limited its functionality for other Mappings that might leverage it. Lookup Cache Persistent = Checked (needs to be set). Click OK. Make START_DATE input only. You will define this shortly. Rename port IN_START_DATE to IN_EXPIRY_DATE.7 .61 . Link the EXPIRY_DATE port from SQ_SC_STG_PROMOTIONS Source Qualifier to the IN_EXPIRY_DATE port in the lkp_EXPIRY_DATE_KEY transformation.31 .b . Save your work.a . Rename START_DATE to IN_START_DATE.81 .41 . Make the changes necessary to the Lookup to ensure that the EXPIRY_DATE finds the proper DATE_KEY. Link the DATE_KEY port from the lkp_START_DATE_KEY transformation to the START_DK port in the SC_DIM_PROMOTIONS target.11 .

3 . Review the Task Details.12 .4 . In the Mapping tab: Select SQ_SC_STG_PROMOTIONS located under the Sources folder in the navigator window.c . Edit the s_m_DIM_PROMOTIONS_LOAD_xx session task.Link the DATE_KEY port from the lkp_EXPIRY_DATE_KEY transformation to the EXPIRY_DK port in the SC_DIM_PROMOTIONS target. .5 . Set the Connections > Type to your assigned NATIVE_EDWxx connection object.5-9 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ) e h c a C t n e t s i sr e P d n a p uk o o L ( e l b aT n o i s n e m i D s n o it o m o r P d a o L : A b a L 9 t i n U .1 . Run the workflow.d .a .02 . 302 gnippam detelpmoc DAOL_SNOITOMOROP_MID_m .e . Create a new Session task using the mapping m_DIM_PROMOTIONS_LOAD_xx.8 Step 5: Create and Run the Workflow Launch the Workflow Manager and sign into your assigned folder. Save your work.2 . Ensure that the Target load type is set to Normal. Create a new Workflow named wkf_DIM_PROMOTIONS_LOAD_xx. Set the Connections > Type to your assigned NATIVE_STGxx connection object.6 .7 . Select SC_DIM_PROMOTIONS located under the Target folder in the navigator window.b . Complete the workflow by linking the Start and Session tasks and save your work.

Select the Source/Target Statistics tab.6-9 erugiF . Your statistics tab should appear as Figure 9-7.repoleveD I leveL 8 retneCrewoP acitamrofnI ) e h c a C t n e t s i sr e P d n a p u k o o L ( el b aT n o i s n e mi D s n o it o m o r P d a o L : A b a L 9 t i n U 402 nur noisses detelpmoc eht fo scitsitatS tegraT/ecruoS . nur noisses detelpmoc eht fo sliateD ksaT .9 Your information should appear similar to Figure 9-6.7-9 erugiF .

502 noitamrofsnarT pukooL no tes si ehcaC tnetsisreP nehw detaerc selif weiverP . Note that in this lab. Verify that the files have a timestamp similar to when you ran the above workflow.9-9 erugiF elbat tegrat SNOITOMORP_MID eht fo weiverP ataD . The results should be similar as Figure 9-8. two files were created in the cache file directory defined for the Integration Service process. To view these files.Data Results Preview the target data. you will need to map to the file system on the Integration Service process machine. Note the values for START_DK and EXPIRY_DK. Also note that the names correspond to the name you entered in the Cache File Name Prefix Lookup property.8-9 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ) e h c a C t n e t s i sr e P d n a p uk o o L ( e l b aT n o i s n e m i D s n o it o m o r P d a o L : A b a L 9 t i n U . these files are on the Integration Service process machine. By setting the Lookup Cache Persistent property on the Lookup transformations. See Figure 9-9. not your local computer.

repoleveD I leveL 8 retneCrewoP acitamrofnI ) e h c a C t n e t s i sr e P d n a p u k o o L ( el b aT n o i s n e mi D s n o it o m o r P d a o L : A b a L 9 t i n U 602 .

Goals: Use the following features: ♦ ♦ ♦ ♦ Find Within Workspace View Object Dependencies Compare Objects Overview Window Duration 15 minutes 702 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I II s e u q i n h c eT d n a s e r u t a e F : B b a L 9 t i n U . Each of these features will increase the efficiency of any developer who knows how to use them appropriately. At the discretion of the instructor. this lab can also be completed as a demonstration. Technical Description This lab will detail the use of 4 PowerCenter Designer features.Unit 9 Lab B: Features and Techniques II Business Purpose The management wants to increase the efficiency of the PowerCenter Developers.

or port for all the transformations in a mapping currently open in the Mapping Designer or workspace. xob golaid ecapskrow ni dniF .Instructions Open a Mapping In the Designer tool. table. column.2 . . perform the following steps: In your Studentxx folder.1 . Select the Find in workspace toolbar icon Click Find Now. and Transformation Developer. Mapplet Designer. Target Designer. Type the word “customer” in the Find What text box.1 . . Your results should appear as in Figure 9-10.3 Feature 1: Find in Workspace When using this feature you can perform a string search for the name of an object. This feature can also be used in the Source Analyzer. select the m_Stage_Customer_Contacts_xx mapping and drag it into the Mapping Designer.01-9 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI II s e u q i n h c eT d n a s e r u t a e F :B b a L 9 ti n U 802 .

4 You will see the Dependencies dialog box as shown in Figure 9-11. Right-click and select Dependencies .htm file for future reference. Feature 2: View Object Dependencies By viewing object dependencies in the Designer a user can learn which objects may be affected by making changes to source or target definitions. Direct and indirect dependencies are shown. xob golaid seicnednepeD weiV . the term “fields” can mean columns in sources or targets or ports in transformations.2 .In the Find in workspace feature. See the Repository Guide for a complete list. such as a source definition in the Mapping Designer or the Source Analyzer. :e to N Experiment by viewing the dependencies of other objects. 902 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I II s e u q i n h c eT d n a s e r u t a e F : B b a L 9 t i n U .1 . noting that some of the information relates to Team-Based Development (version control) properties like Version. :e c it ca r P ts e B y ti co l eV :e to N : p iT By using the Velocity Methodology object naming conventions (such as transformation type prefixes) it will be easier to locate the found objects in the workspace. mapplets. Object dependencies can also be viewed from the Workflow Manager and the Repository Manager. in Figure 9-10 we know that SQ_customer_layout is a Source Qualifier and fil_Customer_No_99999 is a filter. Select the flat-file source definition promotions in the Navigator window. mappings.11-9 erugiF Click OK You will see the View Dependencies window. The Repository Manager will show any of the supported dependencies between a wide range of objects within the repository. Browse through this window. which will show detailed information about each of the dependencies found. Dependencies can also be viewed by right-clicking on an object directly in a workspace. Timestamp.3 . or transformations (reusable or nonreusable). For example. and Version Comments. The term “table” can mean a source or target definition or a transformation. the dependencies can be saved as an . By clicking the Save button on the toolbar.

Open the m_DIM_PROMOTIONS_LOAD_xx mapping. Your screen should appear as Figure 912. This is the object we wish to compare with the Lookup transformation. .21-9 erugiF Click Compare. Right-click the Lookup transformation lkp_START_DATE_KEY and select Compare Objects.1 . For the Instance 2 drop-box.Feature 3: Compare Objects This feature allows you to compare all of the ports and properties of any two objects within a mapping or mapplet.3 .4 repoleveD I leveL 8 retneCrewoP acitamrofnI II s e u q i n h c eT d n a s e r u t a e F :B b a L 9 ti n U xob golaid stcejbo erapmoc noitamrofsnarT . 012 .2 . select the Lookup transformation lkp_EXPIRY_DATE_KEY.

5 . and what you see should be similar to Figure 9-13. . Open the target definition STG_DATES in the Target Designer. Ports that are highlighted in yellow indicate a difference in the expression which may not be easily visible in this view. Select the Properties tab. 11 2 sliated seitreporP stcejbo noitamrofsnarT erapmoC .31-9 erugiF A great deal of comparative information is displayed in the tabs. We will now learn how to compare objects that are in different folders.7 .Browse the tabs in the Transformations window that appears. All differences will appear in red.6 :e to N r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I II s e u q i n h c eT d n a s e r u t a e F : B b a L 9 t i n U . Right-click the target and select Compare Objects.

The Select Targets dialog box allows you to choose a comparison object in another folder. if any. Browse the information in the various tabs.01 . between two objects in two different folders.41-9 erugiF : p iT .51-9 erugiF xob golaid nosirapmoc tegraT . both folders must be open. 212 . repoleveD I leveL 8 retneCrewoP acitamrofnI II s e u q i n h c eT d n a s e r u t a e F :B b a L 9 ti n U selbat tegrat owt neewteb secnereffid nmuloC . Your screen should appear as Figure 9-14. Note that this method can quickly tell you the differences.9 Click Compare. See Figure 9-15. Click the Browse button for Target 2 and select the DIM_DATES table in the DEV_SHARED folder.8 . In order to compare objects across folders.

In the Mapping Designer. Click the Toggle Overview Window toolbar button.3 312 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I II s e u q i n h c eT d n a s e r u t a e F : B b a L 9 t i n U : p iT . Use your left mouse button to drag the dotted rectangle to a different location within the mapping. this feature would make it faster to locate. If you were searching for a target or a source in a large and complex mapping.Feature 4: Overview Window The Overview window is useful when a large mapping is “zoomed in” on your screen so you can work on the individual transformations. set the zoom level to 100-percent. The Overview window has been described as a “bird’s eye view” of the mapping. enabling you to see your position relative to the entire structure. The Overview window will appear in the upper-right hand corner of your screen. Selected mapping objects appear red in the Overview window. .2 .1 . but the zoom level makes it difficult to scroll into a different section of the mapping because you cannot see where you are scrolling to.

repoleveD I leveL 8 retneCrewoP acitamrofnI II s e u q i n h c eT d n a s e r u t a e F :B b a L 9 ti n U 412 .

descending or mixed. The Sorter transformation attribute. “Distinct” provides a facility to remove duplicates from the input rows.r e t r o S : 0 1 t i n U .f l e S d n a r o t a g e r g g A . Aggregator and Self-Join After completing this unit. 512 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ni o J . Sorter Transformation Type Active. you should be able to: ♦ Describe the following features: Sorter transformations ♦ Aggregator transformations ♦ Active and passive transformations ♦ Data concatenations ♦ Self-Joins Use these features in mappings ♦ ♦ Lesson 10-1. Description The Sorter transformation sorts the incoming data based on one or more key values .Unit 10: Sorter.the sort order can be ascending.

a ta d e h t s t ro s eciv r e S n oit a rg e tn I e h t r e tf A .n oi ta m ro fs n a rt si ht g ni ni at n oc n oiss es a nu r u oy n e h w go l no iss es e ht ni d ed ulc ni lia t ed fo t n uo m a eh t st e S .noitcasnarT :a t ad g ni m ocn i ot ci g ol n oit a m ro fs na r t e ht s eil pp a ec iv re S n oit a r ge t nI e h t w oh s eif ice p S . sei r a dn u ob n oi tc as na r t g nim oc ni sp o r d re t ne C r e w o P eh t .a t ad g ni moc ni lla n o cig ol n oi ta m ro fs n ar t e ht se ilp pA .s no itc as n ar t re ht o ni s w o r n o dn e pe d t o n s e od t u b .noitcasnart a ni swor lla ot cigol noitamrofsnart eht seilppA . ezis ehc ac re t r oS e h t rof BG 4 dna BM 1 neewteb tnuoma yna yficeps nac uoY . at a d st r os ti eli h w se lif y r a ro p me t e t ae rc o t ses u e civ r eS noi t a rg et n I e ht ta h t y ro tc e rid e hT .ytreporp evitisneS esaC eht elbane uoy nehW . ec r u os eh t ni s wo r ll a n o sd n ep ed at a d fo wo r a n eh w t up n I l lA es o oh C .n oi ta r e po t r os eh t m r of r ep ot e t ac olla na c ti y r om e m fo tn u om a m um ixa m e ht eni m r et e d ot y t re p o rp eziS ehc a C r e t ro S e ht s esu eciv r eS noi t a rg et n I e hT e p ocS noitamrofsnarT woL detaerT lluN leveL gnicarT t cni tsi D yrotceriD kroW ev iti sn eS esa C ezi S e hc aC r et r oS noitpircse D no i tp O Properties . sr e tc ar a hc es ac r e wo l naht rehgih sretcarahc esacreppu stros ecivreS noitargetnI eht .repoleveD I leveL 8 retneCrewoP acitamrofnI n i o J.t u pn I ll A es oo hc u oy n eh W . noi tc as na r t e ma s eh t ni s w o r ll a n o sd n ep e d at a d fo wor a nehw noitcasnarT esoohC .yek tros eht fo trap sa strop lla serugifnoc rengiseD gnippaM eht . tupn I ll A . n oit a r ep o t r os e ht s m ro f r ep t i n eh w eul av r eh t o yn a na ht r e wo l sa s e ul av ll un ta e r t o t ec iv re S n oi ta r g et nI e ht tn a w u oy fi yt r e po r p si ht el ba n E . seli f y ra r o pm e t eh t se t ele d ti .a ta d g ni t ro s ne h w es ac s r edi sn oc e civ re S n oi ta r ge t nI e h t r e ht eh w s eni m r et e d y t r ep o rp evi tis ne S es a C e hT .f l e S d n a r o t a g e r g g A .tcnitsid sa swor tuptuo taert ot noitamrofsnart retroS eht erugifnoc nac uoY .r et r o S : 0 1 t i n U 612 .swor tuptuo tcnitsid rof noitamrofsnart retroS eht erugifnoc uoy fI .noitarepo tros eht smrofrep ti erofeb noitamrofsnart r et r oS eh t o tni at a d gn im oc ni lla s ess a p eciv r eS noi t a rg et n I e hT .

Example In the following example Gross Profit and Profit Margin are calculated for each item sold.r e t r o S : 0 1 t i n U . Sorter Cache How It Works ♦ ♦ ♦ If the cache size specified in the properties exceeds the available amount of memory on the Integration Service process machine then the Integration Service fails the session. All of the incoming data is passed into cache memory before the sort operation is performed. To improve performance of this session a Sorter transformation is added prior to the Aggregator transformation. If the amount of incoming data is greater than the cache size specified then the PowerCenter will temporarily store the data in the Sorter transformation work directory.Business Purpose A business may aggregate data on records received from relational sources (Databases) or flat files with related records in random order.f l e S d n a r o t a g e r g g A . Key Points The Integration Service requires disk space of at least twice the amount of incoming data when storing data in the work directory. The Aggregator “Sorted Input” property must be checked to notify the Aggregator to expect input in sort order. Performance Considerations Using a Sorter transformation may improve performance over an “Order By” clause in a SQL override in aggregate session when the source is a database because the source database may not be tuned with the buffer sizes needed for a database sort. 712 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ni o J . Sorting the records prior to passing them on to an Aggregator transformation may improve the overall performance of the aggregation task.

minimum or maximum values across multiple groups of rows. The Aggregator transformation can apply expressions to its ports however those expressions will be applied to a group of rows unlike the Expression transformation which applies calculations on a row-by-row basis only. Function grouping requirements are set using the Aggregator GroupBy port. Aggregator Transformation Type Active.f l e S d n a r o t a g e r g g A .r et r o S : 0 1 t i n U 812 . repoleveD I leveL 8 retneCrewoP acitamrofnI n i o J. Aggregate functions are created in output ports only.Lesson 10-2. Description The Aggregator transformation calculates aggregates such as sums.

tupn I ll A . no it am r o fsn a r t eh t ro f ezi s eh ca c at a D .f l e S d n a r o t a g e r g g A . tu p nI ll A es oo hc u oy n e hW . sei r a dn u ob noi tc as na r t g ni mo cni s p o rd r et n eC r e w oP eh t . n oit a m ro fs na r t sih t ro f g ol n oiss es e h t ni d ey alp sid li at e d f o tn u om A .r e t r o S : 0 1 t i n U .n oi ta m r ofs n a rt ro t ag e rg g A eh t o t a t ad d et r os s ess a p g ni pp a m e h t fi yln o noi t po sih t tce le S . o tu A o t te s s i ezis ehc ac t lu af e D .912 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ni o J . a ta d g ni moc ni ll a n o c ig ol n oi ta m ro fs n a rt e h t s eil p pA .noitcasnart a ni swor lla ot cigol noitamrofsnart eht seilppA . ec r uo s e ht ni s w o r l la n o sd n ep e d a ta d f o wo r a n eh w tu p nI ll A es o oh C .s no itc as n ar t re h to ni s w o r n o d ne p ed t o n se o d tu b .s p uo r g y b de t ro se r p si a ta d t u pn i se t aci dn I . noi t am r o fsn a r t eh t ro f ezi s eh ca c x e dn I . no itc as n ar t e m as e ht n i s w o r lla no s dn e pe d a ta d f o w o r a nehw noitcasnarT esoohC .noitcasnarT : at a d gn im oc ni o t c ig ol n oi ta m r ofs n a rt e h t s eil p pa e civ r eS n oi ta r g et nI eh t w o h s ei fic ep S o tu A o t te s s i ezis ehc ac t lu af e D . sel if e hc ac a t ad d n a x e dn i eh t se t ae r c eciv r eS noi t a rg et n I e ht e r e hw y r ot ce ri d la co L epocS noitamrofsnarT e ziS e hc aC x e dn I r o ta ge r g gA e ziS e hc aC at a D r o ta ge r g gA t up n I d et r oS leveL gnicarT y ro tc e ri D e hca C no i tp i r c s e D no i tp O Properties .

r et r o S : 0 1 t i n U 022 . Example The following example calculates a value for units sold (OUT_UNITS_SOLD) and revenue (OUT_REVENUE) and cost (OUT_COST) for each promotion id by date. repoleveD I leveL 8 retneCrewoP acitamrofnI n i o J.f l e S d n a r o t a g e r g g A .Business Purpose A business may want to calculate gross profit or profit margins based on items sold or summarize weekly. monthly or quarterly sales activity.

One output row will be returned for each unique occurrence of the group by ports. You enable automatic memory settings by configuring a value for the Maximum Memory Allowed for Auto Memory Attributes or the Maximum Percentage of Total Memory Allowed for Auto Memory Attributes. No rows are returned until all of the rows have been aggregated. Checking the sorted input attribute will bypass caching. The data cache contains all port values variable and connected output ports. ♦ Non group by input/output ports. All rows are loaded into cache before any aggregation takes place. the Integration Service disables automatic memory settings and uses default values. If the value is set to zero for either of these attributes.Aggregator Cache How It Works ♦ ♦ ♦ ♦ There are two types of cache memory. the overflow will be written out to disk. index and data cache. Non group by input ports used in non-aggregate output expression. The index cache contains group by port values. 122 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ni o J .r e t r o S : 0 1 t i n U .f l e S d n a r o t a g e r g g A . ♦ Local variable ports. ♦ Port containing aggregate function (multiply by three). ♦ ♦ Key Points ♦ ♦ ♦ ♦ If there is not enough memory specified in the index and data cache properties.

r et r o S : 0 1 t i n U 222 . Examples: Expression. The Aggregator sorted input property would need to be checked. Active transformations operate on groups of rows AND/OR change the number of rows. Aggregator. Lookup.f l e S d n a r o t a g e r g g A . Examples: Source Qualifier. Filter. repoleveD I leveL 8 retneCrewoP acitamrofnI n i o J. Make sure that your cache size settings are large enough to accommodate all of the data. Cache size is also important in assuring optimal performance in the Aggregator.Performance Considerations Aggregator performance can be increased when you sort the input data in the same order as the Aggregator Group By ports prior to doing the Aggregation. If they are not the system will cache out to disk causing a slow down in performance. Flat file source data can be sorted using an external sort application or the Sorter transformation. Sequence Generator. Lesson 10-3. Active and Passive Transformations Passive transformations operate on one row at a time AND preserve the number of rows. Joiner. Relational source data can be sorted using an “order by” clause in the Source Qualifier override.

f l e S d n a r o t a g e r g g A . 322 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ni o J . one branch has a customer ID and the other branch has the customer name.r e t r o S : 0 1 t i n U . Data concatenation works only if combining branches of the same source pipeline. the correspondence between the branches no longer exists. For example. Data Concatenation Data concatenation brings together different pieces of the same record (row). But if either branch contains an active transformation.Lesson 10-4.

repoleveD I leveL 8 retneCrewoP acitamrofnI n i o J. Example The following example loads employee data with appropriate links to the data records for the employees’ managers. Business Purpose A business may have to extract data from a single employee master table with employee data such as names.f l e S d n a r o t a g e r g g A . The two pipelines being joined need to be sorted in the same order. However when values to be combined are located within the same pipeline a self join provides a solution. Self-Join Description The Joiner transformation combines fields from two data sources into a single combined data source based on one or more common fields also know as the join condition.Lesson 10-5. title.r et r o S : 0 1 t i n U 422 . salary and reporting department and create a new table showing only those employees whose salary is greater than the average salary for the department.

♦ Data must be pre-sorted by the join key. ♦ ♦ Performance Considerations There is a performance benefit in a self join since it requires both the master and detailed side to be sorted.r e t r o S : 0 1 t i n U . 522 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I ni o J . Create two instances of the source and join the pipelines from each source. For self-joins between two branches of the same pipeline. Must add a transformation between the Source Qualifier and the Joiner in at least one branch of the pipeline. ♦ Configure the Joiner to accept sorted input.f l e S d n a r o t a g e r g g A .Key Points ♦ ♦ The inputs to the Joiner from the single source must separate into two data streams. For self-joins between records from the same source.

f l e S d n a r o t a g e r g g A .r et r o S : 0 1 t i n U 622 .repoleveD I leveL 8 retneCrewoP acitamrofnI n i o J.

On the Manager stream we will filter on the POSITION_TYPE column for MANAGER records and relate them back to the SALESREP records using the DEALERSHIP_ID. Technical Description We will copy the m_STG_EMPLOYEES_xx mapping created in a previous lab and modify it to derive the Manager Name and load it into the DEALERSHIP_MANAGER column of the STG_EMPLOYEES table. To do this we will have to split the data into two streams.Unit 10 Lab: Reload the Employee Staging Table Business Purpose Mersche Motors employee data has been loaded into the STG_EMPLOYEES table but after validating the data it was determined that data was missing. This is necessary because there is only one Manager per dealership. the developer must put the Dealership Manager's full name in the DEALERSHIP_MANAGER column. One stream will have all employee records and the other will have only manager records that will need to be joined back together using the manager records as the master.txt file and Workflow were successful the developer noticed that there is no data in the DEALERSHIP_MANAGER column of the target table. By leveraging the previous mapping that initially loaded the Employee data. We will also need to maintain the Lookup with respect to the salaries. Goals ♦ ♦ ♦ Leverage an existing Mapping to solve a data integrity issue Split the data stream and use a self-join to bring it back together Copy and modify an existing reusable Expression transformation Duration 70 Minutes 722 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U . Although the lookup to the salaries.txt file to ensure that salary data is still populated.

D I _P IH S RE LA E D tl u af e D dneppA tegraT yli a D . de d da eb lli w e ey ol pm e h ca e r of no it am r o fni y ral as dn a de tt a m ro f e r e b lli w at a d ec r u os .t sil_ se ey ol pm e tsi lel if a gni su n ois ses eh t o tn i da e r e b lli w sel if t al f d eti mil e d am m oc 3 e se hT s eliFc r S\s eli f mp \: C txt .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U 822 ed i r r e v O L Q S / r e t l iF DI _ EE YOL P ME _ NI = DI _E EYO L PM E sel iFpk L \se lif m p\ : C ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL n o i t a co L tx t. t uoy al _s ee yol p me ni n oiti ni fe D t xt . d ae r e b lli w t sil e liF 9 01 elbaT elcarO sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M d ao L / s wo R m e t s y S t e gr aT 901 e liF t alF xx _D AO L_ R GM _P I HS R EL AE D _S EE YOL P ME _GTS _ m LOOKUPS e m a N e lb aT s e lb aT TARGETS e m a N e l iF s e l iF SOURCES Velocity Deliverable: Mapping Specifications . tx t. tsil _s eey ol p me d e timi le D s eliFc r S\s eli f mp \: C tx t.t uo yal _s e eyo lp m e ni d nu o f eb na c s eli f t alf eh t f o tu oy al e hT .t xt .l a r tn ec _s eey ol p me o f n I e l i F l an o i t id d A d e t i m i l e D /d e x iF no i t a c oL e l iF D I_ EE YO LP ME .s ei r ala s y r al as _p kl X SE EY OL PM E_ GTS y e K e uq i n U tr e sn I e tele D xx U B DT e t a dp U r en w O a m e h c S tsil eliF . txt . nm ul oc R EG A NA M_ PI H SR E LA ED eh t e tal u po p d n a s r e ga n aM e h t fo s e ma n e ht eni m r et e D .tx t .t se w _s eey ol p me . tsa e _s eey ol p me .

The data will then be loaded into the STG_EMPLOYEES table. Additionally. A lookup to a salary text file will retrieve the salary information for each employee. The two data flows will be concatenated with a self-join based on dealership id thereby enabling the mapping to retrieve the dealership manager for each record.HIGH LEVEL PROCESS OVERVIEW PROCESSING DESCRIPTION (DETAIL) The mapping will read from three flat files contained in a file list. however. 922 tegraT pu ko o L r ot a ge r gg A r e nio J r e t ro S re tliF no iss e rpx E r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U e c ru oS . the data will be sorted by Dealership id and then the data stream will be split. A reusable Expression transformation. This will allow only 1 row of output from the Aggregator for each unique set of group by ports. The master data flow (bottom) will group by DEALERSHIP_ID in the Aggregator. needs to be copied and modified to receive the employee id from the source.

0 ot 6 0 g r o u p s a r e el s s ht a n 2 0 2. 3 0 ot 3 9 4. s ) e m p ol y e e s _ al y o ut E M P L O Y E E _I D T h e C U S T _ A G E _ G R O U P si U F N It. 0 ot 4 9 5. e m a el o r G E N D E R si c u r r e nt yl e hti e r M o r ( 9 9 9 ) 9 9 9 9 9 9 9. s ) e m p ol y e e s _ al y o ut Z PI _ C O D E n u m b e r ( p.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U 032 S T G _ E M P L O Y E E S R E G OI N A L _ M A N A G E R S T G _ E M P L O Y E E S P O S TI OI N _ T Y P E S T G _ E M P L O Y E E S T E R _ L A N G _ D E S C S T G _ E M P L O Y E E S S E C _ L A N G _ D E S C S T G _ E M P L O Y E E S N A T VI E _ L A N G _ D E S C S T G _ E M P L O Y E E S A G E _ G R O U P S T G _ E M P L O Y E E S E M P L O Y E E _ G E N D E R S T G _ E M P L O Y E E S E M P L O Y E E _ E M A LI S T G _ E M P L O Y E E S E M P L O Y E E _ F A X _ N M B R v a r c h a r 2 e m p ol y e e s _ al y o ut F A X _ N U M B E R S T G _ E M P L O Y E E S E M P L O Y E E _ P H O N E _ N M B R v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d S T G _ E M P L O Y E E S E M P L O Y E E _ C O U N T R Y v a r c h a r 2 e m p ol y e e s _ al y o ut C O U N T R Y S T G _ E M P L O Y E E S E M P L O Y E E _ Z PI _ C O D E S T G _ E M P L O Y E E S E M P L O Y E E _ S T A T E S T G _ E M P L O Y E E S E M P L O Y E E _ C TI Y S T G _ E M P L O Y E E S E M P L O Y E E _ A D D R E S S v a r c h a r 2 e m p ol y e e s _ al y o ut A D D R E S S S T G _ E M P L O Y E E S E M P L O Y E E _ N A M E S T G _ E M P L O Y E E S E M P L O Y E E _I D T a r g e t T a bl e T a r g e t C o ul m n SOURCE TO TARGET FIELD MATRIX v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d v a r c h a r 2 e m p ol y e e s _ al y o ut E M A LI v a r c h a r 2 e m p ol y e e s _ al y o ut S T A T E v a r c h a r 2 e m p ol y e e s _ al y o ut C TI Y v a r c h a r 2 e m p ol y e e s _ al y o ut D e r vi e d D a t a t y p e S o u r c e Fi el S o u r c e C o ul m n e m p ol y e e s _ al y o ut R E G OI N A L _ M A N A G E R e m p ol y e e s _ al y o ut P O SI T OI N _ T Y P E e m p ol y e e s _ al y o ut T H RI D _ L A N G U A G E e m p ol y e e s _ al y o ut S E C O N D _ L A N G U A G E e m p ol y e e s _ al y o ut N A T VI E _ L A N G U A G E a n d G r e a et r ht a n 6 0 2 9. 0 ot A G E c o ul m n T. K n e e d s ot b e M a el F. h e v a dli a g e d e r vi e d r of m ht e d e c o d ni g of n u m b e r ( p. a n d n e e d s ot b e r e of r m a ett d ot si ni ht e of r m a ot 9f 9 9 9 9 9 9 9 9 9 T h e P H O N E _ N U M B E R c o ul m n L a s Nt a m e C o n c a et n a et Fi r s Nt a m e a n d E x p r e s s oi n N V ul al l u e fi D e f a ul t .

132 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U S T G _ E M P L O Y E E S D A T E _ E N T E R E D S T G _ E M P L O Y E E S H RI E _ D A T E S T G _ E M P L O Y E E S E M P L O Y E E _ S A L A R Y S T G _ E M P L O Y E E S D E A L E R S H PI _ M A N A G E R v a r c h a r 2 S T G _ E M P L O Y E E S D E A L E R S H PI _ DI T a r g e t T a bl e T a r g e t C o ul m n d a et d a et D a t a t y p e S o u r c e Fi el S o u r c e C o ul m n e m p ol y e e s _ al y o ut D A T E _ E N T E R E D e m p ol y e e s _ al y o ut H RI E _ D A T E n u m b e r ( p.t . A S a al r y efi dl of r e a c h E m p ol y e e E x p r e s s oi n N V ul al l u e fi D e f a ul t . s ) e m p ol y e e s _ al y o ut D e r vi e d e m p ol y e e s _ al y o ut D E A L E R S H PI _ M A N A G E R b a s e d o n D E A L E R S H PI _ DI a n d ht e n oj ni e d b a c k ot g e ht e r e m p ol y e e r e c o r d s a r e s pl i at p a rt L A S T N A M E of ht e m a n a g e r T. h e C o n c a et n a et d F RI S T N A M E a n d n u m b e r ( p. s ) e m p ol y e e s _ al y o ut D E A L E R S H PI _ DI DI c a n b e of u n d ni s a al r ei s xt.

1 . Open m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD_xx in the Mapping Designer to make it the current mapping for editing.txt file. Locate the mapping m_STG_EMPLOYEES_xx in the Navigator window.3 . Copy it and rename it m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD_xx.1-01 erugiF txt.Instructions Step 1: Copy an Existing Mapping Launch the Designer and sign into your assigned folder.5 Step 2: Examine Source Data to Determine a Key for Self-Join Figure 10-2 shows the employees_central. Some columns are not in view or hidden.lartnec_eeyolpmE . Save your work.2 .2-01 erugiF 232 . Which of these columns can we use to determine Manager records? Answer: ________________________ Which of these columns can we use for a self-join condition to obtain the Dealership Manager name for the employee records? Answer: ________________________ repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U gnippam DAOL_RGM_PIHSRELAED_SEEYOLPME_GTS_m .4 . .

rablooT no nocI noitamrofsnarT retroS . Rename the re_exp_Format_Name_Gender_Phone_Load_Date reusable transformation to exp_Format_Name_Gender_Phone_Load_Date_Mgr (notice the name change but the reusable transformation name that this expression is an instance of stays the same) . Right-click and select Arrange all and expand the Source Qualifier.4 .1 . 332 devomer sknil tsom retfa DAOL_RGM_PIHSRELAED_SEEYOLPME_GTS_m .3-01 erugiF Save your work and notice that the mapping is now invalid.2 .3 .5-01 erugiF Select the following ports from SQ_employees_layout and drag them into the Sorter Transformation: ♦ ♦ DEALERSHIP_ID EMPLOYEE_ID r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U . Remove all the links to the lkp_salaries transformation and all of the links to the STG_EMPLOYEES target. Your mapping should look similar to Figure 10-4 if you Arrange all Iconic.4-01 erugiF noitamrofsnarT elbasueR a fo ecnatsni na gnimaneR .Step 3: Prepare the New Mapping for Modification Many of the links will need to be removed in order to build the self-join. Lookup and Target large enough to view all the ports and links.1 .2 Step 4: Create a Sorter Transformation Add a Sorter transformation to the mapping and name it srt_EMPLOYEES_DEALERSHIP_ID_DESC.

a .1 . Edit the Sorter transformation. Save your work.3 .4 . Step 5: Create a Filter Transformation The source file contains sales representatives and managers. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U 432 .2 .3 .b ♦ ♦ ♦ ♦ Save your work. Create a Filter transformation named fil_MANAGERS.♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ .5 . Rename the following ports: OUT_NAME to EMPLOYEE_NAME OUT_PHONE to EMPLOYEE_PHONE OUT_GENDER to EMPLOYEE_GENDER OUT_AGE_GROUP to AGE_GROUP . Link the following ports from srt_EMPLOYEES_DEALERSHIP_ID_DESC transformation to the fil_MANAGERS transformation: ♦ ♦ ♦ DEALERSHIP_ID EMPLOYEE_NAME POSITION_TYPE Set the filter condition to only allow 'MANAGER' position types. This stream of the mapping will only contain managers.4 ADDRESS CITY STATE ZIP_CODE COUNTRY FAX_NUMBER EMAIL NATIVE_LANGUAGE SECOND_LANGUAGE THIRD_LANGUAGE POSITION_TYPE REGIONAL_MANAGER HIRE_DATE DATE_ENTERED Select all the output ports from the exp_FORMAT_NAME_GENDER_PHONE_LOAD_DATE_MGR transformation and drag them into the srt_EMPLOYEES_DEALERSHIP_ID_DESC transformation. On the DEALERSHIP_ID port check the checkbox in the 'Key' column to define the sort column.

532 rotagerggA eht ot retliF eht ot retroS eht morf wolf eht gnitciped wolf gnippam laitraP .2 . On the Properties tab set Sorted Input property to “checked.Step 6: Create an Aggregator Transformation The filtered source data may contain multiple entries for a manager. This will remove the duplicate manager rows.4 . By making the DEALERSHIP_ID the group by port the Aggregator will return one row for each unique DEALERSHIP_ID. The mapping depicting the Sorter to Filter to Aggregator flow should be the same as Figure 10-7.3 Step 7: Create a Joiner Transformation for the Self-Join Create a Joiner transformation and name it jnr_MANAGERS_EMPLOYEES. Create an Aggregator transformation named agg_MANAGERS.6-01 erugiF Link the following ports from fil_MANAGERS transformation to the agg_MANAGERS transformation: ♦ ♦ DEALERSHIP_ID EMPLOYEE_NAME On the DEALERSHIP_ID port. check the 'Sorted Input' checkbox. . Under the Properties tab.3 . Edit the Aggregator. : p iT r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U .” Click OK on the Edit Transformations dialogue and the click Yes on the “Join Condition is empty…” dialogue.1 .2 .1 . check the checkbox in the 'Group By' column. The join condition will be set shortly. ♦ ♦ Save your work.7-01 erugiF rablooT no nocI noitamrofsnarT rotagerggA . The Aggregator transformation can be used to eliminate duplicate manager records.

c . Link all ports from the srt_EMPLOYEES_DEALERSHIP_ID_DESC transformation to the jnr_MANAGERS_EMPLOYEES transformation. Rename the following ports linked from the Sorter transformation: DEALERSHIP_ID1 to EMPLOYEE_DEALERSHIP_ID EMPLOYEE_NAME1 to EMPLOYEE_NAME (remove the '1') Add the following join condition: MANAGER_DEALERSHIP_ID = EMPLOYEE_DEALERSHIP_ID Save your work.Link all ports from the agg_MANAGERS transformation into the jnr_MANAGERS_EMPLOYEES Joiner transformation.6 .b . Edit the jnr_MANAGERS_EMPLOYEES transformation: Rename the two ports linked from the Aggregator transformation as follows: DEALERSHIP_ID to MANAGER_DEALERSHIP_ID EMPLOYEE_NAME to MANAGER_NAME Ensure that both ports have checks under the “M” column defining them as the Master record.1 . .8-01 erugiF Step 8: Get Salaries from the Lookup Link the EMPLOYEE_ID port from the jnr_MANAGERS_EMPLOYEES transformation to the IN_EMPLOYEE_ID port in the lkp_salaries Lookup transformation.7 ♦ ♦ ♦ ♦ 632 .a Review Figure 10-8 to verify your work.5 . repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U rehtegot kcab denioj maerts atad tilpS . .d .4 .

2 MANAGER_NAME EMPLOYEE_DEALERSHIP_ID --> DEALERSHIP_ID EMPLOYEE_ID EMPLOYEE_NAME ADDRESS CITY STATE ZIP_CODE COUNTRY EMPLOYEE_PHONE FAX_NUMBER EMAIL NATIVE_LANGUAGE SECOND_LANGUAGE THIRD_LANGUAGE POSITION_TYPE REGIONAL_MANAGER HIRE_DATE EMPLOYEE_GENDER AGE_GROUP DATE_ENTERED --> EMPLOYEE_ID --> EMPLOYEE_NAME --> EMPLOYEE_ADDRESS --> EMPLOYEE_CITY --> EMPLOYEE_STATE --> EMPLOYEE_ZIP_CODE --> EMPLOYEE_COUNTRY --> EMPLOYEE_PHONE_NUMBER --> EMPLOYEE_FAX_NUMBER --> EMPLOYEE_EMAIL --> NATIVE_LANG_DESC --> SEC_LANG_DESC --> TER_LANG_DESC --> POSITION_TYPE --> REGIONAL_MANAGER --> HIRE_DATE --> EMPLOYEE_GENDER --> AGE_GROUP --> DATE_ENTERED 732 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U : p iT Link the SALARY port from the lkp_salaries transformation to the EMPLOYEE_SALARY port in the STG_EMPLOYEES target. the rest must be done manually. --> DEALERSHIP_MANAGER .1 .Step 9: Connect the Joiner and Lookup to the Target Link the following ports between jnr_MANAGERS_EMPLOYEES to STG_EMPLOYEES target: Hint: Some ports can be auto-linked by name. .

3 .1 .01-01 erugiF .9-01 erugiF .a . Select lkp_salaries from the Transformations folder on the mapping tab and verify the following property values: Lookup source file directory = $PMLookupFileDir\. confirm that Source file directory is set to $PMSourceFileDir\. Select STG_EMPLOYEES located under the Target folder in the Mapping navigator.tsil_eeyolpme eht rof seitreporp ecruoS . Set the relational target connection object property to NATIVE_STGxx where xx is your student number.txt. In Properties > Attribute > Source filename type in employees_list.3 .Save your work.c .4 .gnippam nioj-fles detelpmoc eht fo weiv cinocI . Edit session s_m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD_xx.ii .b .txt and change Source filetype property from Direct to Indirect. Check the property Truncate target table option in the target properties.6 Save your work. 832 . Link the Start task to the s_m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD_xx session task. Create a new workflow named wkf_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD_xx Create a session task using the m_STG_EMPLOYEES_DEALERSHIP_MGR_LOAD_xx mapping.d .2 . (this will need to be set because the data load from a previous lab needs to be replaced).i .5 Step 10: Create and Run the Workflow Launch the Workflow Manager and sign into your assigned folder. The properties should look similar to Figure 10-10. ♦ ♦ . Lookup source filename = salaries. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U tsil elif txt. In the Mapping tab.

8 .932 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U nur noisses detelpmoc eht fo scitsitatS tegraT/ecruoS .9 nur noisses detelpmoc eht fo sliateD ksaT . .21-01 erugiF . Review the Task Details.11-01 erugiF .7 Review the Source/Target Statistics. Start the workflow.

Your data should appear the same as displayed in Figure 10-13 through Figure 10-14.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U 042 :e to N thgir dellorcs 2 neercs .41-01 erugiF 1 neercs .elbat tegrat SEEYOLPME_GTS eht ni seeyolpmE dna sreganaM fo nioj-fles eht fo weiverp ataD . . Data Results Not all rows and columns are shown.elbat tegrat SEEYOLPME_GTS eht fo weiverp ataD .31-01 erugiF Preview the target data from the Designer.

142 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT g n i g a t S e e y o l p m E e h t d a o l e R : b a L 0 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT g n i g a t S e e y o l p m E e h t d a ol e R : b a L 0 1 t i n U 242 .

Update Strategy and Overrides After completing this Unit.Unit 11: Router. The Router transformation has a single input group and one or more output groups with each output group representing a filter condition. Router Transformation Type Active. Description The Router transformation is similar to the Filter transformation because it passes row data that meet the Router Group filter condition to the downstream transformation or target. Use of router transformations can result in improved performance compared to performing the same logic with multiple filter transformations. you should be able to: ♦ Describe the following features: Router transformations ♦ Update Strategy transformations ♦ Port default values ♦ Source Qualifier overrides ♦ Target update overrides ♦ Session task mapping overrides Use these features in mappings and workflows ♦ ♦ Lesson 11-1.r et u o R : 11 t i n U . 342 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e d i r r e v O d n a y g e t a rt S et a d p U .

r e t u o R : 11 t i n U 442 . repoleveD I leveL 8 retneCrewoP acitamrofnI s e d ir r e v O d n a y g et ar t S e t a d p U . the records are “routed” to each target based on conditions of one or more record (row) fields.Business Purpose A business may receive records that are re-directed to specific targets.

This would capture a record where a promo code (PROMO_ID) was incorrectly entered or a new code that has not been included in a filter group. 542 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e d i r r e v O d n a y g e t a rt S et a d p U . Whereas using multiple Filter transformation requires the same row data to be duplicated for each Filter transformation. magazines. Performance Considerations When splitting row data based on field values a Router transformation has a performance advantage over multiple Filter transformations because a row is read once into the input group but evaluated multiple times based on the number of groups. In the example the “DEFAULT” group routes rows that do not meet any of the group filters to an exception table. and at their website. Each record is loaded into different target tables based on a promotion code.Example In the following example a business receives sales results based on responses to coupons featured in the local newspapers.r et u o R : 11 t i n U .

Update Strategy Transformation Active. Type .r e t u o R : 11 t i n U 642 Lesson 11-2.repoleveD I leveL 8 retneCrewoP acitamrofnI s e d ir r e v O d n a y g et ar t S e t a d p U .

The Update Strategy transformation can be applied to meet this requirement. If the attribute is “un-checked” then reject rows will be skipped. Example In the following example a business wants to maintain the “MASTER_CUSTOMER” table with current information.r et u o R : 11 t i n U .Description The Update Strategy transformation “tags” a row with the appropriate DML (data manipulation language) for the PowerCenter writer to apply to a relational target. the table definition in a mapping must have a key identified otherwise the session created from that mapping will fail. two data paths 742 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e d i r r e v O d n a y g e t a rt S et a d p U . based on one or more criteria. :e to N Business Purpose A business process may require more than a single DML action on a target table.tags a row for delete to a target DD_REJECT . A target table may require historical information dealing with previous entries. Rows written to a target table. Using a set of Filter transformations along with previous mapping objects. Rows tagged with DD_REJECT will be passed on to the next transformation or target and subsequently placed in the appropriate “bad file” if the “Forward Rejected Rows” attribute is “checked” (default).tags a row for insert to a target DD_UPDATE . updated or deleted.tags a row for reject For the row tags DD_DELETE and DD_UPDATE.tags a row for update to a target DD_DELETE . may have to be inserted. Each row can be “tagged” with one of the following flags (the DD label stands for Data Driven): DD_INSERT .

one mapping with inserts and the other with updates. Performance Considerations The Update Strategy transformation performance can vary depending on the number of updates and inserts. Lesson 11-3. one for inserts (DD_INSERT) with the addition of a sequence number for new records and one for updates (DD_UPDATE) to update existing records with new information. Expression Default Values repoleveD I leveL 8 retneCrewoP acitamrofnI s e d ir r e v O d n a y g et ar t S e t a d p U . In some cases there may be a performance benefit to split a mapping with updates and inserts into two mappings and sessions.have been developed.r e t u o R : 11 t i n U 842 .

942 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e d i r r e v O d n a y g e t a rt S et a d p U . Source Qualifier Override .r et u o R : 11 t i n U Lesson 11-4.

yrevocer rof atad ecruos egats ton seod eciv r eS noi t a rg e tn I e ht .e mi tn u r t a se t ae rc re t ne C r e wo P t ah t y re uq LQS tlu a fe d e ht edi r r ev o o t u oy sw oll A ORDER BY PRODUCT.1elbaT . el ba t ae pe R si t u pt uO ci tsi ni m re te D si t u pt uO LQ S ts oP LQ S e rP tc ni tsi D tc el eS leveL gnicarT s t ro P d et r oS fo re b mu N re tliF e cr u oS ni oJ d e ni fe D res U y re uQ L QS no i t p i r c s e D y t r e po r P Properties .t ne tsi sn oc si a ta d t u pni eh t f o r e d r o e h t n eh w sn u r n oiss es ne e wt e b r ed r o e m as e ht n i si ta h t tu p tu o n oit a m ro fs na r t r o e c ru oS .repoleveD I leveL 8 retneCrewoP acitamrofnI s e d ir r e v O d n a y g et ar t S e t a d p U . at a d el ba t ae p e r ec ud o r p s ya wl a e nil epi p e h t ni sn oi ta m r ofs n a rt fi y r ev oc e r r of at ad ec ru os egats ton seod ecivreS noitargetnI eht .GROUP_ID. ni oj d eni f ed r esu a y fic e ps o t u oy sw oll A . PRODUCT.n u r g nie b e nil epi p e ht o t ro i rp n u r eb lli w ta h t L QS yfi ce ps o t u oy s wol lA .ytreporp siht erugifnoc uoy nehW .deriuqer ton si tnemetats eht fo noitrop ”erehw “ ehT .deificeps strop fo rebmun eht no eb lliw yb redro ehT .emitnur t a d et a r en eg si ta ht y r eu q L QS e h t ot ni d e t res ni e b lli w t ah t es u alc e r eh w a et a e rc o t u oy sw oll A . ks at n ois ses eh t ni d ei fic ep s n oitc e nn oc e ht gni su nu r eb lli w LQS e hT .yreuq LQS detareneg eht ni esualc yb redro na tresni lliw retneCrewoP . ks at n ois ses eh t ni d ei fic ep s n oitc e nn oc e h t gni su n u r eb lli w LQS e hT .reifilauQ ecruoS tsoC_tcudorP_tcudorP_qs eht nI .PRODUCT_ID.DI. el ba t ae p e r si tu p tu o d na ci tsi ni m re te d si t up t uo ne hW .ylno seulav tcnitsid tceles ot uoy swollA .nwod pot eht morf .GE .GE .snur neewteb tnetsisnoc si at a d tu p ni e ht ne h w s n u r n oiss es n e ew t eb e g na hc t o n se od ta h t tu p tu o n oit a m ro fs na r t r o e c ru oS .r e t u o R : 11 t i n U 052 . g ol n oiss es e h t ot ne t ti rw li at e d f o tn u om a e ht s ei fic ep S : eb lli w y b r e d ro e h t .2elbaT = DI.2 = s t ro p d et r os f o re b mu n e ht fi . nu r ne e b sa h e nil ep ip eh t re tf a nu r eb lli w ta ht LQ S yfi ce ps o t u oy s w oll A .

target tables are updated based on key values.r et u o R : 11 t i n U . You can change this in target properties: Update Override Generate SQL Edit UPDATE WHERE clause with non-key items .Lesson 11-5. Target Override By default.2 .1 .3 152 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e d i r r e v O d n a y g e t a rt S et a d p U .

Examples ♦ Source readers: Turn a relational source into a flat file repoleveD I leveL 8 retneCrewoP acitamrofnI s e d ir r e v O d n a y g et ar t S e t a d p U .r e t u o R : 11 t i n U 252 . Session Task Mapping Overrides You can override some mapping attributes in the Session task Mapping tab.Lesson 11-6.

r et u o R : 11 t i n U .♦ ♦ ♦ User-defined join: Modify a homogeneous join in the Source Qualifier Source filters: Add a filter to the Source Qualifier Target writers: Turn a relational target into a flat file 352 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e d i r r e v O d n a y g e t a rt S et a d p U .

repoleveD I leveL 8 retneCrewoP acitamrofnI s e d ir r e v O d n a y g et ar t S e t a d p U .r e t u o R : 11 t i n U 452 .

Using the Default Values option for NULL data replacement. Rows need to be tagged for update or insert accordingly. Any rows containing bad data will need to be written to an error file. Source rows from the staging area need to be tested to see if a row already exists in the dimension table. Technical Description Rows from the STG_EMPLOYEES table need to be loaded into the DIM_EMPLOYEES table. Overriding Target writer option. Finally.Unit 11 Lab: Load Employee Dimension Table Business Purpose The Mersche Motors data warehouse employee table is updated on a daily basis. Valid rows need to be tested to see if they exist already in DIM_EMPLOYEES and tagged for either INSERT or UPDATE accordingly. Invalid rows need to be written to an error file. any rows sent to the DIM_EMPLOYEE table need to get valid dates from DIM_DATES. EMPLOYEE_ID needs to be tested for NULL values. Source Qualifier Session property override. Goals ♦ ♦ ♦ ♦ ♦ Use of Update Strategy to tag rows for INSERT or UPDATE. Use of the Router transformation to conditionally route rows to different target instances. Duration 60 minutes 552 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U . Before loading the rows.

elbaT elcarO sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M d a oL / s w o R m e t s y S t eg r aT 12 . 8 8 elbaT elcarO xx_ D AO L_ SE EY OL PM E_ M ID _ m LOOKUPS e m a N e l iF s e l iF e m a N e lb aT s e lb aT TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .5 8 eliF talF . 3 . 1 2 .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U 652 ed i r r e v O L Q S / r e t l iF DI _ EE YOL P ME .1 r r e _s eey ol pm e _m id o fn I e l iF l an o i t i dd A d e t i m i l e D /d e x iF no i t a co L e l i F DI _ EEY OL P ME X X SE EYO LP M E_ MI D y e K e uq i n U tresnI ete leD xx UB DT e t ad p U r e n w O am eh c S yl n o s d aol yli a d r o f ed ir r ev o QS xx UB DT SE EY OL PM E_ GTS r e t l iF / no i t c e l e S r en w O / am eh c S DI _E EYO L PM E elif r o rr e o t n et ti r w sw o r di _ ee yol p me ll u N etadpU/dneppA tegraT yli a D .s wo r g ni tsix e ts e t ot elb a t te g r at o t d n a s ei r tn e e ta d ro f d e riu q e r sp uk oo L .S EE YO LP ME _GT S xx UB DT ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL no i t a c oL SE EY OL PM E _M I D D I_ EE YO LP ME _S EE YO LP ME _ MI D _p kl noi ti nif e d SE EY OL PM E_ M ID no des a B d exiF s eliF tgT \s eli fm p\ : C t t uo .S EEY OL P ME _M I D = D I_ EE YO LP ME . eli f t alf a ot ne tti r w s w or r o r re h ti w el b at t e g ra t n ois ne mi d e ht ot el b at gni g ats mo r f a ta d ev o M 0 .

The DIM_EMPLOYEE table needs to be loaded from the STG_EMPLOYEES table. 01/02/2003 and 01/03/2003.752 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U The DIM_EMPLOYEE and DIM_DATES tables will be used as Lookup tables.SETAD_MID = DERETNE_ETAD. The mapping needs to be executed twice and manual SQ override will be required for both runs.SEEYOLPME_GTS xx UB DT no i t a c oL b al s uoi ve r p m o rf ehc ac t n ets is re p e su e R EULAV_ETAD.SETAD_MID = DERETNE_ETAD.SEEYOLPME_GTS xx UB DT no i t a c oL PROCESSING DESCRIPTION (DETAIL) HIGH LEVEL PROCESS OVERVIEW ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL SETAD_MID SETADPU_SETAD_MID_pkl SETAD_MID STRESNI_SETAD_MID_pkl . Substitute the NULL employee_id with 99999 using the default value option. Any rows with a null value for employee_id need to be routed to an error file. The STG_EMPLOYEES has two days worth of data. ) se ta d p U ( tegraT lanoitaleR y ge t ar tS e ta d p U p uk o oL pu ko o L )s r o r rE ( tegraT eliF talF ) st r es nI ( tegraT lanoitaleR r e tu o R n ois se r pxE ec r uo S l an oi ta le R y g et a rt S et ad p U p uk oo L b al s uoi ve r p m o rf ehc ac t n ets is re p e su e R EULAV_ETAD. The second day contains corrections to some of the first day's data.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U 852 D MI _ E M P L O Y E E S U P D A T E _ D K D MI _ E M P L O Y E E S NI S E R T _ D K D MI _ E M P L O Y E E S D E A L E R S H PI _ M A N A G E R S T G _ E M P L O Y E E S D E A L E R S H PI _ M A N A G E R D MI _ E M P L O Y E E S R E G OI N A L _ M A N A G E R D MI _ E M P L O Y E E S D E A L E R S H PI _ DI D MI _ E M P L O Y E E S P O S TI OI N _ T Y P E D MI _ E M P L O Y E E S T E R _ L A N G _ D E S C D MI _ E M P L O Y E E S S E C _ L A N G _ D E S C D MI _ E M P L O Y E E S N A T VI E _ L A N G _ D E S C D MI _ E M P L O Y E E S A G E _ G R O U P D MI _ E M P L O Y E E S E M P L O Y E E _ G E N D E R D MI _ E M P L O Y E E S E M P L O Y E E _ E M A LI D MI _ E M P L O Y E E S E M P L O Y E E _ F A X _ N M B R S T G _ E M P L O Y E E S E M P L O Y E E _ F A X _ N M B R D MI _ E M P L O Y E E S E M P L O Y E E _ P H O N E _ N M B R S T G _ E M P L O Y E E S E M P L O Y E E _ P H O N E _ N M B R D MI _ E M P L O Y E E S E M P L O Y E E _ C O U N T R Y S T G _ E M P L O Y E E S E M P L O Y E E _ C O U N T R Y D MI _ E M P L O Y E E S E M P L O Y E E _ Z PI _ C O D E S T G _ E M P L O Y E E S E M P L O Y E E _ Z PI _ C O D E D MI _ E M P L O Y E E S E M P L O Y E E _ S T A T E D MI _ E M P L O Y E E S E M P L O Y E E _ C TI Y D MI _ E M P L O Y E E S E M P L O Y E E _ A D D R E S S S T G _ E M P L O Y E E S E M P L O Y E E _ A D D R E S S D MI _ E M P L O Y E E S E M P L O Y E E _ N A M E D MI _ E M P L O Y E E S E M P L O Y E E _I D T a r g e t T a bl e T a r g e t C o ul m n SOURCE TO TARGET FIELD MATRIX D MI _ D A T E S D MI _ D A T E S S T G _ E M P L O Y E E S R E G OI N A L _ M A N A G E R S T G _ E M P L O Y E E S D E A L E R S H PI _ DI S T G _ E M P L O Y E E S P O SI T OI N _ T Y P E S T G _ E M P L O Y E E S T E R _ L A N G _ D E S C S T G _ E M P L O Y E E S S E C _ L A N G _ D E S C S T G _ E M P L O Y E E S N A T VI E _ L A N G _ D E S C S T G _ E M P L O Y E E S A G E _ G R O U P S T G _ E M P L O Y E E S E M P L O Y E E _ G E N D E R S T G _ E M P L O Y E E S E M P L O Y E E _ E M AI L S T G _ E M P L O Y E E S E M P L O Y E E _ S T A T E S T G _ E M P L O Y E E S E M P L O Y E E _ C TI Y S T G _ E M P L O Y E E S E M P L O Y E E _ N A M E S T G _ E M P L O Y E E S E M P L O Y E E _I D S o u r c e T a bl e S o u r c e C o ul m n D A T E _ K E Y D A T E _ K E Y ht e d a et v a ul e c o ul m n ni t h e D MI _ D A T E S at b el e n et r e d c o ul m n r of m ht e S T G _ E M P L O Y E E S ot L o o k u p ot D MI _ D A T E S at b el m at c h ni g ht e d a et ht e d a et v a ul e c o ul m n ni t h e D MI _ D A T E S at b el e n et r e d c o ul m n r of m ht e S T G _ E M P L O Y E E S ot L o o k u p ot D MI _ D A T E S at b el m at c h ni g ht e d a et E x p r e s s oi n N V ul al l u e fi D e f a ul t .

Copy the m_DIM_EMPLOYEES_LOAD partial mapping from the DEV_SHARED folder to your student folder and rename it to m_DIM_EMPLOYEES_LOAD_xx.3 Step 2: Edit the Expression Transformation Open the mapping m_DIM_EMPLOYEES_LOAD_xx.1 .Instructions Step 1: Copy the Mapping Launch the Designer and open your assigned folder. .2 .1 .2 .1-11 erugiF Save your work.4 .3 . Click Yes when the Target Dependencies dialog box comes up. r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U . 952 GNIPPAM_SEEYOLPME_MID_m eht fo weiv cinocI . Edit the exp_NULL_EMPLOYEE_ID Expression transformation and add a Default value of 99999 to the EMPLOYEE_ID port.2-11 erugiF xob golaid seicnednepeD tegraT ypoc gnippaM . Click the button to validate the default entry and the click OK. Your mapping should appear similar to Figure 11-2.

b . Add the Group filter condition: Name the second group UPDATES. updated or sent to the error file.iv .4 Step 3: Create a Router Transformation The Router transformation is going to be used to determine which rows will be inserted. Rename the Router to rtr_DIM_EMPLOYEES. Add the Group Filter Condition: ISNULL(EMPLOYEE_ID) AND IN_EMPLOYEE_ID != 99999 NOT ISNULL(EMPLOYEE_ID) AND IN_EMPLOYEE_ID != 99999 IN_EMPLOYEE_ID = 99999 062 .ii . Router should look similar to Figure 11-3.Save your work.1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U . Add a Router transformation to the mapping.a .vi .iii . Drag both ports from lkp_DIM_EMPLOYEES_EMPLOYEE_ID into the Router. In the Groups tab add 3 new groups using the Add new group icon: Name the first group INSERTS.3 . spuorG retuoR . Edit the Router transformation.1 . . This will be done by checking the value of the EMPLOYEE_ID port.i .2 .4 .3-11 erugiF Step 4: Create an Update Strategy for INSERTS Add an Update Strategy transformation named upd_INSERTS to the mapping. Add the Group Filter Condition: Name the third group ERRORS. Drag all ports except EMPLOYEE_ID from exp_NULL_EMPLOYEE_ID to the Router.v .

In the Properties tab set the following values: Lookup cache persistent = Checked (needs to be set) Cache File Name Prefix = LKPSTUxx (where xx is your student number) . . scroll down to the INSERTS Router group and drag all ports. Ensure that you use DATE_VALUE and not DATE_KEY. Rename the DATE_ENTERED1 port to IN_DATE_ENTERED.In the Router.3 .2 .c . except EMPLOYEE_ID1 and HIRE_DATE1. to the upd_INSERTS Update Strategy transformation.4-11 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U .a .d . Delete the 0 and enter DD_INSERT.3 .2 .a Step 5: Create Lookup to DIM_DATES Create a Lookup transformation named lkp_DIM_DATES_INSERTS that references the SC_DIM_DATES target table. Pass DATE_ENTERED1 from upd_INSERTS to lkp_DIM_DATES_INSERTS. Edit the lkp_DIM_DATES_INSERTS Lookup transformation: Uncheck all the Output checkmarks on all the ports except for DATE_KEY.b .b . See Figure 11-4.1 ♦ ♦ 162 TRESNI ot tes ygetartS etadpU .i . Create the condition DATE_VALUE = IN_DATE_ENTERED. In the Properties tab: Select the Update Strategy Expression Value box. Edit the upd_INSERTS Update Strategy transformation: Rename the IN_EMPLOYEE_ID1 port to EMPLOYEE_ID.

b Step 9: Link upd_UPDATES and lkp_DIM_DATES_UPDATES to Target DIM_EMPLOYEE_UPDATES From lkp_DIM_DATES_UPDATES. Save your work.1 . . to the upd_UPDATES Update Strategy transformation.4 .3 . and select Paste. scroll down to the UPDATES Router group and drag all ports. Edit the new Lookup transformation: Rename the new Lookup lkp_DIM_DATES_UPDATES.6 .a . Click OK.4 . Step 8: Create Second Lookup to DIM_DATES Right click on the existing lkp_DIM_DATES_INSERTS Lookup transformation and select Copy. Iconize the upd_INSERTS. In the Router.3 .4 .5 .3 . Select the More button and enter a '3' for From transformation Suffix. Select upd_UPDATES from the From transformation drop box and DIM_EMPLOYEES_UPDATES from the To transformation box.2 .3 .1 . Right click anywhere in the workspace and select Autolink… Select upd_INSERTS from the From transformation drop box and DIM_EMPLOYEES_INSERTS from the To transformation box. Ensure the Lookup condition is: DATE_VALUE = IN_DATE_ENTERED. Click OK. Move the cursor to the workspace. Right click anywhere in the workspace and select Autolink. link DATE_KEY to UPDATE_DK in DIM_EMPLOYEES_UPDATES.4 Step 7: Create an Update Strategy for UPDATES Create an Update Strategy transformation named upd_UPDATES.1 . . select the Update Strategy Expression Value box. Edit the upd_UPDATES Update Strategy transformation. right click.Step 6: Link upd_INSERTS and lkp_DIM_DATES_INSERTS to Target DIM_EMPLOYEE_INSERTS Link the DATE_KEY port from lkp_DIM_DATES_INSERTS to the INSERT_DK column in the DIM_EMPLOYEES_INSERTS target. Select the More button and enter a '1' for From Transformation Suffix.2 . Link DATE_ENTERED3 from upd_UPDATES to IN_DATE_ENTERED in the new Lookup transformation.2 . In the Properties tab. Delete the 0 and enter DD_UPDATE. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U 262 . lkp_DIM_DATES_INSERTS and DIM_EMPLOYEES_INSERTS transformations. except IN_EMPLOYEE_ID3 and HIRE_DATE3.2 .1 .

Save your work and ensure the mapping is VALID. lkp_DIM_DATES_UPDATES and DIM_EMPLOYEES_UPDATES transformations. Save your work.5-11 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U . Add a new Session task named s_m_DIM_EMPLOYEES_LOAD_xx.4 . .5 . Arrange All Iconic and the mapping should look similar to Figure 11-5: Step 11: Create and Run the Workflow The first thing that we need to do is to run a pre-created workflow that loads three dimension tables.1 . Click OK. Launch the Workflow Manager and sign into your assigned folder. Link the Start task to the new Session task.3 . Locate and run the wkf_U11_Preload_DIM_PAYMENT_DEALERSHIP_PRODUCT_xx workflow.5 .3 .2 .Iconize the upd_UPDATES. Select the More>> button and enter a '4' for From Transformation Suffix.4 .1 . Delete the link for EMPLOYEE_ID4 and link instead IN_EMPLOYEE_ID4. Create a workflow named wkf_DIM_EMPLOYEES_LOAD_xx. 362 gnippam detelpmoc eht fo weiv cinocI .5 Step 10: Link ERRORS Router Group to DIM_EMPLOYEES_ERR Using Autolink… Select the ERRORS group of rtr_DIM_EMPLOYEES from the From Transformation drop down box and DIM_EMPLOYEES_ERR from the To Transformation box. Make sure that it completed successfully and that all rows were successful.6 .2 . using the m_DIM_EMPLOYEES_LOAD_xx mapping.

i repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U eulaV retliF ecruoS .iii . SQL overrides will override any entries in the mapping until the override is deleted. save it.i It is sometimes easier to add a quick Source filter in the Session than to go back and modify the mapping.iii . .) Click on SQ_STG_EMPLOYEES. refresh the session. save it.b . Under the Writers section: Change Relational Writer to File Writer.i : p iT .ii . (This will take care of the three lookup tables pointing to $Target. The error handling specifications want error rows written to a file. then run the workflow. Add the Source Filter condition: DATE_ENTERED = '01/02/2003' In the Mapping tab navigator window: 462 . Change all DB Connection values that relate to the source tables (STG) to NATIVE_STGxx. Change the $Target connection value to NATIVE_EDWxx as well. Make sure if using 'shortcuts' the prefix to the table is deleted before saving the filter.6-11 erugiF . Click on the target DIM_EMPLOYEE_ERR.ii .Edit the Session task Mapping tab: Select the . Change all DB Connection values that relate to the target tables (DIM) to NATIVE_EDWxx.c .a . not a table. Scroll down in the Properties section window to the Source Filter attribute.6 node in the navigation window.

8-11 erugiF amehcs tegraT fo noitces sretirW . To create a flat file as a target instead of the original table. Review the Task Details and Source/Target statistics. : p iT 562 nur noisses detelpmoc eht fo sliateD ksaT . simply change the Writers type from Relational to File.9-11 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U . They should be the same as displayed in Figure 11-8 and Figure 11-9. A fixed width flat file based on the format of the target definition will be created automatically.ii .In the Properties Attribute. Save your work and start the workflow. . rename the Output filename to include your student number. The properties of this file can also be altered by the user.8 .7 .7-11 erugiF scitsitatS tegraT/ecruoS .

Save and run the workflow. In the Mapping tab. Review the Task Details and Source/Target statistics.2 . If the Integration Service process runs on UNIX.5 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U 662 . you may want to review the three rows that were written to the error file. See the instructor for the location of the files. your data should appear similar as displayed in Figure 11-10.1 . ssecorP ecivreS noitargetnI eht gnitsoH enihcaM eht no detacoL( eliF talF rorrE eht rof stluseR ataD . Run. SEEYOLPME_MID rof stluseR ataD . and Monitor the Second Run Edit the s_m_DIM_EMPLOYEES_LOAD_xx session task.4 . Scroll down the Properties section and edit the Source filter to reflect day two loading: 01/03/2003. Also.11-11 erugiF Step 12: Prepare. you may need special permission from your administrator to see the files.3 .01-11 erugiF Scroll all the way to the right to confirm that the INSERT_DK column was updated and not the UPDATE_DK column.Data Results Preview the DIM_EMPLOYEES target data from the Designer. . click SQ_STG_EMPLOYEES in the Navigation window.

.31-11 erugiF nur dnoces rof stluser bat sliateD ksa .21-11 erugiF T They should be the same as displayed in Figure 11-12 and Figure 11-13.762 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U nur dnoces rof scitsitatS tegraT/ecruoS .

Scroll to the far right of the data screen and notice that there are now entries for UPDATE_DK and new entries at the bottom of the list for INSERT_DK.Preview the DIM_EMPLOYEES target data from the Designer. elbat tegrat eht ot setadpu gniwohs weiverp ataD .41-11 erugiF repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U 862 .

962 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n o i s n e mi D e e y o l p m E d a o L : b a L 11 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D e e y o l p m E d a o L : b a L 11 t i n U 072 .

172 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I g n i g g o L r o rr E d n a p u k o o L ci m a n y D : 2 1 t i n U .Unit 12: Dynamic Lookup and Error Logging After completing this module. you should be able to: ♦ Describe the following features: Dynamic Lookup cache ♦ Error logging Use these features in mappings and workflows ♦ ♦ Lesson 12-1. Description A Basic Lookup transformation allows the inclusion of additional information in the transformation process from an external database or flat file source. However when the lookup table is also the target row data may go out of sync with the target table image loaded in memory. The Dynamic Lookup transformation allows for the synchronization of the target lookup table image in memory with its physical table in a database. Dynamic Lookup Cache Type Passive. Business Purpose In a data warehouse dimension tables are frequently updated and changes to new row data must be captured within a load cycle.

The record for Silvia Williamson shows a change in marital status from “S” to “M”.Example A business updates their customer master table on a daily basis. The following mapping uses a Lookup transformation Dynamic Lookup Cache option to capture the changes: repoleveD I leveL 8 retneCrewoP acitamrofnI g n i g g o L r o r r E d n a p u k o o L ci m a n y D : 2 1 t i n U 272 . Within a day a customer may change there status or correct an error in their information. The following data is an example of two new records followed by two changed records within the day. A new customer record may be added in the morning and a change to that record may be added later in the day. The record for David Mulberry shows a change in the zip code from 02061 to 02065. the change (insert followed by an update) needs to be detected dynamically.

t re sni fo e py t w o r e ht hti w n oi ta m r ofs n a rt p uk o oL eh t g ni re t ne s w or ot s eil pp A .372 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I g n i g g o L r o rr E d n a p u k o o L ci m a n y D : 2 1 t i n U .ytreporp siht elbane uoy nehW . Dynamic Cache Properties . eh ca c p uk o ol ci m any d a es u ot se t aci dn I noitpircse D l a no it al eR tr es n I esl E et a dp U l a no it al eR et ad p U es lE t r es nI l a no it al eR et a dp U nO eulaV dlO tuptuO l a no it al eR e p yT p u k o o L e hca C p uk o oL ci m any D no i tp O For more detailed explanations consult the online help. d el ba n e eh cac pu ko ol e ht hti w yl no es U . at a d t up ni e h t no de sa b w o r e ht de ta d pu ti e r of eb eh cac puk o ol e ht ni d ets ixe ta ht eul av eh t st u pt u o ti .ytreporp siht tceles ton od uoy fI .s t ro p t up t uo /p uk o ol eht fo tuo seulav dlo stuptuo ecivreS noitargetnI eht .t r es ni si n oi ta m ro fs n ar t p uk oo L e h t gn i re tn e e py t w o r e ht d n a yt r ep o r p si h t tc el es u oy n e hW . eh cac eh t ni wo r a s et a dp u e civ re S n oi ta r ge t nI e h t n eh W .stsixe ti fi ehcac eht ni wor eht setadpu ecivreS noitargetnI eh t .s eul av ll un s tu p tu o ti .wen si ti fi ehcac eht otni wor eht stresni ecivreS noitargetnI e h t . e ta d pu si n oi ta m r ofs n a rt puk o oL eh t g ni re t ne e py t w o r e ht ne h w e hc ac eht ni swor gnitsixe setadpu ylno ecivreS noitargetnI eht .t r es ni si n oit a m ro fs na r t p uk oo L e ht gni r e tn e e pyt w or eh t n eh w ehc ac eh t otni swor wen stresni ylno ecivreS noitargetnI eht . et a dp u f o e py t w o r e ht hti w noi t am r of sn a rt pu ko o L e ht gni r e tn e s wo r ot s eil pp A .ytreporp siht tceles ton od uoy fI .e lb at te g r at e h t ot s w o r s ess a p ti sa e hc ac p uko ol e ht ni s wo r se t ad pu ro st r es nI .wen si ti fi wor eht stresni dna . e hc ac e ht n i w o r w en a s t re sni eciv r eS noi t ar g et n I eh t n e hW .stsixe ti fi wor eht setadpu dna . et a dp u si n oi ta m ro fs n ar t p uk oo L e h t gn i re tn e e py t w o r e ht d n a yt r ep o r p si h t tc el es uo y n eh W .

repoleveD I leveL 8 retneCrewoP acitamrofnI g n i g g o L r o r r E d n a p u k o o L ci m a n y D : 2 1 t i n U 472 .

A SQL override in the Lookup transformation can be used to reduce the amount of memory used by the Lookup cache. Performance Considerations A large lookup table may require more memory resources than available. The flag “New Lookup Row” indicates the type of row manipulation of the cache. A Filter or Router transformation can be used with an Update Strategy transformation to set the proper row tag to update a target table. The “Ignore in Comparison” should be checked for any port that is not to be compared.e hc ac e ht ni w o r e ht t r es ni ro e t ad p u to n se o d eci v re S n oit a rg e tn I e hT .Key Port Points ♦ ♦ ♦ ♦ The Lookup transformation “Associated Port” matches a Lookup input port with the corresponding port in the Lookup cache.e hc ac e ht ni w o r e ht s et ad p u eci v re S n oit a rg e tn I e hT no i tp i r c s e D r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I g n i g g o L r o rr E d n a p u k o o L ci m a n y D : 2 1 t i n U w o R pu k oo L w e N 0 1 2 . 572 . ehc ac eh t o tni wo r eh t st r es ni eci v re S n oit a rg e tn I e hT . If no change is detected the flag is set to “0”. If an input row creates an update of the lookup cache the flag is set to “2”. The “Ignore Null Inputs for Updates” should be checked for ports where null data in the input stream may overwrite the corresponding field in the Lookup cache. If an input row creates an insert in the Lookup cache the flag is set to “1”.

Data reject. For example: ♦ ♦ Target database constraint violations. The data row has only passed partway through the mapping transformation logic. null values not accepted Target table properties 'reject truncated/overflowed rows' A data reject can also be forced by an Update Strategy. The data row is fully transformed according to the mapping logic but due to a data issue.Lesson 12-2. These error types are recorded as follows: N O g n i gg oL ) t lu a f e D ( FF O g n i gg oL e p yT r o r r E repoleveD I leveL 8 retneCrewoP acitamrofnI g n i g g o L r o r r E d n a p u k o o L ci m a n y D : 2 1 t i n U . Error Logging PowerCenter recognizes the following types of errors: ♦ ♦ Transformation. go l no iss es o t n et ti r w s r o r r e l at aF elif ro selbat rorre wor ot nettirW de d r acsi d w o r n eh t g ol n oiss es o t n et ti r w s ro r r e llA t e g ra t n oiss es r o f de r u gif n oc eli f )d a b.s el ba t la n oit al e r r o eli f t al f ot de d ne p pa sr o r r e l lA . log space errors. ( tc ej e r o t de d ne p pA srorre noitamrofsnarT st cej e r a ta D 672 . An error occurs within a transformation. out-of-space errors. it cannot be written to the target.

772 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I g n i g g o L r o rr E d n a p u k o o L ci m a n y D : 2 1 t i n U Error Log Types Error logging is set in the Session task: .

g. port names with datatypes ♦ PMERR_DATA: Error row and source row data in string format e.g.produces one file containing session metadata followed by de-normalized error information in the following format: ♦ ♦ Transformation || Transformation Mapplet Name || Transformation Group || Partition Index || Transformation Row ID || Error Sequence || Error Timestamp || Error UTC Time || Error Code || Error Message || Error Type || Transformation Data || Source Mapplet Name || Source Name || Source Row ID || Source Row Type || Source Data repoleveD I leveL 8 retneCrewoP acitamrofnI g n i g g o L r o r r E d n a p u k o o L ci m a n y D : 2 1 t i n U 872 . Values are: ♦ ♦ None (no external error logging) Relational Database .Affects location attributes.g.produces 4 tables: PMERR_SESS: Session metadata e. [indicator1: data1 | indicator2: data2] Flat File . source name. transformation group name. repository name ♦ PMERR_MSG: Error messages for a row of data ♦ PMERR_TRANS: Transformation metadata e. workflow name. session name.

972 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I g n i g g o L r o rr E d n a p u k o o L ci m a n y D : 2 1 t i n U Log Source Row Data Log Row Data .

repoleveD I leveL 8 retneCrewoP acitamrofnI g n i g g o L r o r r E d n a p u k o o L ci m a n y D : 2 1 t i n U 082 .Source row logging does not work downstream of active transformations (where output rows are not uniquely correlated with input rows).

This logic must be able to test if a customer record has already been loaded in the current run and if so. Many customers visit dealership locations more than once on a daily basis so the warehouse logic has to be able to track multiple visits on the same day. what. Reinforce the Update Strategy. Some rows will have null data so flat file error logging will be used to capture these. A Dynamic Lookup will need to be used since a customer row could occur more than once in the source.Unit 12 Lab: Load Customer Dimension Table Business Purpose Mersche Motors data warehouse has a customer table that is loaded on a daily basis. Introduce error logging. if anything. Duration 50 minutes 182 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n oi s n e m i D r e m o ts u C d a o L : b a L 2 1 t i n U . Data will have to be tested for new rows. has changed about the customer. existing rows and invalid rows. Objectives ♦ ♦ ♦ Introduce Dynamic Lookups. Technical Description PowerCenter will source from the staging table STG_CUSTOMERS and load the dimension table DIM_CUSTOMERS. Customer data may have more than one occurrence in the source.

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D r e m o t s u C d a o L : b a L 2 1 t i n U 282 The source staging table contains customer data that needs to be tested dynamically against the target dimension table in order to process possible duplicate customers. update if row requires an update or rejection if a row is determined to be invalid. Invalid rows will be rejected during the update strategy and sent to an error logging file. Based on the test results. records will be marked for insertion if new. el ba t n ois n emi d re mo ts uc e h t ot ni d e da ol e b lli w a ta d r e mo ts u C 74 16 elbaT elcarO d ao L / s wo R m e t s y S t e gr aT xx_DAOL_YLIAD_NYD_SREMOTSUC_MID_m PROCESSING DESCRIPTION (DETAIL) re tliF p uko o L e c ru oS la n oit al e R X r e n w O / am eh c S HIGH LEVEL PROCESS OVERVIEW X SREMOTSUC_MID e t ad p U r e n w O am eh c S e m a N e lb aT s e lb aT xx UB DT SREMOTSUC_GTS D I _TS U C g ni gg ol ro r r e el ba t la n oit al e R sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P yli a D 77 1 6 elbaT elcarO y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications . tegraT l an oi ta le R y g et a rt S et a dp U D I _TS U C X y e K eu q in U tresnI ete leD xx UB DT r e t l i F / no i t c e l e S .

382 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n oi s n e m i D r e m o ts u C d a o L : b a L 2 1 t i n U E GA _TS U C L IA M _E _TS U C EM O CN I _TS U C P UO RG _E GA _TS U C R ED N EG _TS U C R B MN _ EN O HP _TS U C YRT N UO C _TS U C E DO C _P IZ _TS U C ETATS_TSUC YTI C _TS U C S SE R D DA _TS U C E MA N _TS U C D I _TS U C R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S R E M OT S U C _ G T S EGA _T SU C LI AM _E _T SU C E MO C NI _T SU C P UO RG _ EGA _T SU C R E D NEG _T SU C RB M N_ E NO HP _T SU C YRTN U OC _T SU C E DO C_ PIZ _T SU C ETATS_TSUC YT IC _T SU C S SE R D DA _T SU C E M AN _T SU C DI _T SU C REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID REMOTSUC_MID lluN f i eu l aV t lu a f e D noisserpxE n m u lo C e c ru o S e l b aT e c r uo S nm u l o C t eg r aT e l b aT t eg r aT SOURCE TO TARGET FIELD MATRIX .

1 . Rename it to SC_STG_CUSTOMERS. Select all the ports from SQ_SC_STG_CUSTOMERS and drop them on to an empty port at the bottom of the Lookup. Rename it lkp_DIM_CUSTOMERS.2 . Create a shortcut to the DIM_CUSTOMERS target table found in the DEV_SHARED folder.c . Save your work.3 .1 . . Create a new mapping named m_DIM_CUSTOMERS_DYN_DAILY_LOAD_xx. Step 3: Create a Mapping Open the Mapping Designer tool.2 . Add the SC_STG_CUSTOMERS relational source to the new mapping.ii Select the Ports tab and for all ports coming from SQ_SC_STG_CUSTOMERS prefix them with IN_ and remove the “1” from the end of the name. 482 . Select the Properties tab.1 .5 .b .3 .a . Click on the Dynamic Lookup Cache value. .4 Step 2: Create a Relational Target Definition Open the Target Designer tool.4 . Click on the Insert Else Update value.1 .3 .3 . Select the Condition tab and create the condition CUST_ID = IN_CUST_ID.Instructions Step 1: Create a Relational Source Definition Launch the Designer and sign into your assigned folder. Edit the Lookup transformation.d repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D r e m o t s u C d a o L : b a L 2 1 t i n U . Add the SC_DIM_CUSTOMERS relational target to the new mapping. Step 4: Create a Lookup Transformation Create a new Lookup transformation using the SC_DIM_CUSTOMERS table.i .2 .2 . Rename it to SC_DIM_CUSTOMERS. Drag the lookup window and make it taller. Verify you are in the Source Analyzer tool and create a shortcut to the STG_CUSTOMERS source table found in the DEV_SHARED folder.

Select the Ports tab again. It should look the same as Figure 12-1. 1. 0 = no change 1 = Insert 2 = Update r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n oi s n e m i D r e m o ts u C d a o L : b a L 2 1 t i n U :e to N . 0. :e to N :e to N 582 pukooL cimanyd a fo weiv bat troP . 2. This enables PowerCenter to update the Lookup Cache with correct values. The Associated port column is there to allow the association of input ports with lookup ports of different names.e .1-21 erugiF NewLookupRow is used to store the values. Dynamic lookups allow for inserts and updates to take place in cache as the same operations take place against the target table. Notice the new port entry called NewLookupRow.

noitaicossA troP ot troP . Edit the upd_DIM_CUSTOMERS Update Strategy transformation. 682 . If you need assistance refer to the reference section at the end of the lab. If you need assistance refer to the reference section at the end of the lab. Refer to the Unit 11 lab for details on the Update Strategy Transformation. See Figure 12-2. Use the following pseudo code to construct your expression. Add an Update Strategy Expression that marks the row as an insert. This will send any rejected rows to error logs which will be created later. click the box where it says “N/A” and select the port names from the list that you want to associate.b .g . or all rows where the CUST_ID is NULL to pass through.1 Autolink ports by name to the SC_DIM_CUSTOMERS target.1 Step 6: Create an Update Strategy Create an Update Strategy transformation named upd_DIM_CUSTOMERS.3 . .2 .h . Drag all output ports from the Lookup transformation to the Filter transformation. If CUST_ID is NULL then reject the row Else If NewLookupRow equals 1 then mark the row for insert Else if NewLookupRow equals 2 then mark the row for update.2 .4 Associate the remaining ports. Click OK and save your work. Ensure the Forward Rejected Rows option is checked. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D r e m o t s u C d a o L : b a L 2 1 t i n U : p iT .5 . Drag all ports from the Filter transformation to the Update Strategy transformation.Under the Associated Port column. Clear the Output checkmarks for all of the ports prefixed with “IN_”. . update or reject. Create a condition that allows all rows that are marked for update or insert.2-21 erugiF Step 5: Create a Filter Transformation Create a Filter transformation named fil_ROWS_UNCHANGED. Any rows where NewLookupRow != 0 are deemed to be inserts or updates.f .3 .a .

5 .Save your work.i . Edit the s_m_DIM_CUSTOMERS_DYN_DAILY_LOAD_xx session task. Change the Error Log File Name to PMErrorxx.log where xx refers to your student number. Set the connection value for the SQ_STG_CUSTOMERS source to your assigned NATIVE_STGxx connection object. Create a new workflow named wkf_DIM_CUSTOMERS_DYN_DAILY_LOAD_xx.b . In a Production environment.4-21 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n oi s n e m i D r e m o ts u C d a o L : b a L 2 1 t i n U .ii .a .4 . . Step 7: Create and Run the Workflow Launch the Workflow Manager and sign into your assigned folder.1 782 gnippaM detelpmoC eht fo weiV cinocI .3 .5 . :e to N neercS eciohC goL rorrE .3-21 erugiF Save your work and start the workflow. Add a new Session task using m_DIM_CUSTOMERS_DYN_DAILY_LOAD_xx mapping.2 .c . In the Config Object tab: Change Error Handling section for the entry Error Log Type from None to Flat File as shown in Figure 12-4. error logging tables or files would be created in a different schema or location than the production schema or file location. Set the connection value for the SC_DIM_CUSTOMERS target to your assigned NATIVE_EDWxx connection object.

7 Select the Source/Target Statistics tab.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D r e m o t s u C d a o L : b a L 2 1 t i n U 882 nuR noisseS eht rof scitsitatS tegraT/ecruoS .5-21 erugiF . .6-21 erugiF . Your statistics should be the same as displayed in Figure 12-6. your information should appear similar to Figure 12-5.6 Review the Task Details. nuR noisseS detelpmoC eht fo sliateD ksaT .

your data should appear the same as displayed in Figure 12-7.982 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n oi s n e m i D r e m o ts u C d a o L : b a L 2 1 t i n U elbat SREMOTSUC_MID eht fo weiverp ataD . .7-21 erugiF Data Results Preview the target data from the Designer.

1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D r e m o t s u C d a o L : b a L 2 1 t i n U 092 . DD_REJECT. DD_UPDATE))) . DD_INSERT.Error Log Results The error log is written to the BadFiles directory configured for the Integration Service process under the default name of PMErrorxx. IIF(NewLookupRow = 1.log.8-21 erugiF Reference fil_ROWS_UNCHANGED Condition NewLookupRow != 0 OR ISNULL(CUST_ID) upd_DIM_CUSTOMERS Expression IIF(ISNULL(CUST_ID). The log should appear similar to Figure 12-8. IIF(NewLookupRow = 2. gol rorre elif talF .2 . Look in this location for the error log and look at the rows that were written there.

192 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT n oi s n e m i D r e m o ts u C d a o L : b a L 2 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT n o i s n e m i D r e m o t s u C d a o L : b a L 2 1 t i n U 292 .

Unconnected Lookup Transformations 392 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e l b a ir aV d n a sr e t e m ar a P . p u k o o L d et c e n n o c n U : 3 1 t i n U .Unit 13: Unconnected Lookup. Parameters and Variables After completing this unit. you should be able to: ♦ Describe these features: Unconnected Lookup transformation ♦ System variables ♦ Mapping parameters and variables Use these features in mappings and workflows ♦ ♦ Lesson 13-1.

Type Passive. Description The unconnected Lookup transformation allows the inclusion of additional information in the transformation process from an external database or flat file source when it is referenced within any transformation that supports expressions. repoleveD I leveL 8 retneCrewoP acitamrofnI s e l b ai r aV d n a sr e t e m ar a P . p u k o o L d et c e n n o c n U : 3 1 t i n U 492 .

The holes in the data can be filled by performing a look up to another table or tables. p u k o o L d et c e n n o c n U : 3 1 t i n U . As only a percentage of the rows are affected it is better to perform the look up on only those rows that need it and not the entire data set.Business Purpose A source table or file may have a percentage of records with incomplete data. Example In the following example an insurance business received records of policy renewals. 592 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e l b a ir aV d n a sr e t e m ar a P . a small percentage of records have the CUSTOMER_ID field data missing. The following mapping uses an Unconnected Lookup transformation to fill in the missing data.

If the R port is not checked that mapping will be valid but the session created from the mapping will fail at run time.lookupname. The condition is evaluated for each row but the lookup function is only called if the condition evaluates to TRUE. p u k o o L d et c e n n o c n U : 3 1 t i n U 692 . Performance Considerations Using a cached Lookup attribute can improve performance if the Lookup table is static. Connected versus Unconnected Lookup Transformations repoleveD I leveL 8 retneCrewoP acitamrofnI s e l b ai r aV d n a sr e t e m ar a P . An Unconnected Lookup transformation returns on one value designated by the Lookup transformation R (return) port. Data from several input ports may be passed to the Lookup transformation but only one port may be returned.Key Points ♦ ♦ ♦ ♦ ♦ ♦ Use the lookup function within a conditional statement. The unconnected Lookup transformation is called using the key expression :lkp.

System Variables Joins versus Lookups . p u k o o L d et c e n n o c n U : 3 1 t i n U Lesson 13-2.792 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e l b a ir aV d n a sr e t e m ar a P .

p u k o o L d et c e n n o c n U : 3 1 t i n U Business Purpose The main reason that system variables are utilized to build mappings in PowerCenter is that they can provide consistency to program execution. To set a value of a port to the system date the developer needs to do this in an expression within a transformation.g ni r ts a sa de n r ut e r e mit t r a tS n ois se S e hT EMITTRATSSSES$$$ EMITTRATSSSES ETADSYS 892 e lb a ir aV . The user cannot control the content of the variable but can use the information contained within the variable. no it uc ex e s t ra ts n ois se s eh t t ah t e mi t e hT . Three variables that we will discuss are described in the table shown below.Description System variables hold information that is derived from the system. eci vr e S no it a rg e tn I e ht f o e mi t e ht n o d es ab si si hT . Example Setting a port to the system date. noitpircse D repoleveD I leveL 8 retneCrewoP acitamrofnI s e l b ai r aV d n a sr e t e m ar a P . Port: DATE_UPDATED Datatype: Date Expression: SYSDATE . For this example we will set the DATE_UPDATED port to the system date.n o g ni nn u r si r e tn e C re w oP t a ht me tsys eh t n o e mit / et ad tn e r ru c e hT . Business and systems professionals will find this very useful when building systems.

Lesson 13-3. 992 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e l b a ir aV d n a sr e t e m ar a P . select Mapping>Parameters and Variables from within the Mapping Designer in the Designer client. Parameters are different from variables in that the value of a parameter is fixed during the run of the mapping while the value for a variable can change. Each parameter and variable is defined with a specific data type. Both parameters and variables can be accessed from anywhere in the mapping. Mapping Parameters and Variables Description A mapping can utilize parameters and variables to store information during the execution. To create a parameter or variable. p u k o o L d et c e n n o c n U : 3 1 t i n U .

Scope Parameters and variables can only be utilized inside of the object that they are created in. For instance a mapping variable created for mapping_1 can only be seen and used in mapping_1 and is not available in any other mapping or mapplet. when a variable is created its scope is relative to the object in which it was created. repoleveD I leveL 8 retneCrewoP acitamrofnI s e l b ai r aV d n a sr e t e m ar a P . As a general rule for Informatica. A parameter or variable's scope is the mapping in which it was created. p u k o o L d et c e n n o c n U : 3 1 t i n U 003 .

n u r n oiss es tx e n eh t ro f el ba i rav eh t f o e ul av t r ats eh t sa e ul av d ev as e ht s es u ti .1+ tnemercni tresnI si epyT woR eht fI . eul av re w ol e ht ot e ul av t n e rr uc eh t st es d n a eu lav r ew ol e h t s n ru t eR . no itc n uf eh t ot ni de ssa p eu lav e ht o t e ul av tn e r ru c e r a pm o C . The SetVariable function writes the final value of a variable to the repository based on the Aggregation Type selected when the variable was defined.RAV_NIM$$(elbairaVniMteS )01.tnemercni eteleD si epyT woR fi . the values of variables are saved to the repository. ne d di r re vo ss el n U .1. )01. n oiss es lu fss ec cus a fo dn e e ht tA . current value or initial value.el b ai ra v eht fo epyt etagergga eht no gnidneped . The final value written to the repository for a variable that has an Aggregate type of Max will be whichever value is greater.RAV_XAM$$(elbairaVxaMteS )RAV_TNUOC$$(elbairaVtnuoCteS .tcejeR dna etadpU rof 0 . The final value written to the repository is not necessarily the last value processed by the SetVariable function.elbairav retnuoc a stnemercnI elbairaVniMteS elbairaVxaMteS elbairaVtnuoCteS )1 . current value or initial value.EMAN_RAV$$(elbairaVteS . noi tc nu f eh t ot ni de ssa p eu lav o t e ul av tn e r ru c e r a pm o C . p u k o o L d et c e n n o c n U : 3 1 t i n U At the end of a successful session. ) et a dp u r o t r es ni sa dek r a m si wo r a fi yl n o se tu ce xe ( y fic ep s u oy t ah t e ul av a o t el ba ir av eh t s te S elbairaVteS e lp m a x E s e t o N eg a s U em a N n o i t cn uF To change the value of a variable. e ul av r e hgi h e ht ot e ul av t n e rr uc eh t st es d n a eu lav r eh gi h eh t s n ru t eR . The final value for a variable with a MIN Aggregation Type will be whichever value is smaller.103 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e l b a ir aV d n a sr e t e m ar a P . you must use one of the following functions within an expression: $$PARAMETER_NAME User-defined variable and parameter names must always begin with $$.e ul av t r at s ( fo NI M ro X AM eh t r e hti e se va s eciv r eS noi t a rg et n I e ht .yrotisoper eht ot )eulav l a nif . or $$VARIABLE_NAME .

p u k o o L d et c e n n o c n U : 3 1 t i n U 203 . The following table describes the order of precedence. .resu eht yb denifed sa eulav laitinI ehT . n oiss es a fo noitelpmoc lufsseccus eht nopu yrotisoper eht ni devas erew taht selbairav rof seulaV s r et em a r ap dn a se lb ai r av f o s n oiti ni fe d t u ob a n oit a m ro f ni dl oh na c eli f s ihT eulaV tluafeD eulaV laitinI eulaV devaS yrotisopeR eliF re t em a ra P 4 3 2 1 no i tp i r c s e D me tI r e bm u N ♦ Mapping variables and parameters are used: Purpose The Integration Service determines the value of a parameter by checking for it in a specific order. The following table describes the order of precedence.m e tsys e h t y b t es e ul av tl u af e D eh T . m ets ys e ht y b t es e ula v tl ua fe D ehT .resu eht yb denifed sa eulav laitinI ehT s r e te ma r a p d na s el bai r av f o sn oi tin if ed tu o ba n oi ta m r of ni dl o h n ac eli f sih T eulaV tluafeD eulaV laitinI eliF re t em a ra P 3 2 1 noitpircse D me tI r e bm u N .repoleveD I leveL 8 retneCrewoP acitamrofnI s e l b ai r aV d n a sr e t e m ar a P . Parameter Definition The Integration Service determines the value of a variable by checking for it in a specific order. Variable Definition To simplify mappings by carrying information within or between transformations.

Setvariable( $$LAST_RUN_DT. Without a parameter. For instance. then it would be easy to ensure that all processes used the same value. To help eliminate misunderstandings. If all mappings used the same parameter and a common parameter file. the following statement is much clearer.'MM/DD/YYYY') Someone could misinterpret this statement. we will use the function Setvariable. SESSSTARTTIME) To set the value of $$LAST_RUN_DT. p u k o o L d et c e n n o c n U : 3 1 t i n U . The variable will be updated to today's date when the mapping is complete so that we can use it the next time we run. one using a variable and one using a parameter.TO_DATE('1/1/3000'. use parameters to leave a better record of how the value is derived. The following is an example of a statement that could become part of a Source Qualifier Filter.$$OFFICIAL_DEFAULT_DT) $$OFFICIAL_DEFAULT_DT is equal to '1/1/3000'. possibly thinking it might be a mistake. Example 2 Replacement of Nameless Numbers It is not always wise to embed a number or character string into expressions because the support team may not understand the meaning of the number or character string. The SQL WHERE clause will be modified in the Source Qualifier Transformation. The quotes are required so that the SQL syntax will be proper. Example 1 Tracking Last Execution Date To set up a mapping to perform an incremental extract. IIF(ISNULL(SOLD_DT).♦ To improve maintainability by allowing quick changes to values within a mapping. the expression might be: IIF(ISNULL(SOLD_DT). This would ensure 303 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s e l b a ir aV d n a sr e t e m ar a P . We will then use this variable as part of the SQL that extracts the data to ensure that we only pick up new and modified records. The second example uses parameters to replace “naked” numbers and strings within expressions. We will discuss two examples. But if we used a parameter then there would less chance of a misunderstanding. Note that this variable is surrounded by single quotes. F1_LAST_UPDATE_DATE >= '$$LAST_RUN_DT' Where: ♦ ♦ F1_LAST_UPDATE_DATE $$LAST_RUN_DT is a database field that contains the date when the record was last touched is a user created mapping variable that holds the value of the date of the last run. The first example uses a variable to implement incremental extracts from relational sources. we will utilize a variable to track when the mapping was last executed.

sy ad 00 1 n a ht re ta e r g n ep o n ee b e va h ses ac tr o pp us hce t fi se ni m r et ed t ah t n ois se r px e n a . elif r et em a r ap a aiv s eul av e m as e ht es u s g nip p am ll a ev a H . .repoleveD I leveL 8 retneCrewoP acitamrofnI s e l b ai r aV d n a sr e t e m ar a P . Additional examples of ways mappings could utilize variables or parameters to replace nameless numbers and strings is shown in the following table.g .s r et ca r ah C dek a N ec al pe R . on dn a sey t n es e rp e r ta h t s r et e ma r a p ow t e ta e r C . p u k o o L d et c e n n o c n U : 3 1 t i n U 403 R A H C_ 1 _O N$ $ R AH C _ 1_ SE Y$ $ m ar a P m ar a P ’ N‘ 'Y ' .e r e bm u N h ti w s r eb m u N d ek aN ec al pe R em a N r aV r O m ar a P e u l aV l aitnetoP l a oG / no s a e R s e l pm a x E eg a s U r e t em ar a P / e lb a ir aV consistency.y cn e tsis no C NOITACOL_CORP_GER$$ NEPO_SYAD_MUN_XAM$$ raV m ar a P ’ SU ' 001 .s noi sse r px e ni e ula v em as e h t s es u e no y rev e t a ht e r us e ka m o t sr e te m a ra p ezi lit U . eli f r et e ma r a p a ni t es e ul av st i s a h d na g ni pp a m e ht n i de ni fe d si t ah t el b ai ra v a g nis u d et uc ex e si noi ss es e ht e r eh w re t ne C g nis sec o rP fo e ul av e h t te S .

even though the source staging table contains 7 days of data. Objectives ♦ ♦ ♦ Unconnected Lookup transformation Aggregator transformation Mapping parameters Duration 35 Minutes 503 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U . These type discounts are a small percentage compared to the number of rows being processed but the information needs to be processed accordingly. To compound this. Referential integrity will have to be created within PowerCenter. Technical Description The information needed resides in two separate staging tables.Unit 13 Lab: Load Sales Fact Table Business Purpose Mersche Motors dealerships sometimes give aggressive discounts that are outside the authorized range. To make this more efficient the use of mapping parameters and variables will be used. this production run will load the entire staging table into the SALES_FACT table in a single workflow. the relationship between the two tables does not exist on the database. Also. Special formulas are needed to process the discounts out of range.

D I_ OMO R P .YEK_TCUDORP .SNOITCASNART_GTS e r e hW xx UB DT xx UB DT TNEMYAP_GTS S NO IT CA SN A RT_ GTS r e t l i F / no i t c e l e S r e n w O / am eh c S sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D dneppA tegraT yli a D . di t n emy a p e ht t e g ot s el ba t o w t ni oj o t ev ah lli W 14 45 elbaT elcarO y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M d ao L / s wo R m e t s y S t e gr aT 5 .retneCrewoP ni detaerc eb ot deen lli w ti os SM B D R eh t ni tsix e t on s eo d pi hs no it al e r s ihT .D I _TS U C X X X y e K eu q in U tresnI ete leD xx UB DT e t ad p U r e n w O am eh c S CSED_EPYT_TNEMYAP. 57 4 5 selbaT elcarO xx_DAOL_SELAS_TCAF_m LOOKUPS SELAS_TCAF e m a N e lb aT s e lb aT TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .D I _P I HS RE LA E D .SNOITCASNART_GTS xx U B DT ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL n o i t a co L SETAD_MID SETAD_MID_pkl YEK_ETAD .TNEMYAP_GTS = CSED_TNEMYAP.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U 603 ehc ac t n et sis re p e su e R EULAV_ETAD.SETAD_MID = ETAD_NOITCASNART.

tegraT r ot a ge r gg A DI_TCUDORP. This relationship will have to be created within PowerCenter. there are a number of values that need to be derived before being loaded into the FACT_SALES table.703 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U The mapping will join two relational tables that do not have a PK-FK relationship.S N OITO MO R P_ M ID = DI _O MO R P. There are lookups required to get a date key and promotion indicator. SN OIT C AS NA RT _GT S xx U B DT n o i t a co L PROCESSING DESCRIPTION (DETAIL) p uk oo L pu ko oL 2ec r u oS no iss e rpx E 1ec r u oS p uk oo L HIGH LEVEL PROCESS OVERVIEW ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL ep yT pu ko oL ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL T C UD OR P _M I D T C U DO RP _ MI D _p kl d etc e nn oc n U S NOIT OM OR P _M I D S NO ITO MO RP _ MI D _p kl .TCUDORP_MID = DI_TCUDORP. Also. An unconnected Lookup will be used in situations where a valid discount value needs to be obtained.SNOITCASNART_GTS xx U B DT n o i t a co L DI _O MO RP .

T h e di s c o u nt si ht e di s c o u nt r a et di v di e d b y 1 0 0 mti e s S T G _ P R O M O T OI N S at b el ot s e el c at di s c o u nt r a e. L o o k u p r of m S T G _ T R A N S A C T OI N S ot D MI _ D A T E S ( s gt _ r at n s a c oti n s s/ gt _ p a y m e nt ) S o u r c e Q u al i efi r oj ni o n p a y m e n dt e s c r pi oti n. N V ul al l u e fi D e f a ul t .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U 803 F A C T _ S A L E S R E B A T E F A C T _ S A L E S H O L D B A C K F A C T _ S A L E S D SI C O U N T F A C T _ S A L E S C O S T F A C T _ S A L E S R E V E N U E F A C T _ S A L E S U N TI S _ S O L D F A C T _ S A L E S D A T E _ K E Y F A C T _ S A L E S P R O M O _ DI F A C T _ S A L E S P A Y M E N T _ DI F A C T _ S A L E S D E A L E R S H PI _ DI S T G _ T R A N S A C T OI N S D E A L E R S H PI _ DI v a ul e. 5 ht e n ol o k u p ot ht e s u m ( U N TI _ C O S T * S A L E S _ Q T Y ) H O L D B A C K R E B A T E ) s u m of ( S E L L NI G _ P R CI E * S A L E S _ Q T Y ) D SI C O U N T s u m o Sf A L E S _ Q T Y u s ni g T R A N S A C T OI N _ D A T E a s ht e ol o k u p v a ul e.t If ht e di s c o u nt si > 1 7 7. D MI _ P R O D C U T u s ni g P R O D U C T _ DI a s ht e ol o k u p F A C T _ S A L E S P R O D U C T _ K E Y D MI _ P R O D U C T F A C T _ S A L E S C U S T _I D T a r g e t T a bl e T a r g e t C o ul m n S o u r c e T a bl e SOURCE TO TARGET FIELD MATRIX S T G _ T R A N S A C T OI N S R E B A T E S T G _ T R A N S A C T OI N S H O L D B A C K S T G _ P R O M O T OI N S S T G _ T R A N S A C T OI N S D SI C O U N T D/ e r vi e d S T G _ T R A N S A C T OI N S D e r vi e d S T G _ T R A N S A C T OI N S D e r vi e d S T G _ T R A N S A C T OI N S D e r vi e d D MI _ D A T E S S T G _ T R A N S A C T OI N S P R O M O _ DI S T G _ P A Y M E N T S T G _ T R A N S A C T OI N S C U S T _I D D A T E _ K E Y P A Y M E N T _ DI P R O D U C T _ K E Y L o o k u p r of m S T G _ T R A N S A C T OI N S ot S o u r c e C o ul m n E x p r e s s oi n ht e s el ni g p r ci e.

Drag the STG_TRANSACTIONS and STG_PAYMENT relational source tables into the Source Analyzer workspace. Creating the PK_FK relationship within the Source Analyzer does not create this relationship on the actual database tables.3 . . This will create a PK-FK relationship between the two tables. selbat TNEMYAP_GTS dna SNOITCASNART_GTS eht fo weiv rezylanA ecruoS . The relationship is created on the source definitions within PowerCenter only.2 Step 2: Create a Mapping Parameter Open the mapping named m_FACT_SALES_LOAD_xx.2 . Your source definitions should look the same as displayed in Figure 13-1. The PAYMENT_DESC column from STG_TRANSACTIONS and the PAYMENT_TYPE_DESC column of the STG_PAYMENT table are logically related so we can build a join on them. Link the PAYMENT_DESC column from STG_TRANSACTIONS to the PAYMENT_TYPE_DESC column of the STG_PAYMENT table.1-31 erugiF :e to N 903 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U . Add a mapping parameter by clicking Mappings > Parameters and Variables.1 . They both contain the payment type description.1 .Instructions Step 1: Create an Internal Relationship Between two Source Tables Launch the Designer and sign into your assigned folder.

Save your work.2-31 erugiF Create a new parameter. 013 .25.3 . enter 17.1 neercs selbairaV dna sretemaraP eralceD .4 .On the next screen.2 For the initial value.5 . ♦ ♦ ♦ ♦ ♦ yrtne retemaraP . Click OK. See Figure 13-2: Step 3: Step Three: Create an Unconnected Lookup Create a Lookup transformation using the SC_DIM_PROMOTIONS relational target table and name it lkp_DIM_PROMOTIONS.3-31 erugiF .6 Parameter Name = $$MAX_DISCOUNT Type = Parameter Datatype = decimal Precision = 15. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U . click the Add a new variable to this table icon.

The discount is held as a whole number.3 . Click OK and save the repository. Drag the DATE_KEY port from lkp_DIM_DATES to agg_FACT_SALES. If the IN_DISCOUNT port has a value greater than the value passed in via a mapping parameter. Drag the PRODUCT_KEY port from lkp_DIM_PRODUCT to agg_FACT_SALES. Create the lookup condition comparing PROMO_ID to IN_PROMO_ID. Name the new port IN_PROMO_ID and make it an input only port.2 . The variable port v_DISCOUNT will be used to hold the return value. .2 .a .tupni gniwohs bat stroP pukooL . .1 Step 5: Create Aggregator Transformation Create an Aggregator transformation named agg_FACT_SALES. Uncheck the Output ports for all other ports except PROMO_ID and DISCOUNT.1 11 3 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U .3 . and then the Paste icon .d .b . then we need to get an acceptable value from the DIM_PROMOTIONS table. Edit the output port OUT_DISCOUNT and add the expression: v_DISCOUNT / 100 * SELLING_PRICE .c .Under the Ports tab: The Lookup should look the same as Figure 13-4: dekcehcnu/dekcehc strop nruter dna tuptuo .3 Click on PROMO_ID.4-31 erugiF Step 4: Add Unconnected Lookup Test to Expression Edit the exp_DISCOUNT_TEST Expression transformation.2 .4 . We need to change this to a percentage and apply it against the selling price to derive the dollar value of the discount.IN_DISCOUNT) . Edit the v_DISCOUNT variable port and add the expression: IIF(IN_DISCOUNT > $$MAX_DISCOUNT. then click the Copy icon Make DISCOUNT the Return port. :LKP.LKP_DIM_PROMOTIONS(PROMO_ID).

UNIT_COST and SALES_QTY. SALES_QTY to IN_SALES_QTY. OUT_DISCOUNT to DISCOUNT.5 .8 .4 .Drag the following ports from the Expression transformation to the Aggregator: ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U dekcehc strop yB puorG htiw strop rotagerggA . Create a new output port after the DISCOUNT port. UNIT_COST to IN_UNIT_COST. Rename the following ports: ♦ ♦ ♦ ♦ SELLING_PRICE to IN_SELLING_PRICE. PROMO_ID. Add the following new ports: ♦ 213 . PRODUCT_KEY. DEALERSHIP_ID. PAYMENT_ID.6 .9 PAYMENT_ID CUST_ID DEALERSHIP_ID PROMO_ID SELLING_PRICE UNIT_COST SALES_QTY HOLDBACK REBATE OUT_DISCOUNT Open the Aggregator and re-order the key ports in the following order: CUST_ID.5-31 erugiF DL OS _ST I N U_T UO l a mic ed e m a N t ro P epyta taD . DATE_KEY.7 . Group by the ports in Figure 13-5: Uncheck the output ports for SELLING_PRICE.

5 1 l am ice d E U N EVE R _T UO no i s s e rp x E noisicerP epyta taD e m a N t ro P ♦ ) YTQ _S EL AS _ NI ( M US 3 no i s s e rp x E noisicerP ♦ Use Autolink by name to link the ports from the agg_FACT_SALES transformation to the SC_FACT_SALES target table.TNUOCSID .6-31 erugiF The Aggregator ports should be the same as displayed in Figure 13-6. You will need to use the prefix of OUT_ to link all of the ports.313 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U . rotagerggA dehsiniF .5 1 l am ice d TSO C _T UO no i s s e rp x E noisicerP epyta taD e m a N t ro P Create a new output port after the OUT_REVENUE port. )TS O C_T I N U_ N I ( M US 2 .01 )ETABER .)YTQ_SELAS_NI * ECIRP_GNILLES_NI ( (MUS 2 .KCABDLOH . Create a new output port after the OUT_UNITS_SOLD port. .

7-31 erugiF Save your work. .The results should appear the same as Figure 13-7.1 skniL tegraT ot rotagerggA .3 .11 . Set the connection value for the sq_STG_TRANSACTIONS_PAYMENT source table to NATIVE_STGxx where xx is your student number. Iconize the mapping. Add a new Session task named s_m_FACT_SALES_LOAD_xx that uses the m_FACT_SALES_LOAD_xx mapping.8-31 erugiF Step 6: Create and Run the Workflow Launch the Workflow Manager client and sign into your assigned folder. . Create a new workflow named wkf_FACT_SALES_LOAD_xx.b .21 .c . repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U gnippam detelpmoc eht fo weiv cinocI .a . Change the Target load type to Normal. Set the connection value for the SC_FACT_SALES target table to NATIVE_EDWxx where xx is your student number.4 413 .2 . Edit the s_m_FACT_SALES_LOAD_xx session.

e .01-31 erugiF nur noisses detelpmoc eht fo sliateD ksaT . Under the Session Properties tab.9-31 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U .5 . set $Target connection value to NATIVE_EDWxx.7 . Your statistics should be the same as displayed in Figure 13-10. 513 nur noisses detelpmoc eht fo scitsitatS tegraT/ecruoS . select the lkp_DIM_DATES transformation and ensure that the Cache File Name Prefix is set to your pre-defined persistent cache (LKPSTUxx).6 .8 Save your work.d .Under the mapping tab. . Review the Source/Target Statistics. Review the Task Details. Start the workflow.

11-31 erugiF Data Results Preview the target data from the Designer. your data should appear the same as displayed in Figure 13-11. Not all rows and columns are shown.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U 613 :e to N elbat tegrat SELAS_TCAF eht fo weiverP ataD . .

713 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e l b aT t c a F s el a S d a o L : b a L 3 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F s e l a S d a o L : b a L 3 1 t i n U 813 .

Unit 14: Mapplets After completing this unit. they can also simplify complex mapping maintenance. you should be able to: ♦ ♦ Describe mapplets Use a mapplet in a mapping Lesson 14-1. A mapplet can receive the input data from either an internal source or from the mapping pipeline that calls the mapplet. 913 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t el p p a M : 4 1 t i n U . Mapplets Mapplets Description Mapplets can combine multiple mapping objects for reusability. A mapplet must pass data out of the mapplet via a Mapplet Output transformation.

repoleveD I leveL 8 retneCrewoP acitamrofnI s t el p p a M :4 1 ti n U 023 .

Type .123 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t el p p a M : 4 1 t i n U Mapping Input Transformation Passive or Active.

perform a number of lookups and aggregate the sales values. Example In the following example a business as part of its daily sales needs to apply discounts to the data.Description The Mapplet Input transformation acts as an input to a Mapplet. This functionality is used in several types of feeds so a Mapplet was created to provide this functionality to many mappings. A Mapplet Output transformation is used pass the output of the Mapplet back into the mapping that called it. discounts are applied and then two lookups are used to find the product key and date keys. repoleveD I leveL 8 retneCrewoP acitamrofnI s t el p p a M :4 1 ti n U 223 . An Aggregator is used to sum the cost and revenue. The Mapplet Input transformation is used to receive the sales transactions by customers.

Description The Mapplet Output transformation acts as an output from a Mapplet. Example The following example illustrates the Mapplet Output transformation.Mapping Output Transformation Type Passive. 323 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t el p p a M : 4 1 t i n U .

When the mapplet is expanded at runtime. repoleveD I leveL 8 retneCrewoP acitamrofnI s t el p p a M :4 1 ti n U :g ni n r aW 423 . the mapping will be invalid.The following example illustrates a Mapplet with multiple output groups. If that is illegal. an unconnected output group can result in a transformation having no output connections.

the mapping is valid because a Router can have unconnected output groups.Examples: ♦ ♦ If the mapplet outputs are fed by an Expression transformation. the mapping is invalid because an Expression requires a connected output. If the mapplet outputs are fed by a Router. 523 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s t el p p a M : 4 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI s t el p p a M :4 1 ti n U 623 .

This mapplet can then be used in other mappings.Unit 14 Lab: Create a Mapplet Business Purpose The team lead has noticed that there are other situations where we can reuse some of the transformations developed in the FACT_SALES load mapping. Objectives ♦ Create a Mapplet Duration 15 Minutes 723 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I telppaM a etaerC :b aL 41 tinU . we will create a mapplet from existing objects used in a previous mapping. Technical Description To take advantage of previously created objects.

Add a mapplet Output transformation. .d .b . repoleveD I leveL 8 retneCrewoP acitamrofnI t el p p a M a et a e r C : b a L 4 1 t i n U SELAS_GGA_tlpm fo weiv rengiseD telppaM .a . Select Edit > Paste or type Ctrl+V.g . 823 . Name the Mapplet Output Transformation out_TRANSACTIONS.2 . Select the Scale to Fit icon.1-41 erugiF Add a mapplet Input transformation.1 .e . re-open the m_FACT_SALES_LOAD_xx mapping.3 .Instructions Step 1: Create the Mapplet In the Mapping Designer. Open Mapplet Designer.c . Highlight the following five transformations by holding down the Ctrl key and pressing the left mouse button: ♦ ♦ ♦ ♦ ♦ . Right click in the workspace and Arrange All.f Your mapplet definition should look the same as Figure 14-1. Create a mapplet named mplt_AGG_SALES.4 lkp_DIM_PROMOTIONS lkp_DIM_PRODUCT lkp_DIM_DATES exp_DISCOUNT_TEST agg_FACT_SALES. Select Edit > Copy or type Ctrl+C. Name the Mapplet Input Transformation in_TRANSACTIONS.

Select the Scale to Fit icon. Notice the mapplet is invalid. Scroll through the messages in the output window. The mapplet should look similar to Figure 14-2.h .1 . Create a new parameter: Parameter Name = $$MAX_DISCOUNT Type = Parameter Datatype = decimal Precision = 15.3 . Step 2: Add Mapplet to Mapping Make a copy of the m_FACT_SALES_LOAD_xx mapping and open it in the Mapping Designer. 923 snoitamrofsnart tuptuO dna tupnI htiw SELAS_GGA_TLPM fo weiv rengiseD telppaM . r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I telppaM a etaerC :b aL 41 tinU :e to N .From the exp_DISCOUNT_TEST transformation. Drag the mapplet mplt_AGG_SALES into the mapping.2 .5 .4 . The reference to the parameter $$MAX_DISCOUNT is invalid as it does not exist within the mapplet parameter definition.2 Initial Value = 17.5 Save your work. Mapping parameters and variables that are created in a mapping are not available for use in a mapplet that is called from the mapping.i .l . From the Aggregator agg_FACT_SALES.2-41 erugiF ♦ ♦ ♦ ♦ ♦ Save your work.k . Use Autolink by name to link the ports from the sq_STG_TRANSACTIONS_PAYMENT to the mplt_AGG_SALES input.j . They point to the expression exp_DISCOUNT_TEST as having an invalid symbol reference. Rename the mapping to m_FACT_SALES_LOAD_MAPPLET_xx.m . drag all Output ports to the Output transformation. Delete the 5 transformations that you previously copied to the mapplet. drag all Input ports to the Input transformation.25 .

Step 3: Create and Run the Workflow Launch the Workflow Manager and sign into your assigned folder.4 Your mapping should look the same as Figure 14-3. (You know how to do this by now!) Save your work.8 . Arrange All Iconic. 033 . You will need to specify OUT_ for the prefix and 1 for the suffix.1 .9 . and review the details. Use Autolink by name to link the Output portion of the mapplet to the target. Save your work. start the workflow. repoleveD I leveL 8 retneCrewoP acitamrofnI t el p p a M a et a e r C : b a L 4 1 t i n U gnippam xx_TELPPAM_DAOL_SELAS_TCAF_m eht fo weiv cinocI . Create a new workflow named wkf_FACT_SALES_LOAD_MAPPLET Add the Session you just created.3 .2 .6 . and link.7 .3-41 erugiF . edit.Manually link the DISCOUNT port to the IN_DISCOUNT port.

133 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I telppaM a etaerC :b aL 41 tinU .

repoleveD I leveL 8 retneCrewoP acitamrofnI t el p p a M a et a e r C : b a L 4 1 t i n U 233 .

Lesson 15-1. Document any expression that may take place in order to generate the target field (e. calculate a late fee rate'. on a physical level. What to Consider The mapping process requires much more up front research than it appears.). Designing Mappings Description This is designed to provide the user a checklist of topics to consider during the mapping development process. document the details at the field level. Create an inventory of Mappings and Reusable objects. using a textual description to explain exactly what the mapping is supposed to accomplish and the methods or steps it will follow to accomplish its goal. As for Reusable objects. ♦ ♦ ♦ ♦ ♦ ♦ 333 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n gi s e D g ni p p a M : 5 1 t i n U . This document will cover a variety of situations users will have to address and help them ask the right questions before and during the design process. a sum of a field.. etc. Whatever the rules. listing each of the target fields and the source field(s) that are used to create the target field. a multiplication of two fields. These objects can be assigned to individual developers and progress tracked over the course of the project.Unit 15: Mapping Design After completing this unit. that translates to 'for customers with an ACTIVE_FLAG of “1”. you should be able to: ♦ ♦ Name key considerations for mapping design Describe the practice of designing a mapping The workshop will give you practice in designing your own mappings. The Informatica Velocity methodology provides a matrix that assists in detailing the relationship between source fields and target fields. The administrator or lead developer should gather all of the potential Sources. The designer may have to do some investigation at this point for some business rules. The lists are valuable to all but particularly for the lead developer. the business rules may say 'For active customers. This list is a 'work in progress' list and will have to be continually updated as the project moves forward. Targets and Reusable objects and place these in a shared folder accessible to all who may need access to them. it is important to have a clear picture of the end-to-end processes that the data will flow through. As a developer the specifications for a mapping should include required Sources. After the high level flow has been established. It also depicts fields that are derived from values in the Source and eventually linked to ports in the target. a comparison of two fields. ♦ Design a high-level view of the mapping and document a picture of the process with the mapping. The designer of the mapping must determine that. For example. Targets and additional information regarding derived ports and finally how the ports relate from the source to the target. Before designing a mapping. be sure to document them at this point and remember to keep it at a physical level.g. they need to be properly documented to make it easier for other developers to determine if they can/should use them in their own development. multiply the DAYS_LATE field by the LATE_DAY_RATE field'.

potential data issues at a field level. Only connect from the Source Qualifier those fields needed subsequently. With this information ODBC connections can be created in the Designer tool to allow access to the Source and Target definitions. (not in any particular order) ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ One of the first things to do is to bring in all required source and target objects into the mapping. Helpful information may. for example. Decide if a Source Qualifier join will net the result needed versus creating a Lookup to retrieve desired results. tegraT l a no it al eR tegraT l a no it al eR re t uo R p uk oo L no iss e rpx E ec r uo S l an oi tal e R 433 . data cleansing needed at a field level. Excessive number of conversions is inefficient. reusable transformations and mapplets for reusable code. Consider increasing the shared memory from 12MB to 25MB or 40MB when using a large number of transformations. passwords and connect strings. Excessive number of transformations will increase overhead. local or global. Make use of variables. These will leverage the work done by others. Reduce the number of transformations. Make use of variables. the developer will need to obtain the source and target database schema owners. Watch the data types. Reduce the number non-essential records that are passed through the mapping. In addition. any known issues with particular fields. Only connect fields that are needed or will be used. The Informatica engine converts compatible data types automatically. include source and target database connection information. Filter early and often. the design document should be updated if the business rules change or if more information is gathered during the build process. Document any other information about the mapping that is likely to be helpful in developing the mapping. Only manipulate data that needs to be moved and transformed. The completed mapping design should then be reviewed with one or more team members for completeness and adherence to the business requirements. to reduce the number of times functions will have to be used. pre or post mapping processing requirements.♦ If a shared folder for Sources and Targets is not available. lookups and how to match data in the lookup tables. and any information about specific error handling for the mapping. ♦ ♦ High Level Process Overview tegraT l a no it al eR repoleveD I leveL 8 retneCrewoP acitamrofnI ngiseD gnippaM :51 tinU Mapping Specifics The following are tips that will make the mapping development process more efficient.

533 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n gi s e D g ni p p a M : 5 1 t i n U . Lookup Transformation tips: When the source is large. Operators are faster than functions (i.000 rows. cache lookup table columns for those lookup tables of 500. ♦ Avoid date comparisons in lookup.000 rows or less. Operations and Expression Transformation tips: ♦ ♦ ♦ ♦ ♦ ♦ Numeric operations are faster than string. Design mappings to utilize one Source Qualifier to populate multiple targets. These will be executed for each record and slow performance. select appropriate driving/master table. Use flat files. Remove or reduce field-level stored procedures. CONCAT).e. Trim Char and Varchar fields before performing comparisons. File read/writes are faster than database reads/writes on same server. Utilize single pass reads. When joining sources.♦ ♦ ♦ ♦ ♦ Use active transformations early in the process to reduce the number of records as early in the mapping as possible. convert to string. Fixed width files are faster than delimited file processing. ♦ Use IIF or DECODE functions when lookup returns small row sets. ♦ Standard rule of thumb is not to cache tables over 500. ♦ Use equality (=) conditions if possible in the Condition tab. || vs.

repoleveD I leveL 8 retneCrewoP acitamrofnI ngiseD gnippaM :51 tinU 633 .

Unit 15 Workshop: Load Promotions Daily Aggregate Table Business Purpose The management wants to be able to analyze how certain promotions are performing. OBJECTIVE Design and create a mapping to load the aggregate table Duration 120 minutes 733 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n gi s e D g ni p p a M : 5 1 t i n U . They want to be able to gather the promotions by day for each dealership for each product being sold. If you are unclear on any of the instructions please ask the instructor. It is suggested that you use the Velocity best practices that have been discussed during the course. The workshop will provide tables that can be filled in before you start building the mapping. Technical Description The instructions will provide enough detail for you to design and build the mapping necessary to load the promotions aggregate table.

See Figure 15-1 for the source table layout.2-51 erugiF T Mapping Details In order to successfully create the mapping you will need to know some additional details. ♦ ♦ ♦ The PRODUCT_KEY can be obtained from the DIM_PRODUCT table by matching on the PRODUCT_ID. After running the mapping it should contain 1. For the purpose of this mapping we will read all 7 days of data. See Figure 15-2 for the target table layout. ♦ The management has decided that they don't want to keep track of the Manager Discount or the Employee Discount (PROMO_ID 105 and 200) so these will need to be excluded from the load.Workshop Details Sources and Targets SOURCE: STG_TRANSACTIONS This relational table contains sales transactions for 7 days.475 rows. The DATE_KEY can be obtained from the DIM_DATES table by matching the TRANSACTION_DATE to the DATE_VALUE. repoleveD I leveL 8 retneCrewoP acitamrofnI ngiseD gnippaM :51 tinU 833 . noitinifed elbat ecruoS . noitinifed elbat tegra . It will be located in the TDBUxx schema and contains 5.1-51 erugiF TARGET: FACT_PROMOTIONS_AGG_DAILY This is a relational table is located in the TDBUxx schema.073 rows. UNITS_SOLD is derived by summing the SALES_QTY.

933 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n gi s e D g ni p p a M : 5 1 t i n U . When this occurs you will need to obtain an acceptable value based on the PROMO_ID. To calculate the actual discount in dollars you will need to divide the DISCOUNT by 100 and multiply it by the SELLING_PRICE. REVENUE_PER_UNIT is derived by dividing the REVENUE by the SALES_QTY. ♦ ♦ ♦ ♦ ♦ COST is derived by summing the UNIT_COST. ♦ The DISCOUNT is a percentage stored as a number. Most of the discounts are valid but occasionally they may be higher than the acceptable value of 17.♦ REVENUE is derived by taking the SALES_QTY times the SELLING_PRICE and then subtracting the DISCOUNT.25. Save your work often. COST_PER_UNIT is derived by summing the UNIT_COST and dividing it by the sum of the SALES_QTY. The acceptable value can be obtained from the DIM_PROMOTIONS table by matching the PROMO_ID. HOLDBACK and REBATE.

e lb at S N OIT CA S NA RT _GT S eh t m o rf elb a t et a ge r g ga s no it om o r p y lia d e ht da o L y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M d ao L / s wo R elbaT elcarO m e t s y S t e gr aT elbaT elcarO DAOL_YLIAD_GGA_SNOITOMORP_TCAF_m LOOKUPS e m a N e lb aT s e lb aT TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications .repoleveD I leveL 8 retneCrewoP acitamrofnI ngiseD gnippaM :51 tinU 043 n o i t a co L e lb aT e m a N pu ko oL ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM n o i t a co L e lb aT e m a N pu ko oL y e K eu q in U tresnI ete leD e t ad p U r e n w O am eh c S r e t l i F / no i t c e l e S r e n w O / am eh c S sd l e iF e c r uo S e uq i n U yg e t a r t S d a o l e R tl u af e D dneppA tegraT yli a D .

143 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n gi s e D g ni p p a M : 5 1 t i n U l lu N f i eu l aV t lu a f e D noisserpxE nm u lo C e c r uo S eliF e cr u oS n mu l o C t e gr aT n o i t a co L Workflow Details e l b aT t eg r aT This is a simple workflow containing a Start task and a Session task. SOURCE TO TARGET FIELD MATRIX PROCESSING DESCRIPTION (DETAIL) HIGH LEVEL PROCESS OVERVIEW ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM e lb aT e m a N pu ko oL ed i r r e v O L Q S / r e t l iF ) s (n o i t i dn o C hc taM .

Run Details . nur noisses detelpmoc eht fo sliateD ksaT .5-51 erugiF Your Preview Data results should be similar to Figure 15-5.repoleveD I leveL 8 retneCrewoP acitamrofnI ngiseD gnippaM :51 tinU 243 elbat YLIAD_GGA_SNOITOMORP_TCAF eht fo weiverP ataD .3-51 erugiF Your Task Details should be similar to Figure 15-3.4-51 erugiF Your Source/Target Statistics should be similar to Figure 15-4. nur noisses detelpmoc eht fo scitsitatS tegraT/ecruoS .

343 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n gi s e D g ni p p a M : 5 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI ngiseD gnippaM :51 tinU 443 .

To set a condition.Unit 16: Workflow Variables and Tasks After completing this unit. the next task is not executed. right-click a link and enter an expression that evaluates to True or false. 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. you should be able to: ♦ Describe these features: Link Conditions ♦ Workflow variables ♦ Assignment tasks ♦ Decision tasks ♦ Email tasks Use these features in workflows and mappings ♦ ♦ Lesson 16-1. You can use workflow variables in the condition (see later). 543 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT d n a s e l b a i r aV w o l f k r oW : 6 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT d n a s e l b a i r aV w ol f k r oW :6 1 ti n U 643 . Workflow Variables Workflow variables can either be Pre-defined or User-defined. User-defined workflow variables are created by selecting Workflows > Edit and then selecting the Variables tab.Lesson 16-2.

Use the Task Specific Workflow Variables 'Status'. A truncation and testing of WORKFLOWSTARTTIME in the Link Condition preceding S4. ErrorCode. Business Purpose A workflow can contain multiple tasks and multiple pipelines. FirstErrorMsg. Selecting persistent will write the last value out to the repository and make it available the next time the workflow is executed. SrcSuccessRows. 743 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT d n a s e l b a i r aV w o l f k r oW : 6 1 t i n U . there is no allowance for only 1 of the 3 conditions being true. They include EndTime. In this proposed case. FirstErrorCode. Status. . TgtSuccessRows and TotalTransErrors. SrcFailedRows. Use an Assignment task to set the value of the variable. The link that precedes S2 can be coded such that S2 will not run if all 3 of the criteria are not true. Task-specific workflow variables are available in Decision. TgtFailedRows.3 . is appropriate. and in link conditions. S4 may be desired not to run if S3 took more than 1 hour past the workflow start time. One or more tasks or pipelines may be dependent on the status of previous tasks.Description Workflow variables can be user-defined or pre-defined: User-defined workflow variables can be used to pass information from one point in a workflow to another. 'SrcFailedRows' and 'TgtFailedRows' in the Link Condition Expression. Example S2 may be dependent on the successful running of S1. Assignment and Timer tasks. Declare workflow variables in the workflow Variables tab. StartTime.2 . PrevTaskStatus. Success may be defined as session status = Successful and the number of source and target failed rows = zero. Use the variable value later in the workflow. System Variables (SYSDATE and WORKFLOWSTARTTIME) can be used for example when calculating variable dates and times in the Assignment task link conditions.1 . ErrorMsg.4 Pre-defined workflow variables come in two types: ♦ ♦ Workflow variables are discussed in more detail in the Workflow Administration Guide.

Example S5 should run at least 1 hour after S2 completes. before proceeding to S5. repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT d n a s e l b a i r aV w ol f k r oW :6 1 ti n U 843 . establish the value of that variable with an Assignment task. use a Link Condition (refer to Workflow Design section of this document). To prevent ASGN1 from running until S2 completes. test that variable value at some subsequent point in the workflow. What that value is may determine whether other tasks or pipelines are run. establish a variable value for a Workflow Variable. Business Purpose Running a workflow task may depend on the results of other tasks or calculations in the workflow. Assignment Task Description The Assignment task can establish the value of a Workflow Variable (refer to the subsequent Workflow Variables section of this document) whose value can be used at a later point in the workflow. An Assignment task can do certain calculations. as testing criteria to determine if (or when) other workflow tasks/pipelines should be run.Lesson 16-3. It is a 3-step process: create a Workflow Variable in the workflow properties. ASGN1 can be coded to set a time that TIMER1 will wait for.

If any one of the tasks fails or does not produce desired results. The Timer task TIMER1 will wait for that variable time to exist before running S5. That criterion is set as the Decision Condition in a Decision Task and subsequently tested for a True or False condition. Others are pipelines of tasks that should only be run if results of preceding tasks are successful. Some are simply concurrent tasks. depending on the business-defined rules and operational rules of processing. Decision Task Description Decision tasks enable the workflow designer to set criteria by which the workflow will or will not proceed to the next set of tasks. What determines the success or failure of a task or group of tasks is User Defined. Still others are pipelines of tasks that should only be run if those results are not successful. workflows have multiple paths. those sessions should 943 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT d n a s e l b a i r aV w o l f k r oW : 6 1 t i n U .Code the Assignment task ASGN1 (in part) using the PowerCenter TRUNC date function. Example If a session. and the pseudocode for the variable date value > = Session2's EndTime + 1 hour. Lesson 16-4. Business Purpose Commonly. group of sessions or any combination of workflow tasks is successful. depending on whether the set criteria is true or false. a subsequent set of sessions should run.

Users can define email addresses. the total number of rows loaded and the number of rows rejected. the message text can contain variable session-related metadata.not be run. This could be accomplished with either a repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT d n a s e l b a i r aV w ol f k r oW :6 1 ti n U 053 . that an error condition existed. or simply notify the Development Team Lead or Business Unit Lead. Example The Business Unit Team Lead may request to receive an email detailing the time a load finished. Business Purpose Various business and operational staff may need to be notified of the progress of a workflow. Lesson 16-5. Email Task Description Email tasks enable PowerCenter to send email messages at various points in a workflow. an email should be sent to the processing operator to perhaps run a back out session. the status of tasks (or combination of tasks) within it. a subject line and the email message text. Instead. When called from within a Session task. or various metadata results of a session.

reusable email task (which allows variable session metadata) called from within a session. however. 153 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT d n a s e l b a i r aV w o l f k r oW : 6 1 t i n U . the impact of the Integration Service sending emails is minimal. Performance Considerations A running. a standard text message could be send by using a non-reusable email task which follows the session in the workflow. configured email server is required. Receipt of the email message would be the operator's signal that some type of manual intervention or restore routine is required to correct the problem. If sessionspecific variable metadata is not required. Operational staff may request receipt of an email if a session-required source file does not arrive by the time the session is scheduled to run.

repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT d n a s e l b a i r aV w ol f k r oW :6 1 ti n U 253 .

Technical Description The source for the weekly product aggregate table will be the daily product aggregate table. The management wants to be able to report on total sales for a product on a weekly basis. This can be accomplished using an assignment task. Objectives ♦ ♦ ♦ ♦ Assigning Workflow Variables Incrementing Workflow Variables using the Assignment Task Branching in a workflow using a Decision Task Using Link Conditions Duration 35 Minutes 353 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U .Unit 16 Lab: Load Product Weekly Aggregate Table Business Purpose The Mersche Motors data warehouse contains a number of aggregate tables. a decision task. link conditions and session tasks. The mapping to accomplish this has already been created and will need to be copied from the DEV_SHARED folder. The mapping to load this table is located in the DEV_SHARED folder. A weekly product sales aggregate table needs to be loaded for this purpose. A load date equal to the beginning day of the week will be used to provide the date key for the weekly aggregate table. A workflow needs to be created that will run the weekly aggregate load session after the daily aggregate load session has run 7 times. It contains a mapping variable that will be incremented by 1 at the end of the session/mapping run.

emulating a week. to verify the process works properly.YEK_TCUDORP tl u af e D dneppA tegraT ylk eeW . This workflow must be run 7 times.el b at et ag e r gg a tc u do r p yli ad e h t m o rf el b at et ag e r gg a tc u do r p ylk ee w e h t d ao L 09 3 1 elbaT elcarO d a oL / sw o R m e t s y S t eg r aT xx_DAOL_YLKEEW_GGA_TCUDORP_TCAF_m PROCESSING DESCRIPTION (DETAIL) HIGH LEVEL PROCESS OVERVIEW (WORKFLOW) X YLKEEW_GGA_TCUDORP_TCAF e t ad p U r e nw O am eh c S e m a N e lb aT s e lb aT xx UB DT YLIAD_GGA_TCUDORP_TCAF r e n w O / am eh c S s d l e i F e c r uo S e uq i n U yg e t a r t S d a o l e R y g e t a r t S ro r r E g n i s s e co r P t so P g n i s s e c o rp e r P y c n eu q e rF d a oL n o i tp i r c s e D t r oh S s wo R l a i t in I m e t s y S e c r uo S em a N g n ip p a M 0 93 1 selbaT elcarO TARGETS e m a N e lb aT s e lb aT SOURCES Velocity Deliverable: Mapping Specifications . If it returns a 0. If it returns a non zero value. The Decision task uses the MOD function to divide the workflow variable by 7 and see if it returns a 0.DI_PIHSRELAED . ksaT li a mE ksaT n oiss eS ksaT n oisic e D ksaT t ne m ng issA ksaT n oiss eS ksaT t r at S YEK_ETAD . The first Session task runs the load to the daily product aggregate table.repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U 453 A workflow variable will be defined and set to 0 for the start of the workflow. the second Session task runs and loads the weekly aggregate table.DI_PIHSRELAED . The Assignment task increments the workflow variable by 1. then an Email task runs (the Email task only runs if the Integration Service is associated with a mail server).YEK_TCUDORP X y e K e uq i n U tresnI et eleD xx UB DT r e t l i F / no i t c e l e S YEK_ETAD .

2 .a .3 .1 . copy the wkf_FACT_PRODUCT_AGG_WEEKLY_LOAD workflow from the DEV_SHARED folder. Resolve the conflict by selecting the m_FACT_PRODUCT_AGG_DAILY_LOAD_xx mapping. . Edit the session and make the following changes: Rename it to include your assigned student number. In the Variables tab create a new workflow variable: Variable Name = $$WORKFLOW_RUNS Datatype = integer Persistent = checked Default Value = 0 ♦ ♦ ♦ ♦ 553 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U .Instructions Step 1: Copy the Mappings In the Designer.i . In the Properties tab. . Select Yes for any Target Dependencies. Rename the mappings to include your student number. Change the Session Log File Name to include your student number.3 . Rename it to include your student number.2 .b . Drag the new workflow into the Workflow Designer.c Select the menu option Workflows > Edit. Select Skip or Reuse to resolve any conflicts.5 Step 2: Copy the Existing Workflow In the Workflow Manager. . Save your work. In the Properties tab change the Workflow Log File Name to include your student number. Change the $Target Connection Value to reflect your assigned student connection NATIVE_EDWxx.1 . NATIVE_STGxx and NATIVE_EDWxx respectively.c .5 .a . copy the m_FACT_PRODUCT_AGG_DAILY_LOAD mapping and the m_FACT_PRODUCT_AGG_WEEKLY_LOAD mapping from the DEV_SHARED folder.4 .4 .ii Change the source and target connections to reflect your assigned student connection.b .

2 .1-61 erugiF Step 3: Create the Assignment Task Add an Assignment Task to the workflow. Double click the link.3 Link the s_m_FACT_PRODUCT_AGG_DAILY_LOAD_xx Session task to the Assignment task. .Figure 16-1 shows the defined workflow variable: noitaralced elbairav wolfkroW .1 . repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U 653 .

4 . Rename it to asgn_WORKFLOW_RUNS.7 .Add a link condition to ensure that the assignment task only executes if the s_m_FACT_PRODUCT_AGG_DAILY_LOAD_xx Session task was successful.5 . 753 lufsseccus saw nur noisses a fi gnitset noitidnoc kniL . create an expression that increments the User Defined Variable named $$WORKFLOW_RUNS by 1. See Figure 16-2 for details. Save your work. In the Expressions tab.3-61 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U . .6 .8 Edit the Assignment task.2-61 erugiF noitaralced noisserpxe ksaT tnemngissA . See Figure 16-3 for details.

Step 4: Create the Decision Task Add a Decision task to the workflow.3 Link the asgn_WORKFLOW_RUNS Assignment task to the Decision task.b The decision task will evaluate the expression and return a value of either TRUE or FALSE.1 . Rename it to dcn_RUN_WEEKLY.a . Add a link condition to ensure that the decision task only executes if the asgn_WORKFLOW_RUNS Assignment task was successful (refer to previous step). Create a Decision Name expression using the modulus function that checks to see if this is the seventh run of the workflow. Link the dcn_RUN_WEEKLY Decision task to the s_m_FACT_PRODUCT_AGG_WEEKLY_LOAD_xx session task. Double click the link. See Figure 16-4 for details.3 .2 .2 . Double click the link.5 . Edit the Decision task. noisserpxE ksa noisiceD . 853 . This can be done by dividing the workflow variable by seven and checking to see if the remainder is 0. In the Properties tab.4 .1 .4-61 erugiF T Step 5: Create the Session Task Create a session task named s_m_FACT_PRODUCT_AGG_WEEKLY_LOAD_xx that uses the m_FACT_PRODUCT_AGG_WEEKLY_LOAD_xx mapping. This can be checked in a link condition to determine the direction taken. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U : p iT . .

2 . Double click the link.c . Verify the Target load type is set to Normal. where xx is your student number.4 . EURT fo noitidnoc ksaT noisiceD a rof gnitset noitidnoc kniL . . Add a link condition that checks to see if the dcn_RUN_WEEKLY Decision task has returned a value of FALSE. meaning that it is time to load the weekly aggregate table.Add a link condition that checks to see if the dcn_RUN_WEEKLY Decision task has returned a value of TRUE. Set the relational connection value for the SC_FACT_PRODUCT_AGG_WEEKLY target to NATIVE_EDWxx. Set the relational connection value for the SQ_SC_FACT_PRODUCT_AGG_DAILY source to NATIVE_EDWxx. meaning that the daily load has completed and that it is NOT time to load the weekly aggregate table. Link the dcn_RUN_WEEKLY Decision task to the Email task.5 .3 Edit the s_m_FACT_PRODUCT_AGG_WEEKLY_LOAD_xx session. See Figure 16-5 for details.a . where xx is your student number.b .1 953 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U .5-61 erugiF Step 6: Create the Email Task Add an Email task to the workflow. .

Your workflow should appear the same as displayed in Figure 16-7. See Figure 16-6 for details.7-61 erugiF .b Right-click in the workspace and select Arrange > Horizontal.com as the Email User Name.5 . .4 .i .Edit the Email task. In the Properties tab. Add appropriate text for the Email Subject and Email Text. Save your work. Rename it to eml_DAILY_LOAD_COMPLETE. Add anyperson@anycompany.6-61 erugiF wolfkroW detelpmoC .6 063 . repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U seitreporP ksaT liamE .ii .a .

Review the workflow in the Gantt view of the Workflow Monitor. selbairaV wolfkroW weiV . . 163 nur wolfkrow detelpmoc eht fo weiv trahc ttnaG . See Figure 16-9 and Figure 16-10. The value should be set to 1.2 .1 . It should appear similar to Figure 16-8.9-61 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U .3 .Step 7: Start the Workflow and Monitor the Results The workflow will need to be run seven times in order to see the weekly aggregate session running.4 Right-click the wkf_FACT_PRODUCT_AGG_WEEKLY_LOAD_xx workflow in the Navigator window and select View Persistent Values.8-61 erugiF Return to the Workflow Manager. Start the workflow.

.5 Run the workflow six more times to emulate a week's normal runs and after the last run the Gantt Chart view should be similar to Figure 16-11. nur tsrif retfa elbairav SNUR_WOLFKROW$$ eht fo eulaV .21-61 erugiF . snur daol ylkeew eht retfa nur wolfkrow detelpmoc eht fo weiv trahc ttnaG .repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U 263 nur noisses detelpmoc eht fo sliateD ksaT .6 .11-61 erugiF . Each time you run the workflow this value will increase by one.01-61 erugiF :e to N Click Cancel to exit.7 Review the Task Details of the s_m_FACT_PRODUCT_AGG_WEEKLY_LOAD_xx session.

363 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT e t a g e r g g A y l k e eW t c u d o r P d a o L : b a L 6 1 t i n U 463 .

you should be able to: ♦ Describe the following features: Event Wait task ♦ Event Raise task ♦ Command task ♦ Reusable tasks ♦ Reusable Session task ♦ Reusable Session configuration ♦ pmcmd Utility Use these features in mappings and workflows ♦ ♦ Lesson 17-1. 563 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I y ti l i b a s u e R d n a s k s aT e r o M : 7 1 t i n U . Event Wait Task Description Event Wait tasks wait for either the presence of a named flat file (pre-defined event) or some other userdefined event to occur in the workflow processing.Unit 17: More Tasks and Reusability After completing this unit.

Example A Session task may be expecting to process a flat file as source data. If the file does not exist.2 . This file is known as an indicator file. Includes an Event Raise task at a suitable point in the workflow. . the task waits for the physical presence of a file in a directory local to the Integration Service process machine. repoleveD I leveL 8 retneCrewoP acitamrofnI y ti l i b a s u e R d n a s k s aT e r o M :7 1 ti n U 663 . the workflow goes into a Wait status. the Event Wait task completes and the workflow proceeds to subsequent tasks. When the file is found. The Event Wait task can optionally delete the indicator file once detected or the file can be deleted by a subsequent process. the Event Wait task will not complete.1 . The Event Raise task sets the event to active. after a parallel pipeline has completed.g. For a user-defined event. e. Inserting a Pre-Defined Event Wait task containing the specific name and location of the flat file causes the workflow to proceed if the file is found. Pre-Defined Event Business Purpose 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. If not found.3 This lesson examines the two types separately. the developer: Defines an event in the workflow properties (prior to workflow processing) Includes an Event Wait task at a suitable point in the workflow. where further processing must await some specific event. (Event Raise task is described later).For a predefined event.

Refer to the Email task earlier in this section. (Refer to the Email and Timer tasks earlier in this section. This potential load window slowdown can be averted by proper workflow design which will provides alternatives in case a file does not arrive in a reasonable length of time. is to create a workflow Event in the workflow properties.Performance Considerations The only known consideration is the length of time the Integration Service may have to wait if the file does not arrive. the workflow waits until it is triggered. Performance Considerations The only known performance consideration is the length of time the Integration Service may have to wait if the Event is not raised. One way to ensure that S5 does not run unless S1 and S2 have run. It will always work in concert with an Event Raise task. Pipeline 1 contains S1 and S2. If not.) 763 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I y ti l i b a s u e R d n a s k s aT e r o M : 7 1 t i n U . S5 cannot run until S4 runs. the Event Raise triggers the Event (or sets it 'active') and the Event Wait task does not proceed to subsequent tasks until it detects that the specific Event was triggered. User-Defined Event Business Purpose An Event Wait task waiting for the occurrence of a user-defined event will be strategically placed such that the workflow should not proceed further unless a different but specific series of pre-determined tasks and conditions have occurred. in this order. This potential load window slowdown can be averted by proper workflow design which will provides alternatives in case the Event does not occur within a reasonable length of time. Example A workflow may have 2 concurrent pipelines containing various tasks. insert an Event Raise task after S2 that triggers (activates) the Event and place a User-Defined Event Wait task after S4 to detect whether the Event has been triggered. Pipeline 2 contains S3 and S4 and S5. Per the 3 steps mentioned above: the user creates the workflow Event.

Event Raise Task Description Event Raise tasks are always used in conjunction with User-Defined Event Wait tasks. repoleveD I leveL 8 retneCrewoP acitamrofnI y ti l i b a s u e R d n a s k s aT e r o M :7 1 ti n U 863 . Business Purpose This task allows signals to be passed from one spot in the workflow. to another that a particular series of pre-determined events have occurred. an Event Wait task is placed at a different point in the workflow to determine if the Event has been raised. S5 cannot run until S4 runs. A workflow may have 2 concurrent pipelines containing various tasks. A user-defined event is defined as the completion of the tasks from the Start task to the Event Raise task. the Event Raise task 'raises' the event at some point in the running workflow.Lesson 17-2. They send a signal to an Event Wait task that a particular set of pre-determined events have occurred. Pipeline 2 contains S3 and S4 and S5. Example This example is the same as the one in the Event Wait task section of this document. in this order. Pipeline 1 contains S1 and S2. It is the same 3 step process previously mentioned: the developer defines an 'Event' in the workflow properties.

the workflow waits until it is triggered. is to create a workflow Event in the workflow properties. the only known performance consideration is the length of time the Integration Service may have to wait if the Event is not raised. Command Task 963 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I y ti l i b a s u e R d n a s k s aT e r o M : 7 1 t i n U . insert an Event Raise task after S2 that triggers (activates) the Event and place a User-Defined Event Wait task after S4 to detect whether the Event has been triggered. If not. This potential load window slowdown can be averted by proper workflow design which will provides alternatives in case the Event does not occur within a reasonable length of time. (Refer again to the Email and Timer tasks earlier in this section. Performance Considerations As before.) Lesson 17-3.One way to ensure that S5 is not run unless S1 and S2 have run.

Command tasks can be set to run one or more OS commands or scripts/batch files. A series of multiple concurrent or sequential Sessions in a workflow could all be followed by one Command task coded to copy (or move) all session logs created by the workflow to a special daily backup directory. Additionally and optionally. All commands or batch files referenced must be executable by the OS login that owns the Integration Service process. If more than one command is coded into a Command task. Business Purpose OS commands can be used for any operational or Business Unit related procedure and can be run at any point in a workflow.Description Command tasks are inserted in workflows and worklets to enable the Integration Service to run one or more OS commands of any nature. each individual command can be set not to run if a preceding command has failed. before proceeding to the next task in the workflow. opens it and verifies/compares control totals or record counts to some external source of information (again. Example A Session task that produces an output file could be followed by a Command task that copies the file to another directory or FTPs the file to another box location. any sequence of steps that could be accomplished at the OS level). the entire task can be set to fail if any one of the individual commands fails. The command syntax would be the same as the command syntax that would accomplish this at the OS command prompt on the Integration Service process machine. repoleveD I leveL 8 retneCrewoP acitamrofnI y ti l i b a s u e R d n a s k s aT e r o M :7 1 ti n U 073 . A Session task that is relying on a flat file data as its source data could be preceded by a Command task which contains a script that step-by-step verifies the presence of the file.

A session created in the Task Developer workspace is reusable. it is specific only to that workflow. Use the Task Developer to create reusable tasks. there is a simpler way to create 'like-sessions' that are all based on the same mapping . Lesson 17-5. a reusable task is indicated by a special symbol. all based on the same mapping. Since a mapping is a reusable object. Reusable tasks appear in the Navigator Tasks node and can be dragged and dropped into any workflow. An instance of a Reusable Session can be run in any workflow or worklet. Email and Command tasks can be reusable. workflow-byworkflow. an instance of the Reusable Session can be placed in any workflow or worklet. the developer could code multiple sessions. Some of the properties of the session instance are customizable. 173 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I y ti l i b a s u e R d n a s k s aT e r o M : 7 1 t i n U . In a workflow. Business Purpose Occasionally.Performance Considerations The only known consideration is the length of time the OS commands collectively take to run on the Integration Service process machine. Reusable Tasks ♦ ♦ ♦ ♦ Session. a certain mapping logic may be required to be run in multiple workflows.a Reusable Session. Lesson 17-4. However. Reusable Session Tasks A Session created directly in a workflow is a Non-reusable session. This is not within the control of the Integration Service. Once created in the Task Developer.

Performance Considerations It is recommended to use reusable session tasks sparingly because 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.Session Configuration menu option or Tasks toolbar icon. Invoke in Session tasks. each needs to be subsequently run using common mapping logic to further transform the data in a like manner. Reusable Session Configurations ♦ ♦ ♦ ♦ ♦ Define session properties that can be reused by multiple sessions within a folder. Each workflow would contain one customer-specific session/mapping and one instance of the Reusable Session. The data structure of each customer is different enough that a different mapping is required for each.g. special error handling). pre-coded with common session properties.time-stamped logs. in Config Object tab. A business receives 25 data file sources for its 25 customers. Lesson 17-6.Examples If the same mapping needs to be used a number of times and if a number of Session properties need to be changed in each of the uses of a session (e. Use Tasks . This results in less developer effort versus creating separate new sessions. the changes could be made in the parent session and every time an instance of the session were placed in a workflow. Once data is structured the same. repoleveD I leveL 8 retneCrewoP acitamrofnI y ti l i b a s u e R d n a s k s aT e r o M :7 1 ti n U 273 . Can override these session properties further down in the Config Object tab. each with multiple customized session properties. to get the data into one common format. Config Name box. . increased Line Sequential Buffer Length. If 25 output files were created. Opens Session Config Browser where you set session properties. the session would automatically take on all those customized properties. 25 instances of one Reusable Session could be used to process all data files.

Lesson 17-7. You must supply the user name and password to sign in to the Integration Service. Syntax Example pmcmd startworkflow -sv integrationservicename -u yourusername -p yourpassword workflowname This command will start the workflow located on the named Integration Service. pmcmd Utility Description The pmcmd command line utility allows the developer to perform most Workflow Manager operations outside of the PowerCenter Client tool. 373 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I y ti l i b a s u e R d n a s k s aT e r o M : 7 1 t i n U . as well as the workflow name.

repoleveD I leveL 8 retneCrewoP acitamrofnI y ti l i b a s u e R d n a s k s aT e r o M :7 1 ti n U 473 .

you should be able to: ♦ Describe these features: Worklets ♦ Timer task ♦ Control task Use these features in a workflow ♦ ♦ Lesson 18-1. 573 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT e r o M d n a s t e l k r oW : 8 1 t i n U . Worklets Description Worklets are optional processing objects inside workflows.Unit 18: Worklets and More Tasks After completing this unit. or functionally-related set of tasks. They can be created directly in a workflow (non-reusable) or from within the Workflow Designer (reusable). They contain PowerCenter tasks that represent a particular grouping of.

repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT e r o M d n a s t el k r oW : 8 1 t i n U 673 .

executing task-by-task or the developer can place natural groupings of tasks into worklets. from start to finish. During workflow design they will be developed naturally into 'groupings' of meaningfully-related tasks. A worklet's relationship to a workflow is like a subroutine to a program or an applet to an application.Business Purpose A workflow may contain dozens of tasks. run in the appropriate operational order. Workflow converted to internal worklets: Worklet1 contains S1 and S2. Worklets can be used in a very large workflow to encapsulate the natural groupings of tasks. in this order. Example This example is similar to the one in the Event Wait task section of this document. Worklet2 contains S3 and S4. S5 will run after both worklets complete. Pipeline 1 contains S1 and S2. S5 cannot run until all 4 sessions run. Workflow with individual tasks: A workflow may have 2 concurrent pipelines containing various tasks. Pipeline 2 contains S3 and S4. 773 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT e r o M d n a s t e l k r oW : 8 1 t i n U . The workflow can run as-is. whether they are concurrent or sequential.

A Timer task can be set to wait for the maximum amount of time and then send an email or abort the workflow of the time limit is exceeded. The user can provide a variable that lets the Timer task know when to start the timer from. Example A workflow may contain sessions that should only run for a maximum amount of time.Lesson 18-2. The Timer task could be set to execute one hour after the start of the workflow. Timer Task Description Timer tasks are used to keep track of the time an object of the workflow started. They can be based on: ♦ ♦ ♦ Absolute Time. Business Purpose Business or operational processing specifications may require that a workflow run to a certain point then sit idle for a length of time or until a fixed physical point in time. Relative Time. or from the start time of the parent workflow. The user can specify the date and time to start the timer from. The Timer task can start the timer from the start time of the Timer task. repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT e r o M d n a s t el k r oW : 8 1 t i n U 873 . the start time of the workflow or worklet. Datetime Variable.

They can stop. Control Task Description Control tasks are used to alter the normal processing of a workflow. Lesson 18-3. abort or fail any workflow or worklet. 973 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT e r o M d n a s t e l k r oW : 8 1 t i n U .Performance Considerations There are no real performance considerations for the timer task.

A Control task could be placed subsequent to the session. abort or fail rather than be emailed that an error exists. the desired action may be to fail the workflow. with conditions set to stop. repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT e r o M d n a s t el k r oW : 8 1 t i n U 083 . A workflow may have a session that runs through to a successful processing conclusion but could contain data row errors. operational staff may prefer that a workflow or worklet simply stop. abort or fail the workflow (and use an Email task to notify someone of the issue).Control Options Business Purpose When error condition exists. If the file does not arrive within one hour after the workflow start time. Example As with the example in the Pre-Defined Event (Event Wait task section) a workflow may have a session which is expecting a flat file for source data.

183 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I s k s aT e r o M d n a s t e l k r oW : 8 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI s k s aT e r o M d n a s t el k r oW : 8 1 t i n U 283 .

and a Control task to stop the workflow if it runs more than one hour. A workflow will be created that contains the worklet and then runs the staging and fact loads. Technical Description The support team has suggested that a worklet be created that limits the time for the workflow.Unit 18 Lab: Load Inventory Fact Table Business Purpose The Inventory fact table load runs directly after the Inventory staging table load. Sometimes the Inventory staging table load runs longer than is acceptable and delays the rest of the process. Objectives ♦ ♦ ♦ ♦ ♦ Create a Worklet Create a Timer task Create a Control task Create an Email task Use a Worklet within a Workflow Duration 25 minutes 383 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT t c a F y r o t n e v n I d a o L : b a L 8 1 t i n U . an Email task to inform the administrator should the load take longer than 1 hour. This worklet will contain Timer task to keep track of the run time. An email needs to be sent to the administrator if the staging load takes longer than one hour.

If the two tasks exceed the time limit. killing the timer task in the worklet so no email is sent. If the two tasks complete within the time limit a control task ends the workflow. and a control task to fail the workflow if the time limit is exceeded. Workflow: The workflow runs the time limit worklet in parallel with the Staging and Fact session tasks. the workflow will be failed and an email sent to the administrator. repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F y r o t n e v n I d a o L : b a L 8 1 ti n U 483 . This is followed by an email task to send an email to the administrator if the timer task completes.PROCESSING DESCRIPTION (DETAIL) Worklet: The worklet runs a Timer task that sets the timer to 1 hour beginning from the start of the task.

2 Step 2: Create a Worklet Launch the Workflow Manager client and sign into your assigned folder.1 .Instructions Step 1: Copy the Mappings Copy the m_STG_INVENTORY_LOAD and the m_FACT_INVENTORY_LOAD mappings from the DEV_SHARED folder.a The tim_ as a prefix for a Timer task name is specified in the Informatica Velocity Methodology. Open the Worklet Designer workspace.2 .3 .1 .4 . Save your work. Rename the task tim_MAX_RUN_TIME.3 . Delete the default Worklet name and enter wklt_RUNTIME_LIMIT_xx. .2 . 583 :e c it ca r P ts e B y ti co l eV r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT t c a F y r o t n e v n I d a o L : b a L 8 1 t i n U :e c it ca r P ts e B y ti co l eV Edit the Timer task. . The wklt_ as a prefix for a Worklet name is specified in the Informatica Velocity Methodology. Rename them m_STG_INVENTORY_LOAD_xx and m_FACT_INVENTORY_LOAD_xx. . Step 3: Create a Timer Task Add a Timer task to the worklet.1 . Select the menu option Worklets Create.

2 In the Properties tab: Enter administrator@anycompany. Save your work.3 . Set the Relative time to start after 1 hour from the start time of this task.1 Edit the Email task. :e c it ca r P ts e B y ti co l eV repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F y r o t n e v n I d a o L : b a L 8 1 ti n U gnittes emit evitaleR ksaT remiT .1-81 erugiF . Step 4: Create an Email Task Add an Email task to the worklet.i .ii . See Figure 18-1 for details.com as the Email User Name. Link the Start task to the tim_MAX_RUN_TIME Timer task. Enter Workflow wkf_FACT_INVENTORY_LOAD_xx exceeded max time allotted as the Email Subject.a The eml_ as a prefix for an Email task name is specified in the Informatica Velocity Methodology.b .b . . .4 .In the Timer tab. Rename the task eml_MAX_RUN_TIME_EXCEEDED. 683 .

a The ctl_ as a prefix for a Control task name is specified in the Informatica Velocity Methodology. .iii .2 . Rename the task ctl_WORKFLOW_TIMEOUT_FAIL. :e c it ca r P ts e B y ti co l eV 783 baT seitreporP ksaT liamE . . Save your work.3 . Step 5: Create a Control Task Add a Control task to the worklet.2-81 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT t c a F y r o t n e v n I d a o L : b a L 8 1 t i n U . Link the tim_MAX_RUN_TIME Timer task to the eml_MAX_RUN_TIME_EXCEEDED Email task.Enter something appropriate for the Email Text. See Figure 18-2 for details.1 Edit the Control task.4 .

Right Click anywhere in the Worklet workspace and select Arrange > Horizontal.1 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F y r o t n e v n I d a o L : b a L 8 1 ti n U baT seitreporP ksaT lortnoC . Save your work. Create a session task named s_m_STG_INVENTORY_LOAD_xx that uses the m_STG _INVENTORY_LOAD_xx mapping.4 . See Figure 18-3 for details. Link the Start task to the wklt_STG_INVENTORY_LOAD_xx worklet. Select Stop parent for the Control Option Value.3 . .3-81 erugiF telkroW detelpmoC . Drag the wklt_RUNTIME_LIMIT_xx Worklet from the Worklets folder in the Navigator Window into the workflow. Step 6: Create the Workflow Create a workflow named wkf_FACT_INVENTORY_LOAD_xx.4 883 .b .c .3 . Link the eml_MAX_RUN_TIME_EXCEEDED Session task to the ctl_STOP_TIMEOUT Control task.5 . Your Worklet should appear the same as displayed on Figure 18-4.4-81 erugiF .In the Properties tab.2 .

b . In the General tab.Edit the s_m_STG_INVENTORY_LOAD_xx session. Ensure that the filename for the SQ_inventory flat file source is set to inventory. Set the Target truncate table option to on.b . Set the relational connection value for the FACT_INVENTORY target to NATIVE_EDWxx where xx is your student number.txt. Your Workflow should appear the same as displayed on Figure 18-5.7 .6 .9 Link the Start task to the s_m_STG_INVENTORY_LOAD_xx Session task.d .c .a . . Edit the s_m_FACT_INVENTORY_LOAD_xx session: Set the relational connection value for the SQ_STG_INVENTORY source to NATIVE_STGxx where xx is your student number. Create a session task named s_m_FACT_INVENTORY_LOAD_xx that uses the m_FACT_INVENTORY_LOAD_xx mapping.8 .5-81 erugiF r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT t c a F y r o t n e v n I d a o L : b a L 8 1 t i n U . . Link the s_m_STG_INVENTORY_LOAD_xx Session task to the s_m_FACT_INVENTORY_LOAD_xx Session task. Set the relational connector value for the STG_INVENTORY target to NATIVE_STGxx. select the “Fail parent if this task fails” checkbox. Set the Target load type to Normal.c 983 wolfkroW detelpmoC .5 .a .

nur wolfkrow detelpmoc eht fo weiv trahc ttnaG .Step 7: Start the Workflow and Monitor the Results Start the workflow.1 . When completed it should appear similar to Figure 18-6.7-81 erugiF 093 . Review the workflow in the Gantt Chart view of the Workflow Monitor. .2 .6-81 erugiF Review the run statistics for the s_m_STG_INVENTORY_LOAD Session task. They should appear similar to Figure 18-7.3 repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F y r o t n e v n I d a o L : b a L 8 1 ti n U nur wolfkrow detelpmoc eht fo weiv trahc ttnaG .

193 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I el b aT t c a F y r o t n e v n I d a o L : b a L 8 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI e l b aT t c a F y r o t n e v n I d a o L : b a L 8 1 ti n U 293 .

This list is a 'work in progress' list and will have to be continually updated as the project moves forward. you will need to prioritize them. worklets and workflows based on the results Create an inventory of Worklets and Reusable tasks. if the hardware is not adequate to run the sessions concurrently. The highest priority within a group is usually assigned to sessions with the most child dependencies. it is important to have a clear picture of the task-to-task processes. ♦ ♦ ♦ ♦ ♦ ♦ The administrator or lead developer should put together a list of database connections to be used for Source and Target connection values. Reusable tasks need to be properly documented to make it easier for other developers to determine if they can/should use them in their own development.Unit 19: Workflow Design After completing this unit. Considerations The workflow process requires some up front research. Another possible component to add into the load process is sending e-mail. Making an up front decision to make all Session. Designing Workflows Description This is designed to provide the user a checklist of topics to entertain during the workflow development process. Lesson 19-1. This document will cover a variety of situations users will have to address and help them ask the right questions before and during the design process. you should beable to: ♦ ♦ Name key considerations for designing workflows Describe the process of designing a workflow The workshop will give you practice in designing your own mappings. Email and Command tasks reusable will make this easier. you may consider volume analysis optional. The lists are valuable to all but particularly for the lead developer. developing the load process solely on the dependency analysis. Three e-mail options are available for notification during the load process: ♦ ♦ ♦ ♦ Post-session e-mails can be sent after a session completes successfully or when it fails E-mail tasks can be placed in workflows before or after an event or series of events E-mails can be sent when workflows are suspended 393 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n g i s e D w o l f k r oW : 9 1 t i n U . The load development process involves the following steps: Clearly define and document all dependencies ♦ Analyze the processing resources available ♦ Develop operational requirement ♦ Develop tasks. ♦ Design a high-level view of the workflow and document the process within the workflow. Also. If the volume of data is sufficiently low for the available hardware to handle. Before designing a workflow. using a textual description to explain exactly what the workflow is supposed to accomplish and the methods or steps it will follow to accomplish its goal.

etc. and the impact of any possible dependency test results (e. mapping. fail a session. ♦ ♦ ♦ Workflow Overview ksaT d n am m oC repoleveD I leveL 8 retneCrewoP acitamrofnI n g i s e D w o l f kr oW : 9 1 t i n U Workflow Specifics The following are tips that will make the workflow development process more efficient (not in any particular order): ♦ If developing a sequential workflow. There is also the option to create dependencies between the sessions Use a parameter file to define the values for parameters and variables used in a workflow. and any information about specific error handling for the workflow. Parameter files can contain the following types of parameters and variables: Workflow variables ♦ Worklet variables ♦ Session parameters ♦ Mapping parameters and variables When using parameters or variables in a workflow. or session. mapping. And. use the Workflow Wizard to create Sessions in sequence. Also be sure to specify the dependency relationship between each session or event. or session. the Integration Service checks the parameter file to determine the start value of the parameter or variable. This should list all the sources and row counts and row widths expected for each session. This should include all Lookup transformations in addition to the extract sources.g.♦ Document any other information about the workflow that is likely to be helpful in developing the workflow. mapping parameters. for example.) Create a Load Volume Analysis. The completed workflow design should then be reviewed with one or more team members for completeness and adherence to the business requirements. don't run a session. Create a Load Dependency Analysis. Use a parameter file to initialize workflow variables. and mapping ♦ ♦ ♦ ksaT l o r tn o C ksaT li a mE ksaT n oisi ce D 2 ksaT no iss eS 1 ksaT no iss eS ksaT t r a tS 493 . include source and target database connection information. the algorithm or logic needed to test the dependency condition during execution.. worklet variables. worklet. List the parameters or variables and their values in the parameter file. The amount of data that is read to initialize a lookup cache can materially affect the initialization and total execution time of a session. worklet. A parameter file can be created by using a text editor such as WordPad or Notepad. Helpful information may. along with all other events (Informatica or other) that they depend on. the design document should be updated if the business rules change or if more information is gathered during the build process. This should list all sessions by dependency. pre or post workflow processing requirements. fail a parent or worklet.

when the Integration Service cannot locate the value of a session parameter in the parameter file. select Options and select the option to 'Show full names of task'. the Integration Service checks for the start value of the parameter or variable in other places. you may be able to improve performance by processing partitioned data sets in parallel in multiple threads of the same session instance running on the Integration Service node. ♦ ♦ ♦ 593 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n g i s e D w o l f k r oW : 9 1 t i n U . worklet. Target Load Based Strategies: Loading directly into the target is possible when the data is going to be bulk loaded. If not defining start values for these parameters and variables. rather than forcing it to process the entire source and recalculate the same calculations each time you run the session. Since session parameters do not have default values. ♦ Load into flat files and bulk load using an external loader. worklet. do either of the following: Enter the parameter file name and directory in the workflow. or session and change the file that these tasks use. you can configure the session to process only those changes. create multiple parameter files for a single workflow. This allows the Integration Service to update your target incrementally. However. or session using pmcmd and enter the parameter filename and directory in the command line.variables. ♦ Load into a mirror database. To specify the parameter file that the Integration Service uses with a workflow. ♦ Session parameters must be defined in a parameter file. or session properties. To include parameter or variable information for more than one workflow. create separate sections for each object within the parameter file. worklet. This will show the entire name of all tasks in the workflow. as necessary. worklet. worklet. it fails to initialize the session. and you can capture changes. If the source changes only incrementally. parallel execution may impair performance on over-utilized systems or systems with smaller I/O capacity ♦ ♦ ♦ ♦ Incremental aggregation is useful for applying captured changes in the source to aggregate calculations in a session. Also. On hardware systems that are under-utilized. or session. From the Workflow Manager Tools menu. or session in a single parameter file. ♦ Start the workflow.

repoleveD I leveL 8 retneCrewoP acitamrofnI n g i s e D w o l f kr oW : 9 1 t i n U 693 .

txt and will be created by you using any text editor. In order to utilize the CPU’s in a more efficient manner you will want to run some of the sessions concurrently and some of them sequentially: The sessions containing mappings m_Stage_Payment_Type.Unit 19 Workshop: Load All Staging Tables in Single Workflow Business Purpose All of the staging tables need to be loaded in a single workflow. m_Stage_Product and m_Dealership_Promotions can be run sequentially. For this workshop you can set the start time to be a couple of minutes from the time you complete the workflow.1 .3 793 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n g i s e D w o l f k r oW : 9 1 t i n U .2 .b . . The session containing mapping m_Stage_Customer_Contacts can be run concurrently to the sessions in the previous bullet point. You will need to place this file in the directory indicated by the instructor after you start the workflow. ♦ ♦ ♦ ♦ ♦ ♦ m_Stage_Payment_Type m_Stage_Product m_Dealership_Promotions m_Stage_Customer_Contacts m_STG_TRANSACTIONS m_STG_EMPLOYEES Workflow/Worklet Details This section contains the workflow processing details. If you are in a UNIX environment you may skip this requirement. The indicator file will be named fileindxx. Objectives ♦ Design and create a workflow to load all of the staging tables Duration 60 minutes Workshop Details Mappings Required This section contains a list of the mappings that will be used in the workflow. If you are unclear on any of the instructions please ask the instructor.a . Technical Description The instructions will provide enough detail for you design and build the workflow that will load all of the staging tables in a single run. No sessions can begin until an indicator file shows up. The workflow needs to start at a certain time each day. Remember that the start time is relative to the time on the Integration Service process machine. Name the workflow wkf_LOAD_ALL_STAGING_TABLES.

c . 893 .f .5 All sessions need to truncate the target tables. Use administrator@anycompany. There is more than one solution to the workshop.com as the Email User Name. You will know that your solution has worked when all of the sessions have completed successfully.e . The session containing mapping m_STG_TRANSACTIONS needs to be run concurrently to the m_STG_EMPLOYEES. You may want to create reusable sessions from previously created workflows.d . The session containing mapping m_STG_EMPLOYEES can only be run after the 4 previously mentioned sessions complete successfully. The management only wants the workflow to run a maximum of 50 minutes. Should the workflow take longer than the 50 minutes an email must be sent to the Administrator. Should the workflow finish in the allotted time the timer task will need to be stopped. If either of the previous sessions fails an email should be sent to the administrator.If any of the previous sessions fails then an email should be sent to the administrator and the workflow aborted. repoleveD I leveL 8 retneCrewoP acitamrofnI n g i s e D w o l f kr oW : 9 1 t i n U .4 .

993 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I n g i s e D w o l f k r oW : 9 1 t i n U .

repoleveD I leveL 8 retneCrewoP acitamrofnI n g i s e D w o l f kr oW : 9 1 t i n U 004 .

com/services/ education_services :e to N 104 r e p o l e v e D I l e v e L 8 r et n e Cr e w o P a ci t a mr o f n I e s ru o C si h T d n oy e B : 02 t in U .Unit 20: Beyond This Course For more information on PowerCenter training.informatica. see http://www.

For more information and to register to take an exam.informatica.htm :e to N repoleveD I leveL 8 retneCrewoP acitamrofnI e s r u o C s i h T d n o y e B : 0 2 ti n U 204 .com/services/ education_services/certification/default. see http://www.

Sign up to vote on this title
UsefulNot useful