51
Informatica Power Center 9.0.1 Building Financial Data Mode - Lab#32 Data Transformation Guide IV Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Guide for building financial data model in Informatica. The document focuses on how the real world requirement should be interpreted. The mapping document template with very simplified steps and screen shots makes the complete learning so easy. The document focuses on various data transformation required to while loading data to the transaction system. Join our professional training program and learn from experts. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 1

Informatica Data Quality Check

Embed Size (px)

DESCRIPTION

BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Guide for building financial data model in Informatica. The document focuses on how the real world requirement should be interpreted. The mapping document template with very simplified steps and screen shots makes the complete learning so easy. The document focuses on various data transformation required to while loading data to the transaction system. Join our professional training program and learn from experts.

Citation preview

Page 1: Informatica Data Quality Check

Informatica Power Center 9.0.1

Building Financial Data Mode - Lab#32Data Transformation Guide IV

Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Guide for building financial data model in Informatica. The document focuses on how the real world requirement should be interpreted. The mapping document template with very simplified steps and screen shots makes the complete learning so easy. The document focuses on various data transformation required to while loading data to the transaction system. Join our professional training program and learn from experts.

History:Version Description Change Author Publish Date0.1 Initial Draft Upendra Upadhyay 12th Aug 20110.1 Review#1 Amit Sharma 18th Aug 2011

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 1

Page 2: Informatica Data Quality Check

Table of ContentsObjective:.......................................................................................................................................................3

Summary:.......................................................................................................................................................3

Mapping Sheet...............................................................................................................................................3

Importing Source and Target Table................................................................................................................4

CREATE MAPPING..........................................................................................................................................9

CREATE WORKFLOW....................................................................................................................................34

Execute Workflow, Review data and Check log File.....................................................................................40

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 2

Page 3: Informatica Data Quality Check

Objective: This document is designed to demonstrate various Data Transformation and Data Quality check examples. We have used many real time scenarios to bridge the gap between theory concept and real life learning. This guide contents many transformation examples with lookup tables.

Summary:Source Table - STG_PAYMENT_PATTERN, Lookup Table -SRC_PAYMENT_TYPE_MLS, SRC_PATTERN_TYPE_MLS SRC_AMOUNT_TYPE_MLS, SRC_MONTHS_MLS, SRC_MULTIPLIER_MLSTarget Table - TRG_PAYMENT_PATTERN TRG_PAYMENT_PATTERN_EVENT

Process: Launch Informatica Power Center Designer 9.0.1 Login to repository and open assign folder then Import source table in Source analyzer

window and Import target table in Target Designer window in Informatica Power Center Designer.

Click on Mapping Designer widow and create mapping and then create expression transformation to define the data quality check logic and then save this mapping.

Create lookup transformation to get the value from lookup table. Launch Informatica Power Center Workflow Manager and create workflow in work let

window and then assign session through create task. Create source and target relational connection (If source and target table is relational

database) and define source and target connection in session. And then execute workflow. Check execution log file and review of data.

Mapping Sheet

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 3

Page 4: Informatica Data Quality Check

Importing Source and Target TableImport data from source and create target table (There are two types for create target table, Manually or import from database). There are following step to importing source and target database (Table).

Step-1 Launch the Informatica Power Center Designer, Go to Start All Programs Informatica 9.0.1 Client Power Center Client Power Center Designer.

Step-2 Then Connect to Repositories in Informatica Power Center Designer, Right click on repositories name and click on Connect. Then sign into your assigned folder.

Step-3 Then go to Tools Menu in menu bar and click on Source Analyzer to import source table. Source Analyzer use for importing source definitions in Informatica Power Center or Updating source definitions either manually or by reimporting the definition.

Step-4 And then go to Sources Menu in Informatica Power Center Designer Menu bar and select Import from database (Here some other options available such as Import from Database(import source data from RDBMS), Import from File(import source data from Flatfile), Import from Cobol File(import Cobol source), Import XML Definition(import source data from XML) etc.).

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 4

Right Click on InfoRepoUser.

Select Source Analyzer

Page 5: Informatica Data Quality Check

Step-5 Select ODBC data source (If you need to create or modify an ODBC data source, click the Browse button to open the ODBC Administrator. Create the data source, and click on OK button. Then select the new ODBC data source) and then specify Username, Owner name and password after that click on connect button. Then select source table, if you want to select all table then click on Select All button to select All table and then click on OK Button.

Here also some other options available such as search table name and show all owners. And if you got some

Step-6 Source table in source analyzer window. Then right click on Source table and select Preview Data to view data. If you want to edit some column and its relationship then you can do this from select Edit options.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 5

Click on Import from Database.

Page 6: Informatica Data Quality Check

Step-7 When you click on Preview Data, A new window appear. Select ODBC data source connection and then specify Username, Owner name and Password and then click on Connect button.

Step-8 Now click on Target Designer. And then select Target menu in Informatica Power Center Designer Menu bar and click on Import from database to import target table. (Or create manually, In target menu click on create select database type and click OK. Then add column in Edit window. If target table stored in any RDBMS then select target table and then go to target menu and click on

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 6

Page 7: Informatica Data Quality Check

Generate/Execute SQL... Generate/Execute window appears. Then click on connect option and connect to database and specify information and then click on Generate and Execute ).

Step-9 Specify Username, Owner name, password and then click on connect and then select target table and click on OK.

Step-10 Target table in Target Designer tab. Here two target table in target designer window.First Target Table(TRG_ACCOUNT_DETAILS) - Store all account information.Second Target Table(Branch Grade) - Store Branch_CD and Grade.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 7

Page 8: Informatica Data Quality Check

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 8

Page 9: Informatica Data Quality Check

CREATE MAPPINGMapping : Mappings represent the data flow b/w sources to targets. When the Informatica Power Center Server executes a session, it uses the instructions configured in the mapping to read, transform, and write data.Every mapping must contain the following components:Source definition: It describes the characteristics of a source.Transformation: A transformation is a repository object which reads the data, modifies the data and passes the data. Transformations in a mapping represent the operations that the integration service performs on the data.Target definition: It describes the target table.

Step-1 Go to Mapping Designer and Create New Mapping for the Data Quality Check and then name of mapping and click OK button.

Step-2 Opens the folder and it shows you the subfolders associated with it.

Step-3 Then expand the sources and target subfolder and drag and drop source and target table into Mapping Designer Window from respective folder.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 9

Page 10: Informatica Data Quality Check

Step-4 Now create expression transformation for apply the business logic. EXPRESSION TRANSFORMATION - An Expression transformation is a connected and passive transformation used to calculate values on a single row.

Step-5 Now passes all Source qualifier table column into expression transformation table in Mapping Designer window.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 10

Select Expression transformation in drop down.

Page 11: Informatica Data Quality Check

Step-6 Now create lookup transformation for look up data from SRC_MULTIPLIER_MLS table. Select Lookup in drop down and give name of lookup transformation.

Lookup TRANSFORMATION - Lookup transformation is passive and Connected or Unconnected transformation ( Dynamic lookup is connected). Use a look up data in a flat file or a relational table, view, or synonym.

Step-7 Now click on From Relational Table in Import option.

Step-8 Now select ODBC data source and then give Username, Owner name and password and click on Connect button, select table as a lookup table and then click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 11

Select Lookup transformation in drop down.

Page 12: Informatica Data Quality Check

Step-9 Now pass the V_PAYMENT_EVENT_FREQ_MULT Source qualifier column into lookup table and then right click on lookup table and select Edit to give condition.

Step-10 Now go to Condition and click on Add button to give condition and select Lookup Table Column and select operator and select Transformation Port column and then click on APPLY button and click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 12

Page 13: Informatica Data Quality Check

Step-11 Now create lookup transformation for look up data from SRC_MONTHS_MLS table. Select Lookup in drop down and give name of lookup transformation.

Step-12 Now click on From Relational Table in Import option.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 13

Select Lookup transformation in drop down.

Page 14: Informatica Data Quality Check

Step-13 Now select ODBC data source and then give Username, Owner name and password and click on Connect button, select table as a lookup table and then click on OK button.

Step-14 Now pass the V_PAYMENT_EVENT_MONTHS Source qualifier column into lookup table and then right click on lookup table and select Edit to give condition.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 14

Page 15: Informatica Data Quality Check

Step-15 Now go to Condition and click on Add button to give condition and select Lookup Table Column and select operator and select Transformation Port column and then click on APPLY button and click on OK button.

Step-16 Now create lookup transformation for look up data from SRC_PAYMENT_TYPE table. Select Lookup in drop down and give name of lookup transformation.

Step-17 Now click on From Relational Table in Import option.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 15

Select Lookup transformation in drop down.

Page 16: Informatica Data Quality Check

Step-18 Now select ODBC data source and then give Username, Owner name and password and click on Connect button, select table as a lookup table and then click on OK button.

Step-19 Now pass the V_TERM_TYPE Source qualifier column into lookup table and then right click on lookup table and select Edit to give condition.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 16

Page 17: Informatica Data Quality Check

Step-20 Now go to Condition and click on Add button to give condition and select Lookup Table Column and select operator and select Transformation Port column and then click on APPLY button and click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 17

Page 18: Informatica Data Quality Check

Step-21 Now create lookup transformation for look up data from SRC_PATTERN_MLS table. Select Lookup in drop down and give name of lookup transformation.

Step-22 Now click on From Relational Table in Import option.

Step-23 Now select ODBC data source and then give Username, Owner name and password and click on Connect button, select table as a lookup table and then click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 18

Select Lookup transformation in drop down.

Page 19: Informatica Data Quality Check

Step-24 Now pass the V_PATTERN_TYPE Source qualifier column into lookup table and then right click on lookup table and select Edit to give condition.

Step-25 Now go to Condition and click on Add button to give condition and select Lookup Table Column and select operator and select Transformation Port column and then click on APPLY button and click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 19

Page 20: Informatica Data Quality Check

Step-26 Now create lookup transformation for look up data from SRC_AMOUNT_TYPE table

Step-27 Now click on From Relational Table in Import option.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 20

Select Lookup transformation in drop down.

Page 21: Informatica Data Quality Check

Step-28 Now select ODBC data source and then give Username, Owner name and password and click on Connect button, select table as a lookup table and then click on OK button.

Step-29 Now pass the V_AMOUNT_TYPE Source qualifier column into lookup table and then right click on lookup table and select Edit to give condition.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 21

Page 22: Informatica Data Quality Check

Step-30 Now go to Condition and click on Add button to give condition and select Lookup Table Column and select operator and select Transformation Port column and then click on APPLY button and click on OK button.

Step-31 Now pass all output lookup column into expression transformation table and then right click on Expression table and select Edit for apply data quality check query in Mapping designer window.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 22

Page 23: Informatica Data Quality Check

Step-32 Then go to ports tab, select V_PATTERN_TYPE COLUMN and create its dummy column, rename it, check only output checkbox and input check box for its source input column, Then go to expression editor and write SQL query.

Step-33 Then write SQL Query, and then click on Validate button and then click on OK button. And

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 23

Page 24: Informatica Data Quality Check

Step-34 Then, select V_PATTERN_EVENT_MONTH COLUMN and create its dummy column, rename it, check only output checkbox and input check box for its source input column, Then go to expression editor and write SQL query.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 24

Page 25: Informatica Data Quality Check

Step-35 Then write SQL Query, and then click on Validate button and then click on OK button.

Step-36 Then, select N_PAYMENT_EVENT_FREQ COLUMN and create its dummy column, rename it, check only output checkbox and input check box for its source input column, Then go to expression editor and write SQL query.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 25

Page 26: Informatica Data Quality Check

Step-37 Then write SQL Query, and then click on Validate button and then click on OK button.

Step-38 Then, select N_PAYMENT_EVENT_REPEAT_VALUE COLUMN and create its dummy column, rename it, check only output checkbox and input check box for its source input column, Then go to expression editor and write SQL query.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 26

Page 27: Informatica Data Quality Check

Step-39 Then write SQL Query, and then click on Validate button and then click on OK button.

Step-40 Then, select N_AMOUNT COLUMN and create its dummy column, rename it, check only output checkbox and input check box for its source input column, Then go to expression editor and write SQL query.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 27

Page 28: Informatica Data Quality Check

Step-41 Then write SQL Query, and then click on Validate button and then click on OK button.

Step-42 Then, select V_PAYMENT_TYPE COLUMN and create its dummy column, rename it, check only output checkbox and input check box for its source input column, Then go to expression editor and write SQL query.

Step-43 Then write SQL Query, and then click on Validate button and then click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 28

Page 29: Informatica Data Quality Check

Step-44 Then click on add button and create two column, Rename both column, First as CREATED_BY and second as CREATED_DATE and then go to expression editor.

Step-45 Then write SQL Query, and then click on Validate button and then click on OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 29

Page 30: Informatica Data Quality Check

Step-46 Then go to CREATED_DATE expression editor.

Step-47 And write sysdate and then click on Validate button and then click OK button.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 30

Page 31: Informatica Data Quality Check

Step-48 All expression in Expression editor.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 31

Page 32: Informatica Data Quality Check

Step-49 Then created mapping.

Step-50 . Save this mapping.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 32

Page 33: Informatica Data Quality Check

v

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 33

Page 34: Informatica Data Quality Check

CREATE WORKFLOW Workflow Manager: Workflow load the data between source to target b/w sequential manner. And also Define run-time properties for a mapping, known as sessions.

Step-1 Open Informatica PowerCenter Workflow Manager and then go to go to workflow designer and click on workflow menu to create workflow. Specify name of workflow and click OK.

Step-2 Workflow Designer.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 34

Page 35: Informatica Data Quality Check

Step-3 Create Task and assign session, Click on Task menu and click on create and then name of session, click Create, select mapping and click OK.SESSION - A session is a set of instructions that tells the Power Center Server how and when to move data from sources to targets.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 35

Page 36: Informatica Data Quality Check

Step-4 Session in workflow designer windows.

Step-5 Now create flow B/W Workflow to Task. Select Line Task and link to Start to s_Data_Quality_Check.Link Task - Link task to determine the order of execution in the workflow

Step-6 Work Flow Designer Windows.

Step-7 Now Configure Connection to Target, Then Right Click on Expression and Edit, Then Click Mapping tab and configure connection for your Target table schema in oracle 11g RDBMS. And then click OK.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 36

Page 37: Informatica Data Quality Check

Step-8 In Mapping. Specify Connection and property.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 37

Page 38: Informatica Data Quality Check

Step-9 Set These property for target table. Insert: Check this option to insert a row in the target table. Delete: Check this option to delete a row in the target table.

Truncate Table: check this option to truncate the target table before loading the data.

Update as Update: Update the row in the target table.

Update as Insert: Insert the row which is flagged as update.

Update else Insert: If the row exists in the target table, then update the row. Otherwise, insert the row.

Set property for TRG_ACCOUNT_DETAILS.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 38

Page 39: Informatica Data Quality Check

Step-10 Set These Set property for Branch_Grade.

Step-11 Now save (ctrl+s) this workflow and check it.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 39

Page 40: Informatica Data Quality Check

Execute Workflow, Review data and Check log FileWorkflow monitor: Workflow monitor is helpful in monitoring and tracking the workflow created in Informatica power center.Step-1 Now Start Workflow, Right click on Workflow Designer Window and Click on Start Workflow.

Step-2 Check session in Informatica PowerCenter Workflow Monitor.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 40

Target table load.

Session successfully Succeeded

Page 41: Informatica Data Quality Check

Step-3 Now view data into Oracle 11g..

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 41

Page 42: Informatica Data Quality Check

Step-4 Session Log. Right click on session and select session log.

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 42

Target Table Query.

SQL Query.

Page 43: Informatica Data Quality Check

www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 43

Load Summary.

Lookup Table.