Table of Contents

Search

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

Developer Mapping Guide

Developer Mapping Guide

Creating a Parameter in an Expression

Creating a Parameter in an Expression

You can reference the parameter in an Expression after you define the parameter. The following example shows how to assign a parameter to a component in a filter expression.
  1. In the Filter transformation, click the
    Filter
    tab.
    The Expression Editor appears. You can select functions, ports, and parameters to create the expression.
  2. Select
    Specify By Value
    to define the expression instead of using an expression parameter.
  3. On the Filter tab, click the
    Ports
    tab.
  4. Select the Amount port. On the
    Functions
    tab, select the greater than (>) function.
    The following image shows the expression that contains the Amount port and the > operator:
    The Filter tab is an expression editor where you can select functions, ports, and parameters to create the filter condition.
  5. Click the
    Parameters
    tab in the Expression Editor.
    The Expression Editor lists the system parameters and the user-defined parameters.
  6. Click
    Manage Parameters
    to add a parameter.
    The
    Parameters
    dialog box appears.
  7. Click
    New
    .
    A dialog box appears with default parameter values.
  8. Enter the parameter name, parameter type, precision, and default value.
    The following image shows the
    Parameters
    dialog box:
    The Parameters dialog box has the following fields, Name, Description, Type, Precision, Scale, and Default Value.
  9. In the Expression Editor, click
    OK
    The parameter that you created appears in the parameter list.
  10. Select the Min_Order_Amount parameter to add it to the expression.
    The Min_Order_Amount parameter appears in the expression.
     The Expression Editor shows the following expression: Amount > $Min_Order_Amount
    The parameter appears in the expression with a dollar sign ($) identifier. The Min_Order_Amount default value is 50. If you add the transformation to a mapping without overriding the Min_Order_Parameter, the Filter transformation returns rows where the Amount is greater than 50.

0 COMMENTS

We’d like to hear from you!