Table of Contents

Search

  1. Preface
  2. Mappings
  3. Mapplets
  4. Mapping Parameters
  5. Mapping Outputs
  6. Generate a Mapping from an SQL Query
  7. Dynamic Mappings
  8. How to Develop and Run a Dynamic Mapping
  9. Dynamic Mapping Use Cases
  10. Mapping Administration
  11. Export to PowerCenter
  12. Import From PowerCenter
  13. Performance Tuning
  14. Pushdown Optimization
  15. Partitioned Mappings
  16. Developer Tool Naming Conventions

Developer Mapping Guide

Developer Mapping Guide

Create a Dynamic Port and Define a Dynamic Expression

Create a Dynamic Port and Define a Dynamic Expression

Create a dynamic port as an output-only port in the Exp_TRIM transformation. Define a dynamic expression to remove the spaces in the beginning and end of the strings.
  1. In the
    Properties
    view of the Exp_TRIM transformation, click the
    Ports
    tab.
  2. Click
    New Dynamic Port
    .
     The Ports tab lists the ports in the Expression transformation. The tab contains a New button to create new ports. The tab also shows Cut, Copy, Paste, Delete, Move Up, and Move Down buttons.
  3. Clear the
    Input
    column to make this port an output-only port.
  4. Rename the dynamic port that you created as
    Dynamic_TRIM
    .
     The Ports tab lists the ports in the Expression transformation. The new port Dynamic_TRIM also appears in the list. The tab contains New, Cut, Copy, Paste, Delete, Move Up, and Move Down buttons.
  5. In the
    Expression
    column for the
    Dynamic_TRIM
    dynamic port, click the
    Open
    button ( "" 
				).
    The
    Dynamic Expression
    window opens.
  6. Replace the existing expression in the editor with the following expression:
    LTRIM(RTRIM(From_Read_Customer_FF))
    The Ports tab in the Dynamic Expression dialog box lists the ports in the Expression transformation. The Expression editor shows the expression that you entered. The dialog box has an Output Port Settings area where you can configure the output ports.
  7. Click
    Validate
    to validate the expression.
  8. Click
    OK
    to exit the
    Validate Expression
    dialog box.
  9. Rename the output ports for the expression as follows:
    1. In the
      Output Port Settings
      area, select the Base Port as From_Read_Customer_FF.
    2. Click
      Edit Output Port Settings
      .
      The
      Output Port Settings
      dialog box appears.
    3. In the
      Name
      list, select
      Base port name + Suffix
      .
    4. In the
      Suffix
      box, enter
      _TRIM
      .
    5. Click
      OK
      .
  10. Click
    OK
    to exit the
    Dynamic Expression
    editor.
    The following image shows the
    Dynamic_TRIM
    dynamic port with the renamed generated ports:
    The mapping contains a Read transformation and an Expression transformation. The Expression transformation has two dynamic ports, From_Read_Customer_FF dynamic port and Dynamic_TRIM. The generated ports in the Dynamic_TRIM dynamic port have a _TRIM suffix.

0 COMMENTS

We’d like to hear from you!