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

Parameters in Expressions

Parameters in Expressions

You can configure parameters in expressions or conditions in transformations, such as the Aggregator transformation, Lookup transformation, Expression transformation, and the Filter transformation.
For example, configure a filter condition in the Filter transformation. Choose the ports and the parameters to include in the condition. Select the system parameters or the user-defined parameters to include in the filter condition.
The following image shows a Filter condition that includes the Employee port and the Employee_Filter parameter:
The Filter view of the Filter transformation shows lists of ports and parameters that you can add to a filter expression. The filter condition contains an expression with two arguments, a port and a parameter value.
You can use parameters in expressions in the same arguments that accept port names as arguments. You cannot use a parameter to replace a constant argument in an expression.
For example, consider the TO_DECIMAL expression that converts a string to a decimal value:
TO_DECIMAL( value [, scale] )
The scale argument must be a constant value in the expression.
The following valid expression contains a constant argument for scale:
TO_DECIMAL( Input_Port,10 )
The following expression is not valid because it contains a user-defined parameter for the scale argument :
TO_DECIMAL( Input_Port,$Scale_Param )
A parameter cannot contain another parameter. For example, if you configure Parameter1 and Parameter2 in a transformation, you cannot set the default value of Parameter1 to $Parameter2. If you nest the parameters, the mapping fails with a validation error at runtime.

0 COMMENTS

We’d like to hear from you!