Sie sind auf Seite 1von 57

Informatica Power Center 9.0.

Informatica Constrain Based Loading Informatica Lab #34


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 show how to load data based on constraint. Join our professional training program and learn from experts.

History:
Version 0.1 0.1 Description Change Initial Draft Review#1 Author Upendra Upadhyay Amit Sharma Publish Date 12th Aug 2012 18th Aug 2012

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 1

Contents
Contents.......................................................................................................................... 2 Introduction..................................................................................................................... 3 Source Data Model.......................................................................................................... 4 DIM_Customer Table:....................................................................................................... 4 DIM_Store Table ................................................................................ 6

Dim Products................................................................................................................... 7 Creating Repository and Folder .................................................................................... 13 Creating Repository & Connecting it. ....................................13

CREATE MAPPING........................................................................................................... 23 CREATE WORKFLOW ..................................................................................................... 45 WORKFLOW MONITOR AND VIEW TARGET DATA...........................................................49 ..................................................................................................................................... 57

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 2

Introduction
Constraint based loading technique is available in Informatica PowerCenter since couple of its prior versions. This PowerCenter feature will let you load multiple tables in a single session, which is having database level primary key and foreign key constraint or parent - child relation.
What is Constraint Based Loading

In the Workflow Manager, you can specify constraint-based loading for a session. When you select this option, the Integration Service orders the target load on a row-by-row basis. For every row, the Integration Service loads the row first to the primary key table, then to any foreign key tables
What is Needed to Setup Constraint Based Loading

There are couple of rules for setting up Constraint-based loading in a particular session and lets see those in detail. 1. Key Relationships. 2. Active Source. 3. Target Connection Groups. 4. Treat Rows as Insert.
1. Key Relationships.

When target tables have no key relationships, the Integration Service does not perform constraintbased loading. Similarly, when target tables have circular key relationships, the Integration Service reverts to a normal load. It reverts to a normal load.
2. Active Source.

Both the parent and child table need to be mapped from a single active source such as Source Qualifier, Aggregator, Normalizer etc. When target tables receive rows from different active sources, the Integration Service reverts to normal loading for those tables.
3. Target Connection Groups.

The Integration Service enforces constraint-based loading for targets in the same target connection group. If the tables with the primary key-foreign key relationship are in different target connection groups, the Integration Service cannot enforce constraint-based loading when you run the workflow.
4. Treat Rows as Insert.

Use constraint-based loading when the session option Treat Source Rows As is set to Insert. You might get inconsistent data if you select a different Treat Source Rows As option and you configure the session for constraint-based loading.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 3

Source Data Model

DIM_Customer Table:

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 4

Source to Target Mapping Sheet

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 5

DIM_Store Table

Source to Target Mapping Sheet

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 6

Dim Products

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 7

Source to Target Mapping Sheet

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 8

DIM_Employee Table

Source to Target Mapping Sheet

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 9

DIM_Supplier Table

Source to Target Mapping Sheet

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 10

FACT_Retail_Sales

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 11

Target Model

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 12

Creating Repository and Folder Creating Repository & Connecting it.


Step-1 First create repository, Click on Start -> All Programs -> Informatica 9.0.1 -> Client -> Power Center Client -> Power Center Repository Manager.

Step-2 Then click on Repository Menu and click on Add Repository.

Step-3 Give information like Repository Name and Username. Then click on ok button and repository created successfully.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 13

Step-4 Now connect repository. Right click on newly created repository and click on connect.

Step-5 Give Username & password and click on Connect.

Creating Folder:
Step-1 Go to Informatica Power Center Repository Manager and click on Folder Menu and click on Create.

Step-2 Specify Name of Folder, Description, Owner, OS Profile, Options, Status and got to permissions tab.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 14

Step-3 This is permission tab to give permission for this folder.

Step-4 This is newly created Folder

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 15

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 16

Importing Source and Target Table


Step-1 Click on Start -> All Programs -> Informatica 9.0.1 -> Client -> Power Center Client -> Power Center Designer..

Step-2 Then Connect to Repository in Informatica Power Center Designer Right click on repository name and click on Connect.

Step-3 Go to Tools Menu and click on Source Analyzer to import source table. And then go to Sources Menu in Informatica Power Center Designer.

Step-4 And then select Source menu and click on Import from database
www.bispsolutions.com www.bisptrainings.com | | www.hyperionguru.com Page 17 |

Step-5 Specify Username, Owner name, password and then connect. Then select source table and click OK.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 18

Step-6 View data in source analyzer, Right click on Store Table and select Preview Data.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 19

Step-7 Specify Username and Password and connect it. Then Close it.

Step-8 Apply Step-6 to Step-7 to view data of all table. Step-9 Now click on Target Designer. Step-10 And then select Target menu and click on Import from database to import target table.

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

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 20

Step-12 To view data select table and Right click on the table and select Preview Data.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 21

Step-13 Specify Username and Password and connect it.

Step-14 Apply step 12 - 13 to view all target table data.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 22

CREATE MAPPING
Step-1 Go to Mapping Designer click OK. and Create New Mapping and then name of mapping and

Step-2 Then drag and drop source and target table in Mapping Designer.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 23

Step-3 Then Create transformation, First Create Source Qualifier Transformation for (Customer, Customer_Type, Region and Territory).

Step-4 Select Table.

Step-5 This is Source Qualifier Transformation for Customer, Customer_Type, Region and Territory table.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 24

Step-6 Then Create Normalizer Transformation, Select Normalizer Transformation and Drop into Mapping Designer Window.

Step-7 Then Right click on Normalizer table and select Edit.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 25

Step-8 Then go to Normalizer tab, add column, specify name, data type. and then click Apply and OK.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 26

Step-9 Then apply mapping for Source Qualifier to Normalizer table for Input column and output column to Target Table column.

Step-10 Then, Create Source Qualifier Transformation for (Brand, Category, Packaging, Products).

Step-11 Select Table.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 27

Step-12 This is Source Qualifier Transformation for Brand, Category, Packaging and Products table.

Step-13 Then Create Normalizer Transformation. Select Normalizer Transformation and Drop into Mapping Designer Window.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 28

Step-14 Then Right click on Normalizer table and select Edit.

Step-15 Then go to Normalizer tab, add column, specify name, data type. and then click Apply and OK.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 29

Step-16 Then apply mapping for Source Qualifier to Normalizer table for Input column and output column to Target Table column.

Step-17 Then Create Source Qualifier Transformation for (Store, Store_Region).

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 30

Step-18 Select Table.

Step-19 This is Source Qualifier Transformation for Store and Store_Region table.

Step-20 Then Create Normalizer Transformation. Select Normalizer Transformation and Drop into Mapping Designer Window.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 31

Step-21 Then Right click on Normalizer table and select Edit.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 32

Step-22 Then go to Normalizer tab, add column, specify name, data type. and then click Apply and OK.

Step-23 Then apply mapping for Source Qualifier to Normalizer table for Input column and output column to Target Table column.

Step-24 Then Create Source Qualifier Transformation for (Supplier, Supplier_Type).

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 33

Step-25 Select Table.

Step-26 This is Source Qualifier Transformation for Supplier and Supplier_Type table.

Step-27 Then Create Normalizer Transformation. Select Normalizer Transformation and Drop into Mapping Designer Window.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 34

Step-28 Then Right click on Normalizer table and select Edit.

Step-29 Then go to Normalizer tab, add column, specify name, data type. and then click Apply and OK.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 35

Step-30 Then apply mapping for Source Qualifier to Normalizer table for Input column and output column to Target Table column.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 36

Step-31 Then create transformation, First Create Source Qualifier Transformation for (Employee, Department).

Step-32 Select Table.

Step-33 This is Source Qualifier Transformation for Department and Employee.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 37

Step-34 Then Create Normalizer Transformation. Select Normalizer Transformation and Drop into Mapping Designer Window.

Step-35 Then Right click on Normalizer table and select Edit.

Step-36 Then go to Normalizer tab, add column, specify name, data type. and then click Apply and OK.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 38

Step-37 Then apply mapping for Source Qualifier to Normalizer table for Input column and output column to Target Table column.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 39

Step-38 Then create transformation, First Create Source Qualifier Transformation for (Customer, Products, Store, Supplier, Employee, Supplier_Billing, Supplier_Billing_Details).

Step-39 Select Table.

Step-40 This is Source Qualifier Transformation Customer, Products, Store, Supplier, Employee, Supplier_Billing, Supplier_Billing_Details tables.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 40

Step-41 Then Create Normalizer Transformation, Select Normalizer Transformation and Drop into Mapping Designer Window.

Step-42 Then Right click on Normalizer table and select Edit.

Step-43 Then go to Normalizer tab, add column, specify name, data type. And then click Apply and OK.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 41

Step-44 Then apply mapping for Source Qualifier to Normalizer table for Input column and output column to Target Table column.

Step-45 Check Target Load plan in Mapping menu.

Complete Mapping

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 42

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 43

Step-46 And then save it (ctrl+s) and check mapping is VALID.

CREATE WORKFLOW
Step-1 Now go to Informatica Power Center Designer Navigator, Click on Mapping Designer then right click on mapping designer windows and select Generate Workflow.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 44

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 45

Step-2 Select Workflow Generation Option and click on Next.

Step-3 Select as Integration Service and Connection Object, Then Specify name of workflow and session and then click Next Button.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 46

Step-4 Configure connection and then click on Next button.

Step-5 Configure connection, properties, reader/writer then click on OK button.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 47

Step-6 Workflow Generated Successfully, Then click on Finish button.

WORKFLOW MONITOR AND VIEW TARGET DATA


Step-1 Now, go to workflow manager and click on connect to repositories.

Step-2 Specify Username and Password, then click on Connect.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 48

Step-3 Select Folder and Connect to Folder then open the folder..

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 49

Step-4 Workflow Designer window.

Step-5 Now edit Task, So right click on session and go to Properties tab and then check Treat source rows as INSERT.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 50

Step-6 Now go to Config Object and check Constraint based load ordering.

Step-7 Now check Target load type is Normal for all target table properties in Mapping menu.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 51

Step-8 Now save this workflow.

Step-9 Right click on Workflow Designer window and select Start Workflow.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 52

Step-10 Check session in Informatica Power Center Workflow Monitor.

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 53

Step-11 Check session log, Right click on Session and select Get Session Log

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 54

Step-12 Now view data in Target RDBMS (Oracle 11g) DIM_CUSTOMER DATA

DIM_EMPLOYEE DATA

DIM_PRODUCT DATA

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 55

DIM_STORE DATA

DIM_SUPPLIER DATA

www.bispsolutions.com www.bisptrainings.com

| |

www.hyperionguru.com Page 56

Das könnte Ihnen auch gefallen