informatica designer

Upload: meonline7

Post on 14-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Informatica DESIGNER

    1/65

    Informatica Training

    DESIGNER

  • 7/29/2019 Informatica DESIGNER

    2/65

    :

    The transfer of data is called transformation

    A transformation is a repository object that generates, modifies, orpasses data

    The Designer provides a set of transformations that perform specificfunctions

    Transformations in a mapping represent the operations theInformatica Server performs on the data.

    Data passes into and out of transformations through ports that youlink in a mapping or mapplet.

    Transformation

  • 7/29/2019 Informatica DESIGNER

    3/65

    :

    Transformations can be active or passive

    A passive transformation does not change the number of rows thatpass through it,

    An active transformation can change the number of rows that passthrough it

    Transformations can be connected to the data flow

    An unconnected transformation is not connected to othertransformations in the mapping

    It is called within another transformation, and returns a value to thattransformation.

    Transformation

  • 7/29/2019 Informatica DESIGNER

    4/65

    Create the transformation

    Configure the transformation

    Link the transformation to other transformations and target definitions

    Mapping Designer

    Transformation Developer

    Mapplet Designer

    Tasks to incorporate a transformation into a mapping

  • 7/29/2019 Informatica DESIGNER

    5/65

    Expression Transformation

    You can use the Expression transformation to calculate values in a single row

    before you write to the target

    You can use the Expression transformation to test conditional statements.

    You can use the Expression transformation to perform any non-aggregate

    calculations.

  • 7/29/2019 Informatica DESIGNER

    6/65

    Creating an Expression Transformation

    In the Mapping Designer, choose Transformation-Create. Select the Expression

    transformation.

  • 7/29/2019 Informatica DESIGNER

    7/65

    Create the input ports

    Repeat the previous step for each input port you want to add to the expression.

    Create the output ports (O) you need

    Ports in expression transformation

  • 7/29/2019 Informatica DESIGNER

    8/65

    Setting expression in expression transformation

    Enter the expression in the Expression Editor you have disable to in port.

    Check the expression syntax by clicking Validate

  • 7/29/2019 Informatica DESIGNER

    9/65

    Connect to next transformation

    Connect the output ports to the next transformation or target.

  • 7/29/2019 Informatica DESIGNER

    10/65

    Select a tracing level on the Properties tab

    Tracing level

    Normal

    Choose Repository-Save.

  • 7/29/2019 Informatica DESIGNER

    11/65

    The Sorter transformation allows you to sort data.

    You can sort data in ascending or descending orderaccording to a specified sort key.

    You can also configure the Sorter transformation forcase-sensitive sorting, and specify whether the outputrows should be distinct.

    The Sorter transformation is an active transformation. Itmust be connected to the data flow.

    You can sort data from relational or flat file sources.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    12/65

    When you create a Sorter transformation in a mapping,you specify one or more ports as a sort key andconfigure each sort key port to sort in ascending ordescending order.

    You can also use the Sorter transformation to sort datapassing through an Aggregator transformationconfigured to use sorted input.

    You also configure sort criteria the PowerCenter Serverapplies to all sort key ports and the system resources itallocates to perform the sort operation.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    13/65

    Following Figure illustrates a simple mapping that uses a Sortertransformation. The mapping passes rows from a sales tablecontaining order information through a Sorter transformation.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    14/65

    The Sorter transformation contains only input/output ports.

    All data passing through the Sorter transformation is sortedaccording to a sort key. The sort key is one or more ports that you

    want to use as the sort criteria.

    You can specify more than one port as part of the sort key.

    When you specify multiple ports for the sort key, the PowerCenter

    Server sorts each port sequentially.

    The order the ports appear in the Ports tab determines thesuccession of sort operations.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    15/65

    At session run time, the PowerCenter Server sortsdataaccording to the sort order specified in the sessionproperties.

    The sort The Sorter transformation treats the datapassing

    through each successive sort key port as asecondarysort of the previous port.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    16/65

    Following Figure shows the Ports tab configuration for theSorter transformation sorting the data in ascending order byorder ID and item ID:

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    17/65

    Sorter Cache Size

    The PowerCenter Server uses the Sorter CacheSize

    property to determine the maximum amount ofmemory it

    can allocate to perform the sort operation. The

    PowerCenter Server passes all incoming datainto the

    Sorter transformation before it performs the sort

    operation.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    18/65

    Case Sensitive

    The Case Sensitive property determines whether the PowerCenterServer considers case when sorting data. When you enable theCase Sensitive property, the PowerCenter Server sorts uppercasecharacters higher than lowercase characters.

    Work Directory

    You must specify a work directory the PowerCenter Server uses tocreate temporary files while it sorts data. After the PowerCenterServer sorts the data, it deletes the temporary files. You can specify

    any directory on the PowerCenter Server machine to use as a workdirectory. By default, the PowerCenter Server uses the valuespecified for the $PMTempDir server variable.

    Sorter Transformation

  • 7/29/2019 Informatica DESIGNER

    19/65

    Filter Transformation

    The Filter transformation allows you to filter rows in a

    mapping.

    You pass all the rows from a source transformationthrough the Filter transformation, and then enter a filter

    condition for the transformation.

    All ports in a Filter transformation are input/output,and only rows that meet the condition pass through the

    Filter transformation.

  • 7/29/2019 Informatica DESIGNER

    20/65

    Filter Transformation

    The mapping in following passes the rows from a human

    resources table that contains employee data through a Filter

    transformation. The filter only allows rows through for employees

    that make salaries of 30,000 or higher.

  • 7/29/2019 Informatica DESIGNER

    21/65

    Filter Transformation

  • 7/29/2019 Informatica DESIGNER

    22/65

    With the filter of SALARY > 30000, only rows of data whereemployees that make salaries greater than $30,000 pass throughto the target.

    As an active transformation, the Filter transformation may change

    the number of rows passed through it.

    A filter condition returns TRUE or FALSE for each row that passesthrough the transformation, depending on whether a row meets thespecified condition.

    Only rows that return TRUE pass through this transformation.

    Discarded rows do not appear in the session log or reject files.

    Filter Transformation

  • 7/29/2019 Informatica DESIGNER

    23/65

    Filter Transformation Tips

    Use the Filter transformation early in the mapping.

    To maximize session performance, keep the Filter transformation asclose as possible to the sources in the mapping.

    Use the Source Qualifier transformation to filter.

    The Source Qualifier transformation provides an alternate way tofilter rows. Rather than filtering rows from within a mapping, theSource Qualifier transformation filters rows when read from asource.

    The main difference is that the source qualifier limits the row setextracted from a source, while the Filter transformation limits the rowset sent to a target.

  • 7/29/2019 Informatica DESIGNER

    24/65

    Troubleshooting Filter Transformations

    Case sensitivity. The filter condition is case-sensitive, and queriesin some databases do not take this into account.

    Appended spaces. If a field contains additional spaces, the filtercondition needs to check for additional spaces for the length of the

    field. Use the RTRIM function to remove additional spaces.

    To filter out rows containing null values or spaces, use theISNULL and IS_SPACES functions to test the value of the port. Forexample, if you want to filter out rows that contain NULLs in theFIRST_NAME port, use the following condition:

    IIF(ISNULL(FIRST_NAME),FALSE,TRUE)

  • 7/29/2019 Informatica DESIGNER

    25/65

    A Router transformation is an Active Transformation

    A Router transformation is similar to a Filter transformation because

    both transformations allow you to use a condition to test data.

    A Filter transformation tests data for only one condition

    Router transformation tests data for one or more conditions

    when you use a Router transformation in a mapping, the Informatics

    Server processes the incoming data only once.

    Comparing Router and Filter Transformations

    Router Transformation

  • 7/29/2019 Informatica DESIGNER

    26/65

    .

    Creating a Router Transformation

    In the Mapping Designer, open a mapping.

    Choose Transformation-Create

  • 7/29/2019 Informatica DESIGNER

    27/65

    .

    Select and drag all the desired ports from a transformation to add them tothe Router transformation

    Input values in the router transformation

  • 7/29/2019 Informatica DESIGNER

    28/65

    .

    Double-click the title bar of the Router transformation to edit transformationproperties

    Edit transformation

  • 7/29/2019 Informatica DESIGNER

    29/65

    .

    Click the Transformation tab and configure transformation properties asdesired

    Setting properties in the router transformation

    port

    properties

    group

    metadata

  • 7/29/2019 Informatica DESIGNER

    30/65

    .

    Properties tab router transformation

    Click the Properties tab and configure tracing levels as desired

    Click the Groups tab, and then click the Add button to create a user-definedgroup

  • 7/29/2019 Informatica DESIGNER

    31/65

    .

    Group tab in router transformation

    Click the Group Filter Condition field to open the Expression Editor.

    Enter a group filter condition

    Click Validate to check the syntax of the conditions you entered.

    Click OK.

    Connect group output ports to transformations or targets.

    Choose Repository-Save.

  • 7/29/2019 Informatica DESIGNER

    32/65

    Example of router transformation in mapping

  • 7/29/2019 Informatica DESIGNER

    33/65

    Router Transformation Components

  • 7/29/2019 Informatica DESIGNER

    34/65

    A Router transformation has the following types of groups:

    Input

    Output

    There are two types of output groups:

    User-defined groups

    Default group

    The Types group in Router Transformation

  • 7/29/2019 Informatica DESIGNER

    35/65

    .

    Using Group Filter Conditions

    You create group filter conditions on the Groups tab using the Expression Editor

    You can enter any expression that returns a single value.

    You can also specify a constant for the condition

    You might want to use a Router transformation in a mapping to filter this data to

    Three different Expression transformations.

    There is no group filter condition associated with the default group

  • 7/29/2019 Informatica DESIGNER

    36/65

    .

    Specifying Group Filter Conditions

  • 7/29/2019 Informatica DESIGNER

    37/65

    .

    Group Filter Conditions

  • 7/29/2019 Informatica DESIGNER

    38/65

    .

    Working with Ports

    A Router transformation has input ports and output ports .

    Input ports reside in the input group, and output ports reside in the outputgroups.

    You can create input ports by copying them from another transformation orby manually creating them on the Ports tab.

    You can create input ports by copying them from another transformation orby manually creating them on the Ports tab

  • 7/29/2019 Informatica DESIGNER

    39/65

    .

    Port tab in router transformation

  • 7/29/2019 Informatica DESIGNER

    40/65

    .

    Input values in router transformation

  • 7/29/2019 Informatica DESIGNER

    41/65

    .

    Connecting Router Transformations in a Mapping

    When you connect transformations to a Router transformation in a mapping,consider the following rules:

    You can connect one group to one transformation or target.

  • 7/29/2019 Informatica DESIGNER

    42/65

    .

    Connect one port to multiple target

    You can connect one output port in a group to multiple transformations or target

  • 7/29/2019 Informatica DESIGNER

    43/65

    .

    Connect multiple out ports to multiple target

    You can connect multiple output ports in one group to multipletransformations or targets

  • 7/29/2019 Informatica DESIGNER

    44/65

    .

    Connect more then one group to one target

    You cannotconnect more than one group to one transformation or target

  • 7/29/2019 Informatica DESIGNER

    45/65

    .

    Lookup Transformation

    Use a Lookup transformation in your mapping to look up data in arelational table, view, or synonym

    Import a lookup definition from any relational database to which both

    the Informatica Client and Server can connect

    You can use multiple Lookup transformations in a mapping.

    The Informatica Server queries the lookup table based on the lookup

    ports in the transformation

    It compares Lookup transformation port values to lookup table column

    values based on thelookup condition

  • 7/29/2019 Informatica DESIGNER

    46/65

    .

    The task of Lookup transformation

    Get a related value.

    Perform a calculation

    Update slowly changing dimension tables

    Connected or unconnected

    Cached or uncached

  • 7/29/2019 Informatica DESIGNER

    47/65

    Types of lookup transformation

    Connected Lookup Transformation

    Unconnected Lookups Transformation

    Connected Lookup: You can configure a connected Lookuptransformation to receive input directly from the mapping pipeline,

    unconnected Lookup: To receive input from the result of anexpression in another transformation.

  • 7/29/2019 Informatica DESIGNER

    48/65

    Connected lookup transformation

    Receives input values directly from the pipeline

    Cache includes all lookup columns used in the mapping

    If there is no match for the lookup condition, it returns thedefault value for all output ports

    Pass multiple output values to another transformation

    Supports user-defined default values

  • 7/29/2019 Informatica DESIGNER

    49/65

    .

    Unconnected Lookup

    Receives input values from other transformation calling:LKP expression

    You can use a static cache.

    Cache includes all lookup/output ports in the lookup condition .t

    If there is no match for the lookup condition, returns null

    Pass one output value to another transformation

    Does not support user-defined default values

  • 7/29/2019 Informatica DESIGNER

    50/65

    .

    Lookup Components

    configure a Lookup transformation in a mapping, you have to define

    the following components:

    Lookup table

    Ports

    Properties

    Condition

    Metadata extensions

  • 7/29/2019 Informatica DESIGNER

    51/65

    .

    Lookup Components

  • 7/29/2019 Informatica DESIGNER

    52/65

    .

    Creating a Lookup Transformation

    In the Mapping Designer, choose Transformation-Create.

    In the Select Lookup Table dialog box, you can choose the lookuptable

    Click the Import button if the lookup table is not in the source or

    target database.

  • 7/29/2019 Informatica DESIGNER

    53/65

    .

    Import lookup transformation

    If you want to manually define the lookup transformation,click theSkip button

    Define input ports for each Lookup condition you want to define

  • 7/29/2019 Informatica DESIGNER

    54/65

    Lookup transformations that use a dynamic lookup cache, associate

    an input port or sequence ID with each lookup port.

    On the Properties tab, set the properties for the lookup.

    Click OK.

    Import lookup transformation

    Edit t f ti

  • 7/29/2019 Informatica DESIGNER

    55/65

    .

    Edit transformation

    Double click on lookup transformation edit transformation opens

    S tti th ti t t t b

  • 7/29/2019 Informatica DESIGNER

    56/65

    .

    Setting the properties to port tab

    S tti th ti t ti t b

  • 7/29/2019 Informatica DESIGNER

    57/65

    .

    Setting the properties to properties tab

    U d t St t T f ti

  • 7/29/2019 Informatica DESIGNER

    58/65

    Update Strategy Transformation

    For the greatest degree of control over your update

    strategy, you add Update Strategy transformations to a

    mapping. The most important feature of this

    transformation is its update strategy expression, used toflag individual rows for insert, delete, update, or reject

    Update Strateg Transformation

  • 7/29/2019 Informatica DESIGNER

    59/65

    Update Strategy Expressions

    Frequently, the update strategy expression uses the IIF or DECODE

    function from the transformation language to test each row to see if

    it meets a particular condition. If it does, you can then assign eachrow a numeric code to flag it for a particular database operation. For

    example, the following IIF statement flags a row for reject if the entry

    date is after the apply date. Otherwise, it flags the row for update:

    IIF( ( ENTRY_DATE > APPLY_DATE), DD_REJECT, DD_UPDATE )

    Update Strategy Transformation

    Update Strategy Transformation

  • 7/29/2019 Informatica DESIGNER

    60/65

    Lookup and Update Strategy Transformations

    When you create a mapping with a Lookup transformation that uses adynamic lookup cache, you must use Update Strategy transformations toflag the rows for the target tables. When you configure a session usingUpdate Strategy transformations and a dynamic lookup cache, you must

    define certain session properties.

    You must define the Treat Source Rows As option as Data Driven. Specifythis option on the Properties tab in the session properties.

    You must also define the following update strategy target table options:Select InsertSelect Update as UpdateDo not select Delete

    Update Strategy Transformation

    Update Strategy Transformation

  • 7/29/2019 Informatica DESIGNER

    61/65

    These update strategy target table options ensure thatthe PowerCenter Server updates rows marked forupdate and inserts rows marked for insert

    If you do not choose Data Driven, the PowerCenterServer flags all rows for the database operation you specify in theTreat Source Rows As option and does not use the Update Strategytransformations in the mapping to flag the rows. The PowerCenterServer does not insert and update the correct rows. If you do notchoose Update as Update, the PowerCenter Server does not

    correctly update the rows flagged for update in the target table. As aresult, the lookup cache and target table might becomeunsynchronized.

    Update Strategy Transformation

    Setting the Update Strategy

  • 7/29/2019 Informatica DESIGNER

    62/65

    When you configure a session, you can select a single database operation

    for all rows using the Treat Source Rows As setting.Configure the Treat Source Rows As session property:

    Setting the Update Strategy

    Setting the Update Strategy

  • 7/29/2019 Informatica DESIGNER

    63/65

    Specifying an Operation for All Rows

    Setting the Update Strategy

    Update Strategy Checklist

  • 7/29/2019 Informatica DESIGNER

    64/65

    Update strategy requires setting the right options within a session andpossibly adding Update Strategy transformations to a mapping.

    Only perform inserts into a target table.

    When you configure the session, select Insert for the Treat SourceRows As session property. Also, make sure that you select theInsert option for all target instances in the session.

    Delete all rows in a target table.

    When you configure the session, select Delete for the Treat SourceRows As session property. Also, make sure that you select theDelete option for all target instances in the session.

    Update Strategy Checklist

    Update Strategy Checklist

  • 7/29/2019 Informatica DESIGNER

    65/65

    Only perform updates on the contents of a target table.When you configure the session, select Update for the Treat SourceRows As session property.

    Add an Update Strategy transformation to the mapping.When you write the transformation update strategy expression, useeither the DECODE or IIF function to flag rows for differentoperations (insert, delete, update, or reject).

    When you configure a session that uses this mapping, select DataDriven for theTreat Source Rows As session property. Make surethat you select the Insert, Delete, or one of the Update options foreach target table instance.

    Update Strategy Checklist