Informatica Mapping

download Informatica Mapping

of 53

  • date post

    03-Apr-2015
  • Category

    Documents

  • view

    689
  • download

    2

Embed Size (px)

Transcript of Informatica Mapping

Suggested Naming Conventions Transformations Aggregator Expression Filter Joiner Lookup Normalizer Rank Sequence Generator Stored Procedure Source Qualifier Update Strategy AGG_TransformationName EXP_TransformationName FIL_TransformationName JNR_TransformationName LKP_TransformationName NRM_TransformationName RNK_TransformationName SEQ_TransformationName SP_TransformationName SQ_TransformationName UPD_TransformationName

Suggested Naming Conventions Targets T_TARGETNAME

Mappings m_MappingName

Mapplets mplt_MappletName

Sessions s_MappingName

Mapping Designer Ports To design the basic flow of data between source and targets Types: input, output, variable

Variable Ports For aggregator, expression and rank transformations Use variable to simplify complex expression store temporary data store values from prior rows

Provides Wizards to create simple pass through mappings/Slowly changing dimensions

Mapping Creation How to create a Mapping? Open the Mapping designer workspace Choose Mappings > Create Give a proper name to the mapping

Open the Sources from the navigator which you would have created/imported using source analyzer Drag and drop the source table from navigator into the workspace

Mapping Creation

Mapping Creation Choose Transformation > Create to create a transformation object Select the type of transformation object you want to create and give a proper name to it

Mapping Creation Drag and drop the required fields(ports) from Source Qualifier to the transformation object

Mapping Creation Add new ports in the transformation object and define them as variable ports to do complex transformation

Mapping Creation Open the Targets from the navigator which you would have created/imported using Warehouse Designer Select the target table, drag and drop it into the designer workspace

Mapping Creation Drag and drop the output ports from the last transformation object to the corresponding ports in the target

Choose Repository > Save to store the mapping Check the output window for any errors

Mapping Wizards Wizards help to create mappings quickly and easily Wizards designed to create mappings for loading and maintaining star schemas Mappings created using wizards can be edited and customized Getting Started Wizard Simple Pass Through mappings to load static fact and dimensions Use this when you want to drop all existing data from the table before loading new data

Slowly Growing Target mappings to load slowly growing dimension or fact tables Use this to load new data when existing data does not require updates

Mapping Wizards Slowly Changing Dimensions Wizard Type I Dimension Mapping- Keep most recent values in target

SourceEmp id Name Email Emp id

TargetName Email

1001

Shane

Shane @xyz.c om

1001

Shane

Shane @xyz.c om

SourceEmp id Name Email Emp id

TargetName Email

1001

Shane

Shane@ abc.co.in

1001

Shane

Shane@ abc.co.in

Shane@xyz. com

Mapping Wizards Slowly Changing Dimensions Wizard Type II Dimension Mapping Version Data Mapping- insert new and changed dimensions with version number and incremented primary key - full history and progress of changes

Target SourceEmp id 10 Name Shane Email Shane @xyz. comPM_ PRIM ARY KEY Emp id Name Email PM_V ERSI ON_ NUM BER 0

1000

10

Shane

Shan e@xy z.co m

Type II Dimension/VersioningSourceEmp id 10 Name Email

Shane Shane@ abc.co.in

PM_PRI Emp MARYKE id Y 1000 1001 10 10

Name

Email

PM_VERSION_N UMBER 0 1

Shane Shane

Shane@ xyz.com Shane@ abc.co.in

Target

Type II Dimension/VersioningSourceEmp id 10 Name Email

Shane Shane@ abc.com

PM_PRI Emp MARYKE id Y

Name

Email

PM_VERSION_N UMBER 0 1 2

Target

1000 1001 1003

10 10 10

Shane Shane Shane

Shane@ xyz.com Shane@ abc.co.in Shane@ abc.com

Mapping Wizards Slowly Changing Dimensions Wizard Type II Dimension Mapping Flag Current Mapping- insert new and changed dimensions with flags and incremented primary key - full history and flagging only current dimensions

Target SourceEmp id 10 Name Shane Email Shane @xyz. comPM_ PRIM ARY KEY Emp id Name Email PM_CU RRENT _FLAG

1000

10

Shane

Shan e@xy z.co m

1

Type II Dimension/Flag CurrentSourceEmp id 10 Name Email

Shane Shane@ abc.co.in

PM_PRI Emp MARYKE id Y 1000 1001 10 10

Name

Email

PM_CURRENT_F LAG N Y

Shane Shane

Shane@ xyz.com Shane@ abc.co.in

Target

Type II Dimension/Flag CurrentSourceEmp id 10 Name Email

Shane Shane@ abc.com

PM_PRI Emp MARYKE id Y

Name

Email

PM_CURRENT_F LAG N N Y

Target

1000 1001 1003

10 10 10

Shane Shane Shane

Shane@ xyz.com Shane@ abc.co.in Shane@ abc.com

Mapping Wizards Slowly Changing Dimensions Wizard Type II Dimension Mapping Effective Date Range Mapping- insert new and changed dimensions with date range to define current dimension data - full history and tracking changes with an exact effective date range

SourceEmp id 10 Name Email

TargetPM_ PRIM ARY KEY Emp id Name Email PM_B EGIN _DAT E PM_E ND_ DATE

Shane Shane @xyz. com

1000

10

Shane

Shan e@xy z.co m

01/0 1/00

Type II Dimension/Effective DateSourceEmp id 10 Name Email

Shane Shane@ abc.co.in

PM_PRIMA RYKEY 1000

Emp id

Name

Email

PM_BEGIN _DATE 01/01/00

PM_END _DATE 03/01/00

10

Shane

Shane @xyz. com Shane @ abc.co .in

1001

10

Shane

03/01/00

Target

Type II Dimension/Effective DateSourceEmp id 10 Name Email

Shane Shane@ abc.com

PM_PRI Emp MARYKE id Y 1000 1001 1003 10 10 10

Name

Email

PM_BEGIN _DATE 01/01/00 03/01/00 05/02/00

PM_END_ DATE 03/01/00 05/02/00

Shane Shane Shane

Shane@ xyz.com Shane@ abc.co.in Shane@ abc.com

Target

Mapping Wizards Slowly Changing Dimensions Wizard Type III Dimension Mapping- insert new and update values in existing dimensions - keep current and previous values (partial history)

Target SourceEmp id 10 Name EmailPM_P RIMA RYKE Y Emp id Name Email PM_P rev_ Colu mnN ame PM_E FFECT _DAT E

Shane Shane @xyz. com

1

10

Shane

Shane @xyz. com

01/01 /00

Type III DimensionSourceEmp id 10 Name Email

Shane Shane@ abc.co.in

PM_PRIMA RYKEY 1

Emp id

Name

Email

PM_Prev_ ColumnNa me Shane@xy z.com

PM_EFFE CT_DATE 01/02/00

10

Shane

Shane @ abc.co .in

Target

Type III DimensionSourceEmp id 10 Name Email

Shane Shane@ abc.com

PM_PRI Emp MARYKE id Y 1 10

Name

Email

PM_Prev_ ColumnNa me Shane@ abc.co.in

PM_EFFEC T_DATE 01/03/00

Shane

Shane@ abc.com

Target

Mapplet Designer Mapplet Reusable object that reflect set of transformation logic to use in multiple mappings Like a single transformation object Expands at run time

Each Mapplet must include the following Exactly one input transformation or Source Qualifier transformation At least one output transformation

Rules for Objects in Mapplets Use only reusable Sequence Generators Do not use pre- or post-session stored procedures

Mapplet Designer Rules for Objects in Mapplets Do not use the following in a mapplet Joiner Cobol Source definition Normalizer Target definitions

Mapplet Designer How to create a Mapplet? Open the Mapplet designer workspace Choose Mapplets > Create Give a name to the Mapplet

Create an input transformation to define mapplet input ports if the mapplet contains no sources

Creating a Mapplet

Double click on the object to define the input ports

Creating a Mapplet Create the transformation objects to be used in the mapplet One input transformation can be connected to only one transformation, so to pass same values to two separate data flows,connect the input transformation to another transformation and then split the data flow Use Output transformation to create output ports, creating one Output transformation for each mapplet output group

Connect all the input ports, ports in transformation objects and the output ports to complete the data flow

Creating a Mapplet

Choose Repository > Save to store the mapplet Check the output window for validation status If mapplet is not valid,correct the problem and re-save the mapplet

Replacing a relational database connectionYou can replace a relational database connection with another relational database connection. For example, you might have several sessions that you want to write to another target database. Instead of editing the properties for each session, you can replace the relational database connection for all sessions in the repository that use the connection.

Work Flow Manager In the Workflow Manager, you define a set of instructions called a workflow to execute mappings you build in the Designer. Generally, a workflow contains a session and any other task you may want to perform when you execute a session. Tasks can include a session, email notification, or scheduling information. You connect each task with links in the workflow. You can also create a worklet in the Workflow Manager. A worklet is an object that group