PowerCenter 8.x Level I Developer Lab Guide Version – L1D_20081124G PowerCenter
PowerCenter 8.x Level I Developer Lab Guide Version – L1D_20081124G PowerCenter 8.x Level I Developer Lab Guide Version 04 November 2008 Copyright (c) 2008 Informatica Corporation. All rights reserved. Printed in the USA. This software and documentation contain proprietary information of Informatica Corporation and are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright law. Reverse engineering of the software is prohibited. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation. Use, duplication, or disclosure of the Software by the U.S. Government is subject to the restrictions set forth in the applicable software license agreement and as provided in DFARS 227.7202-1(a) and 227.7702-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988), FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. The information in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Informatica Corporation does not warrant that this documentation is error free. Informatica, PowerMart, PowerCenter, PowerChannel, PowerCenter Connect, MX, and SuperGlue are trademarks or registered trademarks of Informatica Corporation in the United States and in jurisdictions throughout the world. All other company and product names may be trade names or trademarks of their respective owners. Portions of this software are copyrighted by DataDirect Technologies, 1999-2002. Informatica PowerCenter products contain ACE (TM) software copyrighted by Douglas C. Schmidt and his research group at Washington University and University of California, Irvine, Copyright (c) 1993-2002, all rights reserved. Portions of this software contain copyrighted material from The JBoss Group, LLC. Your right to use such materials is set forth in the GNU Lesser General Public License Agreement, which may be found at http://www.opensource.org/licenses/lgpl-license.php. The JBoss materials are provided free of charge by Informatica, “as-is”, without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Portions of this software contain copyrighted material from Meta Integration Technology, Inc. Meta Integration® is a registered trademark of Meta Integration Technology, Inc. This product includes software developed by the Apache Software Foundation (http://www.apache.org/). The Apache Software is Copyright (c) 1999-2005 The Apache Software Foundation. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit and redistribution of this software is subject to terms available at http://www.openssl.org. Copyright 1998-2003 The OpenSSL Project. All Rights Reserved. The zlib library included with this software is Copyright (c) 1995-2003 Jean-loup Gailly and Mark Adler. The Curl license provided with this Software is Copyright 1996-2007, Daniel Stenberg, <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 Lab 2-1: Creating Source Definitions 1 2-2: Creating Target Definitions 11 2-3: Creating Mappings 17 3-1: Create and Run Workflows 25 4-1: Using Filters and Expressions 35 4-2: Features and Techniques 45 5-1: Joining Data 51 6-1: Using the Lookup Transformation 65 7-1: Using Aggregators and Sorters 73 8-1: Using the Debug Wizard 81 9-1: Updating Target Tables 91 10-1: Filling In Missing Data 101 10-2: Using a Persistent Variable 109 11-1: Creating a Mapplet 115 12-1: Using Assignment and Decision Tasks 121 12-2: Using Events and Timers 129 Mapping Design Workshop 137 Workflow Design Workshop 145 PowerCenter 8.x Level I Developer Lab 2-1 1 Lab 2-1: Creating Source Definitions Scenario: • You will create some Source definitions for use in later work. Goals: • Use wizards to import Source definitions from a flat file and a relational database table • Preview the data in the Sources Duration: 10 minutes Instructions Note: Throughout this and later exercises, xx will refer to the student number assigned to you by your Instructor or the machine you are working on. For example, if you are Student05, then ~Developerxx refers to the folder ~Developer05. Step 1. Start PowerCenter Designer 1) On your desktop, double-click the PowerCenter Designer icon ( ) to start it. 2) In the Repository Navigator, double-click REP_SVC_EDW_DEV. Figure 1: Double-click the Repository to open it 3) In the “Connect to Repository” dialogue: a) For Username, enter Devxx (xx is the number assigned by your instructor). b) For Password, enter Devxx. c) Click Connect. 2 Lab 2-2 PowerCenter 8.x Level I Developer Figure 2: Connect to Repository dialogue 4) Right-click the folder labeled ~Developerxx and select Open. Figure 3: Open the Folder Note: In future instructions this may be referred to as “your folder.” PowerCenter 8.x Level I Developer Lab 2-1 3 Step 2. Create a Flat File Source 1) From the menu, select Tools Æ Source Analyzer. 2) From the menu, select Sources Æ Import from File. 3) In the Open Flat File dialogue, select customer_central.dat and click OK. a) The file is located in C:\infa-shared\Srcfiles 4) In Step 1 of the Flat File Import Wizard: a) Make sure that the Delimited radio button is selected. Note: This is because you are importing a comma-delimited file. You will select the field delimiter on the next screen. Note that PowerCenter can also import files with fixed field widths. b) Check Import field names from first line. (i) Note that “Start Import at Row” automatically changes to “2”. Note: When a file has column names, as this file does, PowerCenter can import those as field names. c) Click Next. Figure 4: Flat File Import Wizard – Step 1 of 3 4 Lab 2-2 PowerCenter 8.x Level I Developer 5) In Step 2 of the Flat File Import Wizard: a) In the Delimiters section, make sure that Comma is checked. Note: While a number of standard delimiters are listed, you can define any character or set of characters as the delimiter using the “Other” checkbox. b) Accept the defaults for other values and click Next. Figure 5: Flat File Import Wizard – Step 2 of 3 Note: This step sets up the fields in general. You will have the opportunity to adjust individual fields in Step 3. Note: “Use default text length” – check this to set a standard length for all fields with a text data type. Leave it unchecked and PowerCenter derives the text field length from the actual length of the data in the file. Note: “Escape Character” is the character used in your file format if the delimiter character may appear in a field. Consult documentation to learn more. 6) In Step 3 of the Flat File Import Wizard: a) Use the scrollbar to move to the right and select the City field. b) Change the length/precision of the City field to 50 c) Change the length/precision of the State field to 15 Note: These lengths come from data analysis. d) Select the ZIP field. PowerCenter 8.x Level I Developer Lab 2-1 5 Note: You will adjust this field because you know in the future you will import addresses with Canadian postal codes, which contain alphanumeric characters. e) Change the field type to Text. f) Change the Length/Precision to 6. g) Scroll to the far right and select the field DATE. h) Change the field type to Datetime. Note: You will adjust this field because you know that in the target database the data will be stored as a Date. You could perform the conversion using PowerCenter’s “To-Date” function, but it is simpler to use the implied conversion functionality of the Source definition. i) Click Finish. Figure 6: Flat File Import Wizard – Step 3 of 3 7) The Source definition will appear in the Source Analyzer workspace. 6 Lab 2-2 PowerCenter 8.x Level I Developer Figure 7: Source Definition Created 8) Edit the Source definition. Note: You may use this same Source definition to import data from multiple flat files. You will change the name to refer generically to customers rather than the specific customer data file. a) Double-click the green header bar at the top of the Source definition. (i) This opens the definition for editing. uploads/s1/ developer-lab-guide.pdf
Documents similaires










-
109
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Mai 31, 2022
- Catégorie Administration
- Langue French
- Taille du fichier 3.4130MB