Informatica PowerCenter 7.1 Basics

Transcription

Informatica PowerCenter 7.1BasicsEducation ServicesVersion PC7B-20040608 Informatica Corporation, 2003 - 2004. All rights reserved.1

Introduction

Course ObjectivesBy the end of this course you will: Understand how to use the major PowerCentercomponents for development Be able to build basic ETL mappings and mapplets Be able to create, run and monitor workflows Understand available options for loading target data Be able to troubleshoot most problems3

About Informatica Founded in 1993 Leader in enterprise solution products Headquarters in Redwood City, CA Public company since April 1999 (INFA) 2000 customers, including over 80% of Fortune 100 Strategic partnerships with IBM, HP, Accenture, SAP,and many others Worldwide distributorship4

Informatica Resources www.informatica.com – provides information (under Services) on: Professional Services Education Services Technical Support my.informatica.com – sign up to access: Product documentation (under Products, documentation downloads) Velocity Methodology (under Services) Knowledgebase Webzine devnet.informatica.com – sign up for Informatica Developers Network5

Informatica Professional CertificationInformatica offers three distinct Certification titles: Exam A: Architecture and Administration Exam C: Advanced Administration Exam A: Architecture and Administration Exam B: Mapping Design Exam D: Advanced Mapping Design Exams A, B, C, D plus Exam E: Enablement TechnologiesFor more information and to register to take an exam:http://www.informatica.com/services/Education Services/Professional Certification/6

Extract, Transform and LoadDecision SupportOperational SystemsRDBMSMainframe Transaction level data Optimized for transactionresponse time Current Normalized orDe-normalized dataExtract7DataOtherWarehouse Aggregate data Cleanse data Consolidate data Apply business rules De-normalize data Aggregated data Historical dataTransformETLLoad

PowerCenter 7 ArchitectureNativeInformatica toryAgentNativeRepository Designer Workflow Workflow Rep ServerManagerManager Monitor AdministrativeConsoleNot Shown: Client ODBC Connections for Source and Target metadata8Repository

Connectivity Products for PowerCenterThese allow companies to directly source from and integrate with avariety of transactional applications and real-time services PowerExchange (for mainframe, AS/400 and complex flat files) PowerConnects for:Transactional Applications Essbase PeopleSoft SAP R/3 SAP BW SAS SiebelReal-time Services JMS MSMQ MQSeries SAP IDOCs TIBCO WebMethods Web Services PowerConnect SDK (available on the Informatica Developer Network)9

PowerCenter 7.1 OptionsData ProfilingProfile wizards, rules definitions, profile results tables,and standard reportsData CleansingName and address cleansing functionality, includingdirectories for US and certain international countriesServer GridReal-Time/WebServicesPartitioningTeam-Based DevelopmentPowerCenterServer group management, automatic workflow distributionacross multiple heterogeneous serversZL Engine, always-on non-stop sessions, JMSconnectivity, and real-time Web Services providerData smart parallelism, pipeline and data parallelism,partitioningVersion control, deployment groups, configurationmanagement, automatic promotionServer engine, metadata repository, unlimited designers,workflow scheduler, all APIs and SDKs, unlimited XML andflat file sourcing and targeting, object export to XML file,LDAP authentication, role-based object-level security,metadata reporter, centralized monitoringWatch for short virtual classroom courses on these options and XML!10

Design and Execution Process1. Create Source definition(s)2. Create Target definition(s)3. Create a Mapping4. Create a Session Task5. Create a Workflow with Task components6. Run the Workflow and verify the results11

Demonstration12

Source Object Definitions

Source Object DefinitionsBy the end of this section you will: Be familiar with the Designer interface Be familiar with Source Types Be able to create Source Definitions Understand Source Definition properties Be able to use the Data Preview option14

Methods of Analyzing SourcesSource Analyzer Import from: Relational database Flat file COBOL file XML object Create manuallyRepositoryServerTCP/IPRepository AgentNativeDEF15Repository

Analyzing Relational Database SourcesSource AnalyzerRelational DB SourceODBC Table View SynonymDEFRepositoryServerTCP/IPRepository AgentNativeDEF16Repository

Analyzing Relational Database SourcesEditing Source Definition Properties17

Analyzing Flat File SourcesSource Analyzer Mapped Drive NFS Mount Local DirectoryFlat FileDEF Fixed Width DelimitedRepositoryServerTCP/IPRepository AgentNativeDEF18Repository

Flat File Wizard Three-stepwizard Columns canbe renamedwithin wizard Text, Numericand Datetimedatatypes aresupported Wizard‘guesses’datatype19

Flat File Source Properties20

Analyzing COBOL (VSAM) SourcesSource Analyzer Mapped Drive NFS Mounting Local DirectoryRepositoryServer.CBL FileDEFDATATCP/IPRepository AgentNativeDEF21RepositorySupported Numeric StorageOptions: COMP, COMP-3,COMP-6

Cobol (VSAM) Source Properties22

Analyzing XML SourcesSource Analyzer Mapped Drive NFS Mounting Local DirectoryXML Schema (XSD),DTD or XML FileDEFRepositoryServerDATATCP/IPRepository AgentNativeDEF23Repository

Data Previewer Preview data in Relational database sources Flat file sources Relational database targets Flat file targets Data Preview Option is available in Source Analyzer Warehouse Designer Mapping Designer Mapplet Designer24

Using Data Previewer in Source AnalyzerData Preview ExampleFrom Source Analyzer,select Source drop downmenu, then Preview DataEnter connection informationin the dialog boxA right mouse click on the object can also be used to preview data25

Using Data Previewer in Source AnalyzerData Preview ResultsDataDisplayView upto 500rows26

Metadata Extensions Allows developers and partners to extend themetadata stored in the Repository Metadata extensions can be: User-defined – PowerCenter users can define and createtheir own metadata Vendor-defined – Third-party application vendor-createdmetadata lists For example, applications such as Ariba or PowerConnect forSiebel can add information such as contacts, version, etc.27

Metadata Extensions Can be reusable or non-reusable Can promote non-reusable metadata extensions toreusable; this is not reversible Reusable metadata extensions are associated withall repository objects of that object type A non-reusable metadata extensions is associatedwith a single repository object Administrator or Super User privileges are requiredfor managing reusable metadata extensions28

Example – Metadata Extension for a SourceSample User DefinedMetadata, e.g. contactinformation, business user29

Target Object Definitions

Target Object DefinitionsBy the end of this section you will: Be familiar with Target Definition types Know the supported methods of creating TargetDefinitions Understand individual Target Definition properties31

Creating Target DefinitionsMethods of creating Target Definitions Import from relational database Import from XML object Create automatically from a source definition Create manually (flat file or relational database)32

Import Definition from Relational DatabaseCan infer existing object definitions from a databasesystem catalog or data dictionaryRelational DBWarehouseODBCDesigner TableRepositoryServerDEFTCP/IPRepository AgentNativeDEF33Repository View Synonym

Import Definition from XML ObjectCan infer existing object definitions from a databasesystem catalog or data dictionary Mapped Drive NFS Mounting Local ry AgentNative34DEFDATATCP/IPDEFDTD, XML Schema orXML FileRepository

Creating Target Automatically from SourceDrag-and-dropa SourceDefinition intothe WarehouseDesignerWorkspace35

Target Definition Properties36

Lab 1 – Define Sources and Targets37

Mappings

MappingsBy the end of this section you will be familiar with: The Mapping Designer interface Transformation objects and views Source Qualifier transformation The Expression transformation Mapping validation39

Mapping DesignerTransformation ToolbarMapping ListIconized Mapping40

Transformations Objects Used in This ClassSource Qualifier: reads data from flat file & relational sourcesExpression: performs row-level calculationsFilter: drops rows conditionallySorter: sorts dataAggregator: performs aggregate calculationsJoiner: joins heterogeneous sourcesLookup: looks up values and passes them to other objectsUpdate Strategy: tags rows for insert, update, delete, rejectRouter: splits rows conditionallySequence Generator: generates unique ID values41

Other Transformation ObjectsNormalizer: normalizes records from relational or VSAM sourcesRank: filters the top or bottom range of recordsUnion: merges data from multiple pipelines into one pipelineTransaction Control: allows user-defined commitsStored Procedure: calls a database stored procedureExternal Procedure : calls compiled code for each rowCustom: calls compiled code for multiple rowsMidstream XML Parser: reads XML from database table or message queueMidstream XML Generator: writes XML to database table or message queueMore Source Qualifiers: read from XML, message queues andapplications42

Transformation ViewsA transformation hasthree views: Iconized – shows thetransformation in relationto the rest of themapping Normal – shows the flowof data through thetransformation Edit – showstransformation ports( table columns)and properties;allows editing43

Source Qualifier TransformationRepresents the source record set queried by theServer. Mandatory in Mappings using relational orflat file sourcesPorts All input/outputUsage Convert datatypes For relational sources:Modify SQL statementUser Defined JoinSource FilterSorted portsSelect DISTINCTPre/Post SQL44

Source Qualifier Properties User can modify SQL SELECT statement (DB sources) Source Qualifier can join homogenous tables User can modify WHERE clause User can modify join statement User can specify ORDER BY (manually orautomatically) Pre- and post-SQL can be provided SQL properties do not apply to flat file sources45

Pre-SQL and Post-SQL Rules Can use any command that is valid for the databasetype; no nested comments Can use Mapping Parameters and Variables in SQLexecuted against the source Use a semi-colon (;) to separate multiple statements Informatica Server ignores semi-colons within singlequotes, double quotes or within /* .*/ To use a semi-colon outside of quotes or comments,‘escape’ it with a back slash (\)46

Expression TransformationPerform calculations using non-aggregate functions(row level)Ports Mixed Variables allowedCreate expression in anoutput or variable portUsage Perform majority ofdata manipulation47Click here to invoke theExpression Editor

Expression Editor An expression formula is a calculation or conditional statement for aspecific port in a transformation Performs calculation based on ports, functions, operators, variables,constants and return values from other transformations48

Expression ValidationThe Validate or ‘OK’ button in the Expression Editor will: Parse the current expression Remote port searching (resolves references to ports inother transformations) Parse default values Check spelling, correct number of arguments in functions,other syntactical errors49

Informatica Functions – ER50Character Functions Used to manipulate character data CHRCODE returns the numeric value(ASCII or Unicode) of the first character ofthe string passed to this function CONCAT is for backward compatibility only.Use instead

Informatica Functions – ConversionTO CHAR (numeric)TO DATETO DECIMALTO FLOATTO INTEGER51Conversion Functions Used to convert datatypes

Informatica Functions – Data CleansingINSTRIS DATEIS NUMBERIS MSOUNDEXSUBSTRTO CHARTO DATETO DECIMALTO FLOATTO INTEGER52 Used to process data during datacleansing METAPHONE and SOUNDEX createindexes based on Englishpronunciation (2 different standards)

Informatica Functions – DateADD TO DATEDATE COMPAREDATE DIFFGET DATE PARTLAST DAYROUND (Date)SET DATE PARTTO CHAR (Date)TRUNC (Date)Date Functions Used to round, truncate, orcompare dates; extract one partof a date; or perform arithmeticon a date To pass a string to a datefunction, first use the TO DATEfunction to convert it to andate/time datatype53

Informatica Functions – Numerical and NGSUMPOWERROUNDSIGNSQRTTRUNC54Numerical Functions Used to perform mathematicaloperations on numeric dataScientific Functions Used to calculategeometric valuesof numeric dataCOSCOSHSINSINHTANTANH

Informatica Functions – Special and TestSpecial FunctionsABORTDECODEERRORIIFLOOKUPIS DATEIS NUMBERIS SPACESISNULL55 Used to handle specific conditionswithin a session; search for certainvalues; test conditional statementsIIF(Condition,True,False)Test Functions Used to test if a lookup result is null Used to validate data

Variable Ports Use to simplify complex expressions e.g. create and store a depreciation formula to bereferenced more than once Use in another variable port or an output port expression Local to the transformation (a variable port cannot also be aninput or output port) Available in the Expression, Aggregator and Ranktransformations56

Variable Ports (cont’d) 57Use

Informatica Functions – Data Cleansing INSTR IS_DATE IS_NUMBER IS_SPACES ISNULL LTRIM METAPHONE REPLACECHR REPLACESTR RTRIM SOUNDEX SUBSTR TO_CHAR TO_DATE TO_DECIMAL TO_FLOAT TO_INTEGER Used to process data during data cleansing METAPHONE and SOUNDEX create indexes based on English pronunciation (2 different standards)