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

Example. Nesting Parameters in Port Expressions

Example. Nesting Parameters in Port Expressions

To nest expression parameters, you can assign expression parameters to different ports and use the ports in other expression parameters.
For example, you might have data on dates that customers opened and closed accounts with your company. You want to inspect the data to ensure that the dates in your system are valid. If the dates are not valid, you want to issue a warning.
To inspect the data, you can create an Expression transformation and configure the following ports:
This image shows the ports tab in the Expression transformation. The Ports tab shows two input ports, SignUpDate and CancelDate; a variable port CompareDates; and an output port GenerateAlert.
The input port
SignUpDate
is the date that a customer opened an account. The input port
CancelDate
is the date that a customer closed an account.
The variable port
CompareDates
returns -1, 0, or 1 depending on whether the value in the port
CancelDate
is earlier or later than the value in the port
SignUpDate
. The port
GenerateAlert
returns 'Warning' if the value in the port
CompareDates
is 1.
For the variable port
CompareDates
, you can configure an expression parameter with the following default value:
DATE_COMPARE(SignUpDate,CancelDate)
To nest the expression parameter that you use for the variable port
CompareDates
in the expression parameter for the output port
GenerateAlert
, you can configure an expression parameter with the following default value:
IIF(CompareDates=1,'Warning')

0 COMMENTS

We’d like to hear from you!